Jotform & Google Tag Manager Explained (2024)

Looking to integrate Jotform with Google Tag Manager and track Jotform conversions, sending events to tools like Google Analytics (GA4), Google Ads, Facebook Pixel and others. Google Tag Manager is the industry-standard (and free!) tool to do just that. However, integrating Jotform with Google Tag Manager is quite difficult. Or, it was until we made Jotform and GTM integrations easy.

Make sure to also check my blog post on Jotform Conversion Tracking Methods

Let’s dive in!

Jotform Google Tag Manager - Pre-built setup

The quickest and easiest way to use Google Tag Manager with Jotform is to buy a pre-built Jotform Google Tag Manager setup.

Our Jotform Google Tag Manager setup has 14 tags, 2 triggers, 25 variables and one template. I took about 4 weeks to make the Jotform Google Tag Manager perfect, with over 10 years of experience.

For reference, if you would buy this exact Google Tag Manager setup, tailor-made from scratch as freelance work, it’d cost $2500-4000. But you can now get it for a fraction of the price.

Screenshot of a pre-built Jotform Google Tag Manager container, showing 14 different tags, like Google Analytics 4, Google Ads, Facebook Pixel and more

Why Jotform & Google Tag Manager integration is hard?

The challenge of tracking Jotforms with Google Tag Manager is because Jotform is (usually) an iFrame. It’s a window to another website. It looks like a part of our website, but it’s not. We have no access to Jotform iFrame, and don’t know what happens inside. This is good. Many iFrames may for example collect credit card information and other websites shouldn’t be spying on that.

But this also makes iFrame conversion tracking, like Jotform tracking, technically difficult.

Some tools like Typeform have an option to add a Google Tag Manager inside the form. Google Tag Manager inside the iFrame. In my opinion this is always a terrible idea. We don’t want to send conversions from another domain. But it may make things easier. Jotform doesn’t have such an option.

So we are left with a few options: listen for a message from the Jotform iFrame, redirect back to a page in our website and track conversions there, or embed Jotform as a “Source Code” embed instead of an iFrame, and use a Google Tag Manager form trigger. The source code embed is also a terrible idea. More on that later.

How to integrate Google Tag Manager with Jotform?

There are four main ways to integrate Jotform with Google Tag Manager.

Method 1)

The best (not the easiest) way is to use redirect and URL parameters.

How does it work? We’ll use Jotform redirect to an external page feature, add the form fields and submission ID as parameters to the URL, then use Google Tag Manager to check if the URL contains a submission ID.

Jotform Google Tag Manager funnel, showing each step of the process from redirect, to url parameters to data layer to triggers, google ads, google analytics and facebook pixel with PII cleanup, unwanted referrers and Google Ads enhanced conversion

Each Jotform submission has a unique submission ID, which is important to prevent duplicates. Duplicates often happen with this method, because visitors accidentally refresh that thank you page, firing two conversions for one Jotform booking.

We will store the unique Jotform submission ID as a browser cookie or in the local storage. We check the URL for a submission ID, we compare the ID to any ID in our local storage, and if it’s a new one we will populate our data layer with the Jotform URL parameters, push a custom event to the Google Tag Manager data layer, use a custom event trigger (from the data layer) and use this GTM trigger to fire our custom conversion tags, like GA4, Google Ads, Facebook Pixel etc.

We will also need to clean up PII (Personally Identifiable Information) from our URL for Google Analytics, and figure out a way to exclude jotform.com as an “unwanted referrer”. My Jotform Google Tag Manager setup uses a trim query template which will clean up the URL

My Jotform GTM setup also has a custom Javascript variable, that’ll check if the referrer (previous website) contains “jotform.com”, and if it does it will add the ignore_referrer = true parameter to both Google Analytics 4 Google Tag, and Google Analytics 4 event.

If you use Google Tag Manager, the reason is often that you want to send Google Ads conversions. My prebuilt Jotform + Google Tag Manager setup makes this ~8% more accurate than normal Google Ads conversions, because it has the Google Ads Enhanced Conversions built-in. The Jotform redirect to an external page is the only way we can access the Jotform field values such as email, phone number, address, name etc. so the redirect with URL parameters is needed to get the most accurate Google Ads conversion tracking.

Phew! A lot of work just to integrate Jotform with Google Tag Manager! No wonder this took me over a month :)

👀 You can buy this super complex setup and install in minutes. This is the Advanced Redirect Version of my pre-built Jotform Google Tag Manager setup.

Method 2)

Method two is simpler. It’s easier to do. It’s also little bit cheaper — if you get the pre-built Jotform Google Tag Manager setup.

The only downside is that we cannot access Jotform field values.

Screenshot of a Google Tag Manager Jotform funnel, using JavaScript window.addEventListener to trigger Google Analytics, Google Ads and Facebook Pixel events



Method 3)

Method three is a simplified version of the best method. I do not really recommend this method. If you don’t care about URL parameters, Method 2 is better. If you want Jotform URL parameters, you should use the first method.

Flowchart of Google Tag Manager Jotform tracking setup, using a redirect and a page view listener.

👎 This method will provide inaccurate data due to duplicates.

I was confused as to why this method produces inaccurate data. It seemed unlikely that visitors would refresh our thank you page. But then I realised, that the reason is probably mobile browsers like iOS safari, refreshing the last page when opened again after a while. So if the visitor filled the Jotform, closed their browser. Then next day open the browser, it will refresh the last page.

This does not happen on desktop, but mobile devices will try to save memory or something, and will close the website and reload when opening.

BIG PROBLEM!

👎 This method will lead to bad referrers and messed up data in GA4

Another issue is that the Jotform redirect will add jotform.com as a referrer in Google Analytics. This means, that GA4 may think that jotform.com, which “referred” the visitor to our thank you page, was the original traffic source 🆘. Our Google Analytics reports will look like a mess.

Method 4)

This method is the worst one. It’s unfortunately the only one Jotform has a tutorial for. Full tutorial here, but do not waste your time. I only include this in the list, because you should know to avoid this one. Jotform recommends it, but it’s terrible.

Method 4 uses the Jotform source code embed instead of iFrame.

Screenshot of a Jotform Google tag Manager flowchart, using source code embed and GTM form submit trigger, leading to issues like Google Ads tag not firing correctly

This allows us to use the regular Google Tag Manager form submit trigger, and track our Jotform conversions the old way. This seems like a great solution, but it’s terrible because the Jotform source code embed will always immediately redirect us away from our website.

This is bad because of two reasons

Google Tag Manager conversion tags do not have enough time to send data!

The redirect is so fast, that some Google Tag Manager tags don’t have enough time to fire correctly. For example, the Google Ads conversion tags get stuck at “Still running” instead of showing “Fired”. In my testing, the Google Analytics 4 tag seems to work, but there is no point in using Google Tag Manager to only send Google Analytics events. There are easier ways if you only need Google Analytics. But you are looking for info on Jotform and Google Tag Manager, so you want to be able to use any Google Tag Manager tags, not just the GA4 event tag.

Jotform Google Tag Manager screenshot, Google Ads tag stuck at "Still running" firing status due to too fast Jotform redirect

Our user experience gets weird (and ugly)

If you use the custom message, the Source Code embed will redirect us away from our website, to jotform.com/whatever. This looks ugly and is a weird “dead end” to send visitors into. No benefit.

But if you redirect back to your website, you might as well track conversions there with no issues.

Wrapping up…

Integrating Jotform and Google Tag Manager is hard! Even professional developers struggle with tracking Jotform conversions. A lot of my clients who have hired me to implement Jotform conversion tracking have said they've had issues for years.

Non-technical marketers have an even harder time.

I recommend hiring us to integrate your Jotform with your Google Tag Manager properly, or buying the pre-built Jotform Google Tag Manager setup.

Why buy a prebuilt GTM container?

You’ll love getting a complex GTM setup in just one click. Imagine importing weeks of hard work, hours of deep research and testing, and dozens of lines of complex JavaScript coding — in seconds.

You can buy a tracking setup that would cost thousands of dollars from a senior GTM specialist. But you don’t even have to wait until a freelancer has time in their calendar. It’s instant.

Remember, your time is a valuable asset you can never get back.

Cheers!

-ct

Previous
Previous

Acuity Redirects & Conversion Tracking - Summary 2024

Next
Next

Jotform Conversion Tracking – 7 methods ranked best to worst