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.
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.
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.
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.
đ 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.
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.
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