Issue with getting form submissions cookie'd correctly

forms

#1

We have implemented the code as per the below link

In the following forms


As per my client we are getting the following issue

We are having issues with Cookie’ing users after they fill out the forms located on the above forms.

http://bpm-supreme.d.pr/s7OOfm

It seems that on the above screenshot there is an issue with the API call. Can we look into it?

The main thing we want is to make sure we are Cookie’ing users so we can follow them throughout the website.

Yes, when they users fill out the forms they are getting in our contact records, but the cookie will help us deduplicate and track these users when they navigate across the website.

There currently is an issue with the Forms API. It should be adding a Cookie to the user’s browser history, but it is currently failing as reflected here: http://bpm-supreme.d.pr/s7OOfm

Can you please look into this and let me know the solution


#2

Hi @anil.sharma,

I checked the links to you posted (thanks for the detail) and it seems like cookie is getting dropped in the visitor’s browser correctly. What appears to be missing is the association between the cookie and the email address. Do you have an example of the POST body you are sending into HubSpot?

I believe the messages error may be related (it’s a symptom of not being able to associate the cookie to a contact record) but is not the root of the problem.

-Zack


#3

Hi @zwolfson

Here is the example of post body we are sending into HubSpot:

full_name=New+Testuser&email=newtestuser%40netsolutions.in&hs_context=%257B%2522hutk%2522%253A%252282e1dbcdeafb6d0314189f369ec707b4%2522%252C%2522ipAddress%2522%253A%2522111.93.124.228%2522%252C%2522pageUrl%2522%253A%2522https%253A%255C%252F%255C%252Fbpmsupreme.com%255C%252F%2522%252C%2522pageName%2522%253A%2522BPM%2BSupreme%2522%257D

Thanks


#4

Hey @anil.sharma,

It looks like the hs_context is getting double encoded which is why the cookie isn’t getting associated properly. Then end result should look more like:

full_name%3DNew%20Testuser%26email%3Dnewtestuser%40netsolutions.in%26hs_context%3D%7B%22hutk%22%3A%2282e1dbcdeafb6d0314189f369ec707b4%22%2C%22ipAddress%22%3A%22111.93.124.228%22%2C%22pageUrl%22%3A%22https%3A%5C%2F%5C%2Fbpmsupreme.com%5C%2F%22%2C%22pageName%22%3A%22BPM%20Supreme%22%7D

-Zack


#5

Thanks, @zwolfson this fixed my issue.