How to pass UTM Parameters in Hidden Fields of Hubspot Form?

Hi, it seems that the UTM Parameters are lost when a visitor goes from one page to another page on our website. I’ve added the hidden fields for UTM parameters to our demo form but these fields are not filled when someone requests a demo because they first visit another page. How can this be fixed? For instance by storing the UTM parameters in the session cookie?

Hi @MHaasjes

What’s the ultimate goal here?

HubSpot stores the original source (first conversion) and latest source (most recent conversion) on the contact record.

These are tied to sessions and the cookie, so as long as the tracking code is installed across all your site that data will be captured automatically.

I hope that helps.

Frank

Hi Frank, the hidden fields are in this Hubspot form Fordern Sie eine kostenlose Demonstration an | Ed Controls, but when I use a campaign URL from Linkedin such as https://edcontrols.de/referenzen/digitale-aufnahme-von-aktionspunkten/?utm_medium=cpc&utm_source=Linkedin&utm_campaign=DE±+Dexport±+Awareness±+bouw±+Sales+Funnel&hsa_acc=503559675&hsa_cam=631751443&hsa_grp=216878913&hsa_ad=249875663&hsa_net=linkedin&hsa_ver=3&li_fat_id=bb5636af-2b5e-4b2d-9607-5491ef758d64 and then go the demo page, the UTM Parameters are not added to the Hidden Fields.

Hi @MHaasjes,

If cookies are accepted, HubSpot stores the parameters in cookies. Upon form submission, this is automatically passed on into the original source properties: Understand Original and Latest traffic source properties

The parameters stored in the cookie are not passed into hidden form fields. This is expected behavior and can, as far as I know, not be changed. Cookies set in your visitor's browser by HubSpot

Hidden parameter fields on forms are only populated if the parameters are available on the page that the visitor both lands on and submits the form, see here: Pass contact property values with hidden form fields

Best regards

Hi Karsten, i found this answer on the forum: https://community.hubspot.com/t5/Lead-Capture-Tools/Passing-UTM-parameters-to-a-visitor-s-cookie-and-writing-them-to/m-p/502859#M6526
My conclusion was that it might be possible to pass on the parameters to the next page.

Hi @MHaasjes,

With custom development yes. I was referring to HubSpot’s out of the box behaviour.

We’ve recently started using a tool called Attributer.io to do this.
Basically, when someone lands on your site it stores the UTM parameters in their browser. Then when they complete a form on your site, it writes the data into the hidden fields.
Then when someone submits the form, that data is captured with the form submission and stored on the contact record.
It also capture organic data (like if someone comes from organic search or organic social) which has been useful because we get less than 10% of our leads from paid ads, so we would have had a lot of leads with no data otherwise.