Reporting & Analytics

varunaiq
Teilnehmer/-in

UTM parameters disappear when a user visits multiple pages before form submission

lösung

Hi, I recently set up UTM tracking on our most popular forms (I followed these steps: https://community.hubspot.com/t5/APIs-Integrations/Utm-source-on-contact/td-p/238303). As a result, if a user visits a page with a form through a UTM URL and submits the form, the UTM parameters get captured as the contact's properties.

 

However, if a user visits a page through a UTM URL and then navigates to another page on the website with a form, the form submission is unable to capture the UTM data. Here is a sample activity of a user like this:

 

1. Visits my homepage through a URL that has UTM parameters

2. Clicks on the 'Resources' button and navigates to a page with multiple resources

3. Selects a particular resource and proceeds to the download page with an embedded form

4. Fills up the form

 

In this process, the UTM parameters are intact at step #1. However, as soon as the user proceeds to step #2, the UTM parameters disappear. As a result, after the form submission, the contact's UTM properties are not updated on Hubspot.

 

Is there a way to preserve the user's original UTM parameters while he/she navigates through multiple pages on the website? And then capture this original UTM data when they fill up a form?

1 Akzeptierte Lösung
MatthewShepherd
Lösung
Autorität

UTM parameters disappear when a user visits multiple pages before form submission

lösung

Hi @varunaiq 

Yes, a form will only be able to grab UTM parameters from the URL if it is on the first page the visitor lands on after clicking your tracked URL. After that, it is expected that your UTM parameters wouldn't be present by default as the visitor continues to navigate your site.

The solution would be to use javascript to store your UTM parameters in a cookie on the first page and then have your Hubspot form check for and populate those parameter values into your forms hidden fields.

These threads discuss some options to do this: 
https://community.hubspot.com/t5/APIs-Integrations/Pass-cookie-information-to-the-form/td-p/238073

https://community.hubspot.com/t5/APIs-Integrations/Capture-cookie-info-with-hidden-form-fields/m-p/2...

https://community.hubspot.com/t5/CMS-Development/Help-Javascript-Snippet-Google-Tag-Manger-to-fill-h...

 

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
MatthewShepherd
Lösung
Autorität

UTM parameters disappear when a user visits multiple pages before form submission

lösung

Hi @varunaiq 

Yes, a form will only be able to grab UTM parameters from the URL if it is on the first page the visitor lands on after clicking your tracked URL. After that, it is expected that your UTM parameters wouldn't be present by default as the visitor continues to navigate your site.

The solution would be to use javascript to store your UTM parameters in a cookie on the first page and then have your Hubspot form check for and populate those parameter values into your forms hidden fields.

These threads discuss some options to do this: 
https://community.hubspot.com/t5/APIs-Integrations/Pass-cookie-information-to-the-form/td-p/238073

https://community.hubspot.com/t5/APIs-Integrations/Capture-cookie-info-with-hidden-form-fields/m-p/2...

https://community.hubspot.com/t5/CMS-Development/Help-Javascript-Snippet-Google-Tag-Manger-to-fill-h...

 

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
varunaiq
Teilnehmer/-in

UTM parameters disappear when a user visits multiple pages before form submission

lösung

Thanks a lot, Matthew. Appreciate the prompt response. Let me share these resources with our dev team. I'll share an update on this thread if this solution works!