APIs & Integrations

Tom_Eaton
Member

Writing Cookie Values to Hidden Form Fields

Our company Youtily would like the ability to write cookie parameters to hidden fields in the same way that we can currently write URL parameters to a hidden field.

We have a landing page where in addition to the form fields we pass google UTM parameters into hidden fields. This is an unbounce page integrated with a hubspot form. We are going to be creating a LP with just a button that redirects to our product page signup funnel. We would like to continue passing the UTM parameters into hidden fields upon button submit, but there will be no email to associate these fields to. the alternative we were considering was to write those UTM’s to cookies, and then capture them later when the user eventually gives us email in the product page signup funnel. let me know if any of that does not make sense.

0 Upvotes
3 Replies 3
Tom_Eaton
Member

Writing Cookie Values to Hidden Form Fields

@pmanca can you verify that the cookie works across sub domains?

Also to clarify, when a user converts it is not in a hubspot form but in our product flow, that DB is synched with SFDC, which is sync’d with HS. How does that arrangement affect what you described?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Writing Cookie Values to Hidden Form Fields

@Tom_Eaton Cookies are domain level based. They will work across sub domains. You would have to make HS aware of the conversion. Since you are using a SFDC form then back-filling HS later we wouldn’t be able to make that connection to bring over the previous data. Could you add a post call to our Forms API in your server side script that feeds the info to SFDC?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Writing Cookie Values to Hidden Form Fields

@Tom_Eaton A contact is created on the back end regardless of whether they convert via an email address or not. When they do finally convert all of the previous actions will be added to them pending they convert via the same cookie that the actions were tracked on originally. If they cleared their cookies then we wouldn’t have that information. If they converted on a different device then those actions wouldn’t be added until they converted on that original device where the cookie is stored. You would run into the same thing with your method. That being said. HubSpot has you covered with what you are trying to do with our JS tracking code. You won’t see the contact in HubSpot until the contact converts but it will be made in the back ground.

0 Upvotes