Answered

Cross-Domain Tracking For Embedded Typeform using Google Tag Manager

  • 9 September 2022
  • 13 replies
  • 1291 views

Hello there

Context: 
We use Typeform as our main lead generator in our website, from Ebook Downloads to more Complex Calculators for Automated Quote for Clients. 

We use Google Analytics 4 and Google Tag Manager is installed correctly in all Typeforms. 

Problem: 
We can't track conversions correctly on GA4, because TagManager associate a different Client_ID to the form, so our conversion path in our traffic report is full of "Direct" traffic. Therefore it counts twice the same user on our page when Typeform loads on our homepage, one from the correct Source/Medium and other from "Direct". When a user submit a form, we get the event "TypeformSubmit" on TagManager Preview mode, but not on DebugView on GA4, which means that this event/conversion is not being tracked as the same user on GA4.

This is screwing our AdWords campaign because there is never a conversion coming from those forms and Google AdWords doesn't know what to optimize for. 

Details:
We are struggling badly with Typeform embedded in our website for Cross-Domain tracking on Google Analytics 4. 

In summary, since Typeform doesn't have native integration with GA4, but only with GTM, It fires the events on TagManager Preview Mode, but it doesn't show on GA4 Debug View. 

It doesn't get the Client_ID from our website and I am not sure what to do. I looked for several solutions online for cross-domain tracking of embedded iframes, which actually worked for other embedded services like Calendly.com (which we were having the same problem), but it doesn't for Typeform.

The embedded form acts like a separate page completely. 
 

This is a bit frustrating because we don't know what else to do. Does anyone have a solution for this?

References:
https://www.simoahava.com/analytics/cookieless-tracking-cross-site-iframes/#solution-2-forward-all-data-layer-messages-from-child-to-parent
https://www.simoahava.com/gtmtips/write-client-id-other-gtag-fields-datalayer/

icon

Best answer by FernandoAP 15 September 2022, 17:46

View original

13 replies

Userlevel 7
Badge +5

Hi @FernandoAP Welcome to the community. 😀 Since we don’t have cross domain tracking functionality built within our embedded forms, you will need to use hidden fields to pass information in. Our lovely tech support team created a video here that can walk you through this. 

Hi Liz, I think I've watched this video before (or another version of it). I tried to use the feature to dynamically pass UTM from URL to Typeform embedded form. Problem is that this doesn't really help, because at the moment the user navigates from the landing page to a different page, the UTM strings (if they came from AdWords for instance), are lost. Plus doesn't solve the problem of double counting visitors on Google Analytics due to different Client_ID being assigned by Google to Typeform. 

I even hired a couple of professional Google Tag Manager specialists and they both told me this is a problem with Typeform for years and you guys still didn't build a technical solution for it. So I gave up using Typeform embedded completely. 

Userlevel 7
Badge +5

Hi @FernandoAP Are you passing the UTM variables throughout all the pages? 

Hello,

we are successfully tracking iframe embedded Typeforms on a website in Plausible Analytics. We use 2 GTM containers to achieve this: One in the Typeform and one in the parent website. Through this we get the correct source etc shown for the Typeform in Plausible. Also the conversion tracking is working through the event TypeformSubmit.

BUT we get some really strange goal conversions on top shown in Plausible. Those “wrong” goal conversions get the page path (none) or “/render2” instead of the Typeform page path.

We have no idea, where those come from. Any ideas? The “render2” path seems striking but we are not finding anything about it.

Thanks for help! 

Userlevel 7
Badge +5

Hi @mke Could you share the URL where you have the form embedded? Thanks!

e.g. here https://www.elunic.com/de/industrie-4-0-iot-softwarebaukasten-shopfloor-io/asset-management/

Userlevel 7
Badge +5

Thanks, @mke ! I took a look at the code, but I don’t see the UTM parameters in the code, which is necessary if you want to have that data pass into the form. 

 

If you embedded the form a while ago, you would have had to manually add these fields in, but now we automatically include them in the embed code. 

The first thing to check would be that you have added these fields as hidden fields in your form. If so, then I would re-embed the code to see if that solves the issue. 

Hello @Liz,

i think we are not talking about the same thing. Sorry if I was not precise. We ARE getting the right UTM source etc. shown in Plausible.io as we are sending the Typeform goal conversion from the parent website to Plausible, not from the embedded Typeform. This works via the 2 GTM containers.

The only problem is really that we are getting those strange goal conversions with page path “(none)” and “/render2”. Those are not in a time-wise relation to real goal conversion and come from the US.

Maybe this screenshot helps to understand better.

 

Userlevel 7
Badge +5

@mathio have you seen anything like this? 

Userlevel 7
Badge +5

I am sorry, but I have no experience with Plausible Analytics. I am also not familiar with those page paths. However I dont think those values are coming from typeform as we do not serve the form on such URLs.

Badge

@mke can you explain in more detail how you set up your solution with 2 GTM containers? We are having the problem of attributing traffic to the same user -- we have a Webflow landing page with an embedded Typeform. Thanks!

@FernandoAP 

Here is the solution to you are looking for and which is common among companies using various tools across their funnels and feed their Ad Platforms with conversion data.

For example, a classic funnel can be:

  • Landing page on ClickFunnels
    • Tracking Events - PageView, ViewContent, Scroll, Next Page
  • Typeform Embedded + Redirect to Calendly
    • Tracking Event - ViewForm, InitiateForm, FormSubmit
  • Calendly
    • Tracking Event - Redirect, Meeting Booked
  • Hubspot CRM - Sales team interacting with leads, customers
    • Tracking Event - Lead, Sales Qualified Lead, Meeting Success
    • CRM Events - Deal, Customer Lifecycle, etc… 
  • Stripe Payment
    • Tracking Event - Purchase, Recurring Payment etc… 

Since most of these events are considered “offline” you need to tie the Client Side Data from your initial Landing Page hit with the events happening in your downstream tools.

Cross domain tracking is what Apple, safari, firefox try to prevent with their ITP, ATT, ETP - Tracking Protection: Cross Site tracking.

Essentially their mission is to prevent you from using cookies and / or anonymousid to identify the same user across multiple websites. That’s perfect to prevent third party trackers, but very annoying when you actually own the websites. 

The way this prevention happens, is simple - every time a user moves from website to website, a new ClientID (the Cookie) is issued by the tracking tag.

So unless you have the technology in place to tie all Client IDs with a single identifier, you can’t track the user - even if you control all websites that are on the way to the conversion.

The only way to actually track Typeform embedded forms is to tie Client Side tracking data generated on your landing page, and the server-side events & data you set in your tools.

While there is certainly a way to achieve this using GTM, Zapier, GTM server container it seems that even with templates and detailed guides from GTM master simoahava, it’s an over complicated journey.

My company recently released a direct integration with typeform which enables this type of tracking scenario. I created a small demo that demonstrates the following:

  1. Visit landing page
  2. Regular embedded typeform - one field
  3. Recall the AnyTrack Click ID through the form
  4. Recall the Click ID on the Calendly Link redirect
  5. if you fill the form you will receive your conversion data via email to see how it can look like on your end.

The URL below contains standard UTM parameters which you can update to reflect what you want and you’ll see these values in the email you’ll get from me.

https://typeform.carrd.co/?utm_source=google&utm_medium=cpc&utm_campaign=typeform-campaing&utm_term=cross-domain-tracking&utm_content=typeform-cross-domain&gclid=selfgeneratedgoogleclickid

Let me know if you have any questions / or need some clarifications.

 

Badge

Hello 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