Traffic Source Not Tracked With API Form?

forms

#1

We are using an API form to submit contact data to hubspot. We are having an issue where the contact is marked as created from direct traffic, even when coming from organic search. We have followed the api guidelines for using hubspot cookie and hscontext parameters.

When we test, we use an incognito window and click through from google search and complete our forms. We are testing from IP’s that are not filtered.

One thing to note, the user completes an initial form with email and password, then on the subsequent page they complete an additional form with more contact details. The second form is the one that sends data to hubspot.

Thanks

John


#2

Hi @JHPS

Is the tracking code installed on both of the pages with the two forms? And are the forms on the same domain or separate domains? The source we show is going to be for the first page view that we record, so the cookie that you’re passing with the form data to HubSpot would need to be the same cookie that would have been used to track the visit to the first page with the password form.


#3

We have placed the tracking code on all pages, and we are still seeing it marked as direct traffic.

Here is an example contact https://app.hubspot.com/contacts/2238251/contact/4453351/


#4

Hi @dadams, I am a Project Manager with Payscape. Is it possible to pair you with our developer to expedite this matter? Also what would your team need from our developer to help with troubleshooting? We have implemented all suggested changes and are still not receiving the results desired.


#5

@JHPS I took a look at that contact, and the form submission for the record did not have the utk in the in the data, so there wouldn’t be any actual analytics data for the record. The contact shows direct traffic as the source since that’s the default source for any contact created through a form submission.

Do you have an example of the POST data that was used for the form submission for that contact (or any other example contact)? If you’re form script is grabbing the hubspotutk cookie from the visitor, the most likely cause of this would be a formatting problem with the hs_context data in the POST data.


#6

@dadams we changed the Disable cookie tracking option that was set to yes and you can take a look to a new contact that was created after https://app.hubspot.com/contacts/2238251/contact/4468101/


#7

@dadams We have found resolution for this issue. Thank you for help in resolving this matter. Have a great day.