Question

Typeform - HS source tracking doesn't work for multi-page journey

  • 8 December 2022
  • 6 replies
  • 64 views

Hi there, 

I have recently set up Typeform and integrated it with Hubspot to track lead sources. Typeform is embeded on /apply page using data-tf-hubspot tag as per https://www.typeform.com/help/a/set-up-source-tracking-for-hub-spot-4413167079316/

 

And this works if the lead converts right away. For example: a lead clicks on an ad with a url: domain.com/apply?utm_source=”xx” and converts. This lead will be correctly attributed to source “xx”. 
 

But if the lead lands on the domain.com/case-study?utm_source=”yy” page and then navigates to /apply page and converts, this lead will be attributed to direct traffic, which is not correct. 

The ?utm_source=”yy” should be stored in Hubspot cookie but it doesn’t seem to be passed on to Typeform in this case.
 

Are there any additional steps needed to retrieve it from the cookie?


6 replies

Userlevel 7
Badge +5

Hi @alexIntegration Do you have the URL where you have the form embedded that you can share? Thanks!

Hey @Liz, so this version will work as this goes directly to the page where the form is embedded with UTMs: https://www.g2i.co/typeform-test?utm_source=test&utm_medium=test&utm_term=&utm_content=&utm_campaign=test

This version will not work as once you click the button it will navigate to the page that has the form embedded. https://www.g2i.co/testing-typeform-page2?utm_source=test2&utm_medium=test2&utm_term=&utm_content=&utm_campaign=test2

I’m guessing the issue is that UTMs are not there anymore. Is there a solution to make this work with cookies?

Userlevel 7
Badge +5

Hi @alexIntegration Ah, I see. You’ll need to pass the data from one source to another, and @mathio may have some ideas on how to get this working for you. 

Thanks @Liz! @mathio would appreciate any suggestions you have. 

I have built a manual a script previously to capture UTMs on a page then store them inside a cookie which then prepopulates the typeform but this data is not stored in original source drill downs on Hubspot. Not sure if you have a workaround for it.

Userlevel 7
Badge +5

I will try to replicate the issue and see if the issue is with Typeform embed. I will update you when I have more info. Currently I have no more info on this, sorry.

Userlevel 7
Badge +5

I found this JavaScript code in your page:

document.cookie='hubspotutk=;domain=.typeform.com;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;'

I am no expert on Hubspot, but it looks like you clear the cookie value here. Is this intentional? Could this be causing the issue that the value is not preserved in Hubspot cookie?

Reply