Forms API doesn't capture Orginal Source correctly


#1

We recently implemented Forms API V3 on our backend to capture our form submissions.

Unfortunately, for almost all contacts I see they were "created from Direct Traffic from No URL".

How can I get attribution right?


#3

Hi @TommyKlouwers,

Can you confirm you are passing the hutk cookie token and pageUri values in the context object with a few examples? As noted in the documentation:

Please Note: While the hutk value is not required for the submission to be accepted, this token is used to associate analytics data with a contact record, so without this you will not see any page views or analytics source data for the contact record.


#4

Hey @Isaac_Takushi,

Yes, we're passing those values.


#5

Hey @TommyKlouwers,

Please include links to examples.


#6

@Isaac_Takushi

Correction: we do not pass pageUri right now.

Is this important? We currently send everybody to https://app.troops.ai/signup. That's the only form we're integrating using the HubSpot Forms API.

I just noticed that we do capture the right information in about 20% of all cases.
In 80% of the cases, the web analytics data is empty. E.g. First Page Seen is empty too. Can that be the issue?

I'm not exactly sure what you mean by links to examples. I assume you want to see contacts where the issue is happening, so here are some sample contacts:
https://app.hubspot.com/contacts/4929075/contact/423151/?interaction=note
https://app.hubspot.com/contacts/4929075/contact/410751/?interaction=note
https://app.hubspot.com/contacts/4929075/contact/405551/?interaction=note

Here are some contacts where it does capture everything correctly:
https://app.hubspot.com/contacts/4929075/contact/56501/?interaction=note
https://app.hubspot.com/contacts/4929075/contact/10451/?interaction=note
https://app.hubspot.com/contacts/4929075/contact/384801/?interaction=note


#7

@Isaac_Takushi

Is this everything you need to investigate?

If there's anything I can do to help, please let me know.


#8

Hi @TommyKlouwers,

Apologies for the delayed response. You sent everything I needed.

The three contacts showing "No URL" have only submitted the New form (September 24, 2018 5:12:09 PM) while the three "working" contacts actually converted on different forms before submitting the "New form." The pageUri values passed with these submissions set the contacts' First page seen values. Based on this evidence, the "New form" doesn't seem to be working for any contacts because it doesn't pass the pageUri.

For example, this "working" contact submitted Collected form: .email-form before submitting the "New form." The following property was included in the submission:

{
"name" : "pageUrl",
"value" : "https://info.troops.ai/?gclid=EAIaIQobChMI2N_w2YiD3gIVz7rACh1TOgzzEAAYAiAAEgKIQ_D_BwE&utm_expid=.O_vWpEHoRVGhh3smRe52zg.1&utm_referrer=https%3A%2F%2Fwww.google.com%2F"
}

You'll notice this is the same URL which fills the contact's First page seen property.

This "No URL" contact, on the other hand, only had the following meta data array:

"meta-data" : [
{
"name" : "smartFields",
"value" : ""
},
{
"name" : "requestIpAddress",
"value" : "52.45.161.100"
},
{
"name" : "cloudflareThreatScore",
"value" : "0"
},
{
"name" : "endpointType",
"value" : "AJAX_PUBLIC_API"
},
{
"name" : "hutk",
"value" : "0b4f99d42e69aae2b0d7148444c5d7da"
},
{
"name" : "serverRegion",
"value" : "us-east-1"
},
{
"name" : "ipAddress",
"value" : "4.7.93.101"
}
]

Thus, the first thing I'd recommend is to try including the pageUri parameter in the context object. There's a good example in this article.