Question

Typeform Google Analytics cross domain tracking


Hello there, I ‘m using an embedded form in my website, and I would like to track the whole user journey - form the website to the form completion (it’s a sale process) - and I need to track source conversions (i.e. sources of users that land in my website and convert/buy).
I think what I need is to setup a cross domain tracking, but it’s seems not possibile with Typeform if I get it right.
Do you have any suggestion/workaround?

Thank you very much,

Pietro


16 replies

Userlevel 7
Badge +5

Hi @Tenente - thanks for stopping by! Great question. Our tech team let me know they have a ticket open with you to look further into this. If you have any updates from them, we’d love for you to share here in case anyone else has the same question!

Userlevel 7
Badge +5

Hi @Tenente ,

Yes! Please share updates as I’m curious on how this works for you, too. It’s the customer journey content marketer in me :)  

Userlevel 7
Badge +5

Hi @Tenente Did you happen to hear back from the tech team? :grin:

Hello, I am experiencing the same problem and have not been able to find a solution despite multiple attempts. Seems better to post in this thread rather than start a new one. I’m using Google Tag Manager on my WordPress site, and I am embedding the typeform on my site using the html snippet provided in this Github pull request.

All of the events are coming through correctly, but the typeform still triggers a new direct source session regardless of utm or google tracking parameters. We really need this to come through as a single session or else we lose all ability to track conversion acquisition, as well as behavior from converters.

I have tried both the verbatim snippet from the link above (substituting the form ID for my own of course), as well as a modified snippet that passes relevant url parameters from the parent page. The latter solved the acquisition tracking problem, but it still triggers two sessions. Any help would be appreciated!

The embedded form can be found at https://www.impactree.com/ if you’d like to take a look.

Userlevel 7
Badge +5

Hi @i.tree Thanks for stopping by! I took a look at the code on the site, but it doesn’t look to be passing the hidden fields correctly. You’ll want to follow the steps below in order to pass in the UTM parameters. 

 

 

Let me know if this doesn’t work for you!

@Liz  I don’t see the right-hand panel with utm tracking settings in my Typeform. Is this feature available with the Essentials plan?

Will this fix the two-session issue? We have already developed a way to pass the necessary parameters (although not currently deployed). What we are lacking is a way to create only a single session when someone visits a page with an embedded typeform (instead of a session for our website and a session for the typeform).

Userlevel 7
Badge +5

Hi @i.tree Do you mind sharing a screenshot of your builder? I can then point out where to add hidden fields. :grin:

As for the two-session issue, I’m afraid this doesn’t solve that issue, as we don’t have a way to track cookies from your site into the embedded Typeform, but I can share this feedback with product. 

Hi @Liz, here is a screenshot of our builder

 

Are you sure there’s no way to stitch the sessions together? According to @mathio in this thread, the data-share-google-analytics-instance attribute should connect both sessions into one. I have this attribute enabled, and I can see its corresponding parameter in the iframe url, but I’m still seeing two sessions in GA.

If you would like to take a look at the script again, I have updated it to pass utm and other relevant parameters. I’m using a custom script as opposed to the data-tf-transitive-search-params attribute because this attribute is not available in embed v0 (/embed.js). I have to use embed v0 because the data-share-google-analytics-instance attribute is not currently supported in embed v1 (/next/embed.js). Can your dev team check to make sure the data-share-google-analytics-instance attribute is actually working properly?

Last thing: I am also using a customTask script in GTM to pass the _ga cookie to the iframe via url parameter (I followed this tutorial). The _ga= param is getting passed to the iframe url, but no luck, still two sessions. Does the embedded typeform block third party cookies?

Userlevel 7
Badge +5

Hi @Tenente Thank you! Under the welcome screen, if you click the + button, you’ll be able to add hidden fields there. :) 

You’ll first want to add the hidden fields to your form, and then I’m happy to take another look at this if the same issues are occurring. 

As for the other pieces, I’m afraid I’m not terribly familiar with Google Analytics and passing data through our Embed SDK, but @mathio might have a bit more of an answer for you!

Userlevel 7
Badge +5

If you use Typeform Embed Library v1 you can use shareGaInstance attribute (data-tf-share-ga-instance if you use HTML snippet).

When you include this attribute in your embed code the lib will read the GA instance from your page and send client id to your typeform. Eg:

<div data-tf-widget="<form-id>" data-tf-share-ga-instance></div>
<script src="//embed.typeform.com/next/embed.js"></script>

Please let us know if this worked for you.

Has the data-tf-share-ga-instance attribute actually worked for anyone?  I have tried it with about 10 different variations of code and it does not work.

Userlevel 7
Badge +5

Hello @Focus Now , here is an example that works for me and shows correct numbers in my Google Analytics account:

https://glitch.com/edit/#!/angry-free-hell?path=index.html

When I view the Glitch site I see 1 visitor on page with the data-tf-share-ga-instance option. When I remove it I see 2 visitors (1 from the page, 1 from the form).

Hi @mathio ,is it possible to use this attribute to pass GA client id as a hidden field on Typeform?

Thank you!

If you use Typeform Embed Library v1 you can use shareGaInstance attribute (data-tf-share-ga-instance if you use HTML snippet).

When you include this attribute in your embed code the lib will read the GA instance from your page and send client id to your typeform. Eg:

<div data-tf-widget="<form-id>" data-tf-share-ga-instance></div>
<script src="//embed.typeform.com/next/embed.js"></script>

Please let us know if this worked for you.

 

I raise the subject concerning double views on pages and forms. I'm using typeforme with popups but even with data-tf-share-ga-instance I still get the double views. Please provide us with a reliable solution otherwise we risk choosing a solution other than typeform. Thx
 

 

 

Userlevel 7
Badge +5

Hi @AntoineLi Thanks for stopping by the community. This is expected behavior, but you can read more about segmenting them here

Badge

Hey all!

I’ve developed a customized version of Typeform tracking.

Here’s the details if some of you want to give it a try.

https://www.linkedin.com/pulse/solving-frustrations-typeform-gagtm-tracking-elegant-giovani/

Reply