All the contacts are coming in through as direct traffic when using Forms API



I am using Forms API and all the contacts are coming through as direct traffic. We’re passing the hutk cookie as described on but it has not added any information.


Example data sent to the Forms API from our website. This is the value of the $str_post variable from my code sample.


Is there anything else we can try on our end to get the Original Source to show up as something other than Direct Traffic?


I’m also trying to figure this out, if I find something I will post here. Only replying as I can’t find a way to monitor a post without commenting


Hi all,

Visits to your website that are bucketed under Direct Traffic are ones with no referring source or tracking URL; this is usually due to visitors who type your website URL directly into their browser.


Hi Derek,

I am aware of how direct traffic is bucketed, however, we are using AdWords to drive people to the pages, so these people should not be bucketed under direct traffic. We have over 4500 leads that have come through as direct traffic, when using the Forms API


Hi @Shrizzle,

There are a number of reasons these contacts might be bucketed under Direct Traffic, but fundamentally all of them point to either:

  1. There is no tracking URL or referrer for the contact’s first visit
  2. The contact doesn’t have any tracking information associated

If you could send me some example contacts, I’d be happy to take a look at them to help identify what the problem might be. The second issue generally points to an issue with the form they’ve submitted, while the first issue usually means either a tracking code issue or that the contacts are actually direct traffic. Here’s another article that touches on some specific issues that lead to high Direct Traffic numbers:


Hi @Derek_Gervais,

i also have this problem. I was in touch with the support but they send me here to look for detailed help.
The problem is, that we use external form, linked to an hubspot form by the API.
Its not possible that people come from direct traffic filling our form.
They must have been on the brand site or any landingpage and clicked the CTA there.

But it is not possible to get any information about the people were they came from.
We send the hutk in the hs_context like above from thread owner…

The support was sending me an array from the hubspot backend, were it is supposed there is no hutk…
If it is possible to come to a direct contact to u, i can send u the detailed informations like screenshot, code and the arrays…

Hope to find a solution soon, because we cant track anything, how our landingpages are converting.

Thanks in advance


Hi @Matthias,

You can direct message me with a link to an example contact record and I can take a look, but Support has the same tools that I do. If you’re using the forms API and the contacts don’t have an associated usertoken, it’s likely something wrong with the hs_context parameter when you make the submission to HubSpot.


Hi derek,

I am in the same situation as the other users here.
I have contacts to provide, how should I send them to you?


Hey @Isaac_Takushi, sorry to bug you, but im having this issue as explained in this form. I didn't want to create a new topic, and i Didnt want to post in our thread we had earlier.

Is there any information you have here? I'm having an issue that every contact that is created through any of our hubspot form api.

Any help would be greatly appreciated.


Hey, @swoopamir,

I don't have any update here, but if you share links to a few example contacts and a link to the page with the form they submitted, I can run some tests.

As @Derek_Gervais says, this behavior is always either because the hutk cookie token value wasn't passed properly or the cookie that was passed does not contain the tracking parameters or referral information that is needed to fulfill the rules in this article's table.


so i actually figured it out @Isaac_Takushi, if you run the analytics.identify im using segment it will then post the hubspot form api to the contact storing all the data.

I've tried it and it is working so far, this is great!


Great to hear!

Yes, the Identify a visitor Tracking Code API method (which Segment uses for their analytics.identify method) is another way to pass a hutk token and browsing history to a contact record.