# Source not tracked

**URL:** <https://community.hubspot.com/t/source-not-tracked/32834>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [March 8, 2021, 5:38pm UTC](https://community.hubspot.com/t/source-not-tracked/32834 "2021-03-08T17:38:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![highfidelity](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/highfidelity/32/74736_2.png) [@highfidelity](https://community.hubspot.com/u/highfidelity)\
**Post date:** [March 8, 2021, 5:38pm UTC](https://community.hubspot.com/t/source-not-tracked/32834/1 "2021-03-08T17:38:29Z")

</div>

Hi there,

We’re using the forms API on our ‘request a free trial page’ but the ‘original source’ of all our leads is always marked as ‘direct traffic’ - it seems to get lost. As far as I understood from the documentation, this info is captured in the ‘Hubspotutk’ cookie but as far as I know everything everything is passsed on:

```lia-code-sample
if(isset($_COOKIE['hubspotutk'])) {
$hutk = $_COOKIE['hubspotutk'];

curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"fields\": [\n {\n \"name\": \"email\",\n \"value\": \"XXXXX \"\n },\n {\n \"name\": \"firstname\",\n \"value\": \"XXXXX\"\n },\n {\n \"name\": \"lastname\",\n \"value\": \"XXXXX \"\n }, \n {\n \"name\": \"company\",\n \"value\": \"XXXXXX \"\n }\n],\n \"context\": {\n \"hutk\": \"$hutk\",\n \"pageUri\": \https://app.xx.io/Signup\,\n \"pageName\": \"Application - trial page\"\n },\n \"legalConsentOptions\": {\n \"consent\": { \n \"consentToProcess\": true,\n \"text\": \"I agree to allow xx to store and process my personal data.\",\n \"communications\": [\n {\n \"value\": true,\n \"subscriptionTypeId\": 999,\n \"text\": \"I agree to receive marketing communications from xx.\"\n }\n]\n }\n }\n}");

```

Are we missing anything?

Hubspot’s feedback is as follows:

"I was just in touch with one of our developers, and they can see that your PFP body request is correct within the Form API:

`$hutk = $_COOKIE['hubspotutk'];`

This leads them to conclude that there might be an error in the way you are handling the process of capturing the hutk value, which is required in order to pass on the information within the above mentioned line of code to submit the cookie information." but we’re kind of stuck at this point. Thank you in advance!

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 9, 2021, 4:56pm UTC](https://community.hubspot.com/t/source-not-tracked/32834/2 "2021-03-09T16:56:40Z")

</div>

Hi @highfidelity

Adding @MatthewShepherd and @stefen to this to see if they have some thoughts on the subject.

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [March 10, 2021, 4:26pm UTC](https://community.hubspot.com/t/source-not-tracked/32834/3 "2021-03-10T16:26:38Z")

</div>

@dennisedson @highfidelity I’m not a curl expert so I’m not going to be much help. But in general I’d first check the hubspot tracking script is working first. After that, check the value of that cookie and that it’s being created in the browser session. If those two things are correct then I would check for any errors in your code and checking the network request to make sure the cookie is being sent with the data.

---

<div class="post-metadata">

**Author:** ![highfidelity](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/highfidelity/32/74736_2.png) [@highfidelity](https://community.hubspot.com/u/highfidelity)\
**Post date:** [March 17, 2021, 4:10pm UTC](https://community.hubspot.com/t/source-not-tracked/32834/4 "2021-03-17T16:10:09Z")

</div>

Hi Stefen,

How would I check the value of the hubspotutk cookie to double check? It seems that it’s just hashed.
