APIs & Integrations

jhned
Member | Diamond Partner
Member | Diamond Partner

submit_form v2 API endpoint not sending hs_context / IP Address / Original Source data

We're using the V2 version of the submit_form endpoint to pass data from FormAssembly to Hubspot. In order to get the source and analytics data into Hubspot, we're passing the hs_context parameter as a URL-encoded JSON block. However, we're still seeing "created from Direct Traffic from No URL" for all of our contacts.

 

Here's an example of what we're passing as the hs_context parameter:

%7B%22hutk%22%3A%2296764b859ef22a3d0a3dc356202fcb9a%22%2C%22ipAddress%22%3A%2271.180.42.16%22%2C%22pageUrl%22%3A%22https%3A%5C%2F%5C%2Fdiscover.adi.baker.edu%5C%2F%22%2C%22pageName%22%3A%22ADI%22%7D

We've double-checked our cookie policy settings and it appears that everything is correct. Any idea why this isn't working?

 

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

submit_form v2 API endpoint not sending hs_context / IP Address / Original Source data

Hi @jhned,

 

I hope all is well with you 😄

 

It is possible that those leads are the one who directly type your website URL into their browser and so it is being bucketed under Direct traffic. You can also learn more here: Categorize sessions, contacts, and customers in the sources report

 

Also, when taking a look into your form on this portal 6247824, I'm able to see that there are contacts who is coming from PPC. 

 

Additionally, as mentioned by Derek here: https://community.hubspot.com/t5/APIs-Integrations/All-the-contacts-are-coming-in-through-as-direct-...;

While there's a couple of reasons why contacts are being bucketed under Direct Traffic, 

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

That said, I'll be more than happy to help you take a look into things here if you could sent me some example contacts.