Skip to content

GA4Published 16 min read

Jotform Conversion Tracking in GTM: GA4, Google Ads, Meta

How to track embedded Jotform submissions in Google Tag Manager with the iframe submission-completed message, then send them to GA4, Google Ads and Meta without double counts.

Muhammad Qitmeer, founder of Augere Labs
Muhammad Qitmeer
Co-founder and CEO, Augere Labs
Share

For Jotform conversion tracking in GTM, add a Custom HTML listener on the page that holds the form, catch the submission-completed message the embedded Jotform iframe posts to the parent page when the Thank You page loads, and push a jotform_submit event into the dataLayer. Then fire your GA4 event, Google Ads conversion and Meta Lead event from one Custom Event trigger on that event. GTM's built-in Form Submission trigger only works when the form is pasted in as full source code, not on the default JavaScript or iframe embeds.

This is for agency owners, PPC managers and developers who track lead forms that clients built in Jotform. It covers how each embed type behaves, the message the iframe sends, a listener you can paste, GA4 key events, Google Ads conversions, passing gclid and UTMs into hidden fields, the Meta Pixel, the redirect method, and how to test all of it. The embed behavior described here was checked against Jotform's help center and its current embed handler script in November 2026.

Which Jotform embed type is the client using?

Check the embed type first, because it decides which tracking method can work. Open the page with the form, right click the form and inspect it. If you see an iframe with an ID like JotFormIFrame- followed by the form number, it is an iframe based embed. If you see a plain form element with Jotform field markup directly in the page, it is the source code embed.

Jotform's Publish tab offers several embed options. Their own guide to which form embed code to use describes them, and for tracking they fall into two groups.

Embed typeWhat lands on the pageCan GTM see the fields?Tracking method that works
JavaScript (the default)A script that loads the form inside an iframe and resizes itNopostMessage listener
iFrameAn iframe tag plus a small handler scriptNopostMessage listener
Lightbox, Feedback ButtonThe form opens in a modal, still in a frameNopostMessage listener, test it
Pop-upA link that opens the form in a separate browser windowNoRedirect to a thank you page on your site
Source CodeThe full form HTML and scripts inside your pageYesGTM Form Submission trigger or a custom listener
Direct link to jotform.comNothing on your site, the visitor leavesNoRedirect to a thank you page on your site

Most client sites use the JavaScript or iFrame embed, because that is the default and it updates automatically when someone edits the form. The source code embed gives you full access to the markup, but Jotform notes you have to paste the code again every time the form changes. Clients rarely remember to do that, so do not switch a client to source code just for tracking unless they agree to that maintenance.

Why doesn't the GTM Form Submission trigger work on Jotform?

Because on the JavaScript and iFrame embeds, the form lives in a document served from a Jotform domain, and GTM on your page cannot see events inside a cross-origin iframe. The submit happens inside the frame. Your container never gets a gtm.formSubmit event, so a Form Submission trigger stays at "Not fired" no matter how you configure it.

Jotform's own GA4 help article uses the Form Submission trigger, and it states that the setup works for forms added with the source code. Many of the complaints in its comments come from people trying the same steps on an iframe embed. If you are fixing a "GTM not tracking Jotform" ticket, this mismatch is the first thing to check. Our general guide to form tracking in Google Tag Manager covers why click and submit triggers fail on embedded third party forms in general.

Even on a source code embed, the built-in trigger is not perfect. Jotform runs its own validation in JavaScript, and the form posts to Jotform's servers, so the browser leaves your page right after the submit. If you use the Form Submission trigger there, turn on Check Validation and Wait for Tags, and limit it to Some Forms where the Form ID equals the Jotform form number.

What postMessage events does a Jotform iframe send?

When a submission goes through and the Thank You page loads inside the frame, the Jotform form posts a message to the parent window with an action of submission-completed. Jotform support has confirmed this action name in its answers, and the message object also carries the form ID as formID. That is the signal to track.

A few things about that message matter for tracking:

  • It has no field values. The message tells you which form was submitted, not what the visitor typed. You cannot read the email or phone number from it, so it cannot feed enhanced conversions by itself.
  • It has no submission ID. There is nothing unique per submission in it, so you need your own guard against duplicates.
  • Jotform sends other messages too. The same frame sends plain string messages for resizing, such as setHeight: followed by a number, and scroll messages. Your listener has to ignore everything except the completion message.
  • The origin varies. Forms can load from form.jotform.com, www.jotform.com, the EU domain jotformeu.com, HIPAA subdomains, or an Enterprise custom domain. A listener that only checks for jotform.com silently misses EU and Enterprise forms.

Before you build anything, confirm the message on the client's actual form. Open the browser console on the page, paste window.addEventListener('message', function (e) { console.log(e.origin, e.data); });, submit a test entry and look for the object with action: "submission-completed". Note the exact origin it came from. That two minute check saves you from guessing.

How do you set up Jotform conversion tracking in GTM step by step?

You build one listener tag, one trigger and then one tag per platform. Here is the full order.

  1. Create the listener tag. In GTM, add a Custom HTML tag with the code below. Fire it on a Page View or DOM Ready trigger limited to the pages that hold the form, or on All Pages if the form appears in many places.
  2. Create a Data Layer Variable. Name it DLV - jotform_id with the Data Layer Variable Name jotform_id.
  3. Create the trigger. Add a Custom Event trigger with the event name jotform_submit. If the site has several Jotforms and only one is a conversion, set it to fire on Some Custom Events where DLV - jotform_id equals that form number.
  4. Add the GA4 event tag. Use a Google Analytics: GA4 Event tag with your Google tag or Measurement ID, event name generate_lead, and an event parameter form_id set to the variable.
  5. Add the Google Ads conversion tag. Use a Google Ads Conversion Tracking tag with the Conversion ID and Conversion Label from a manually created website conversion action. Make sure a Conversion Linker tag fires on All Pages.
  6. Add the Meta Lead tag if the client runs Meta ads, covered further down.
  7. Preview, submit a real test entry, then publish. Delete the test submission in Jotform afterwards so the client's inbox and CRM stay clean.

Here is the listener. It checks the origin against Jotform's domains, ignores the resize strings, and only pushes once per form within a few seconds, as a safety net if the listener ends up installed twice or the message repeats.

<script>
  (function () {
    // Jotform domains. Add the client's Enterprise domain if they use one.
    var JF_HOST = /(^|\.)(jotform\.com|jotformeu\.com|jotform\.ca|jotform\.us|jotformpro\.com|jotform\.pro|jotfor\.ms)$/i;
    var lastFire = {};
  
    window.addEventListener('message', function (e) {
      var host;
      try { host = new URL(e.origin).hostname; } catch (err) { return; }
      if (!JF_HOST.test(host)) return;
  
      var data = e.data;
      if (typeof data === 'string') {
        if (data.charAt(0) !== '{') return; // resize and scroll messages
        try { data = JSON.parse(data); } catch (err) { return; }
      }
      if (!data || data.action !== 'submission-completed') return;
  
      var formId = String(data.formID || 'unknown');
      var now = new Date().getTime();
      if (lastFire[formId] && now - lastFire[formId] < 5000) return;
      lastFire[formId] = now;
  
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        event: 'jotform_submit',
        jotform_id: formId
      });
    });
  })();
  </script>

The listener has to be on the page before the visitor submits, which it will be if it fires on page load. It does not need to fire before the iframe loads, because the message only comes after a submit.

One note on the duplicate guard: it stops repeat messages within five seconds, not a second real submission a minute later. That is fine. If the visitor genuinely submits twice, both are real submissions, and Google Ads can count one per click if you set the conversion action's Count setting to One.

Sending it to GA4 and Google Ads

Send a stable event name to GA4, mark that event as a key event, and fire the Google Ads tag directly from GTM rather than importing the GA4 key event as your primary bidding conversion. That gives Ads its own click based count, and GA4 keeps its own reporting.

Making it a GA4 key event

Use generate_lead unless the client already has a naming plan. It is a recommended event name, so it appears cleanly in reports, and it matches what Jotform's own GA4 article uses. Once the first test event arrives, mark it as a key event in GA4 Admin under Data display. Google's help page on creating or modifying key events covers the options, and you need at least the Marketer role to do it. If the client has several forms that mean different things, a quote request and a newsletter signup for example, send the same event name with a form_id or form_name parameter, or use separate event names. Our GA4 key events and naming plan explains how to choose.

Counting it as a Google Ads conversion

Create a website conversion action in Google Ads, choose to set it up manually with Google Tag Manager, and copy the Conversion ID and Conversion Label into a Google Ads Conversion Tracking tag. Google's Tag Manager help on Google Ads conversions lists the fields. Set Count to One for lead forms.

The most common mistake at this point is double counting: the GTM tag fires, and someone also imported the GA4 generate_lead key event into Ads and left both as primary. Keep one primary action per form. If you already see inflated numbers, our fix page on Google Ads counting conversions twice walks through it.

Because the iframe message has no field values, you cannot pass the email to enhanced conversions from the browser on an iframe embed. If enhanced conversions matter for the account, the better route is to send leads back from the CRM, which is covered in the section on the redirect method and in our guide to importing offline conversions from a CRM.

Firing the Meta Pixel Lead event

Fire a Meta Lead event from the same jotform_submit trigger. Jotform support has said for years that the form builder strips script code, so you cannot put the Pixel inside the form itself. It has to fire on your page, and the listener is what tells your page that the submit happened.

Assuming the base Pixel already loads through GTM or the site, add a Custom HTML tag on the jotform_submit trigger:

<script>
    if (typeof fbq === 'function') {
      fbq('track', 'Lead', { content_name: 'Jotform ' + {{DLV - jotform_id}} });
    }
  </script>

Lead is one of Meta's standard events, listed in the Meta Pixel reference. If the client also sends leads through the Conversions API, say from the CRM or a server side container, the browser and server events need the same event ID or Meta counts both. The Pixel accepts it as the fourth argument, { eventID: 'some-id' }.

Getting a shared ID is the tricky part with Jotform, because the iframe message carries no submission ID. One way that works: generate an ID when the form page loads, add it to the iframe URL as a hidden field parameter, for example event_id, with the same method as the click IDs in the next section, and pass the same value as the Pixel's eventID. Your server side event then reads event_id from the submission. Our Meta Conversions API deduplication guide covers the matching rules in detail.

How do you pass gclid and UTM parameters into Jotform hidden fields?

Add hidden fields whose unique names match the parameter names, and make sure the parameters reach the iframe's URL. Jotform prefills any field from a URL parameter whose key is the field's unique name, as its help article on prepopulating fields via URL parameters explains. That gives every submission its own click ID and source, which is what you need for offline imports and lead source reporting in the CRM.

  1. Add the fields. Add a Short Text field for each value you want: gclid, gbraid, wbraid, fbclid, utm_source, utm_medium, utm_campaign, utm_term, utm_content.
  2. Set the unique names. In each field's properties, open the Advanced tab, find the unique name under Field Details and set it to match the parameter exactly, in lowercase.
  3. Hide them. In the same Advanced tab, turn on the option to hide the field so visitors do not see it.
  4. Map them. Map the fields in whatever integration sends Jotform leads to the CRM, or they will be captured in Jotform and lost on the way.

On the landing page itself, this often works with no extra code. The embed handler script that ships with Jotform's iframe embed code currently takes the parent page's query string and appends it to the iframe's source URL. So if a visitor lands on /quote?gclid=abc&utm_source=google and the form is on that page, the gclid and utm_source fields fill themselves. Confirm this on the client's site by inspecting the iframe's src after the page loads.

It breaks as soon as the form is not on the landing page. A visitor lands on the home page from an ad, clicks to the contact page, and the click ID is gone from the URL. To cover that, store the values on the first page and add them to the iframe when the form page loads. Put this small script directly after the Jotform iframe tag in the embed code, before the handler script, so the handler picks up the modified URL:

<script>
  (function () {
    var KEYS = ['gclid', 'gbraid', 'wbraid', 'fbclid', 'utm_source',
                'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'];
    var STORE = 'jf_attr';
    var MAX_AGE = 90 * 24 * 60 * 60 * 1000;
    var params = new URLSearchParams(window.location.search);
    var saved = {};
  
    try { saved = JSON.parse(localStorage.getItem(STORE) || '{}'); } catch (e) {}
    if (saved.t && new Date().getTime() - saved.t > MAX_AGE) saved = {};
  
    var fresh = false;
    KEYS.forEach(function (k) { if (params.get(k)) fresh = true; });
    if (fresh) {
      saved = { t: new Date().getTime() };
      KEYS.forEach(function (k) { if (params.get(k)) saved[k] = params.get(k); });
      try { localStorage.setItem(STORE, JSON.stringify(saved)); } catch (e) {}
    }
  
    var frame = document.querySelector('iframe[id^="JotFormIFrame-"]');
    if (!frame) return;
    var url = new URL(frame.getAttribute('src'), window.location.href);
    KEYS.forEach(function (k) {
      if (saved[k] && !url.searchParams.get(k)) url.searchParams.set(k, saved[k]);
    });
    frame.setAttribute('src', url.toString());
  })();
  </script>

The same storing part should also run on every other page of the site, so a visitor who lands anywhere gets their click ID saved. A Custom HTML tag on All Pages in GTM with just the storing half does that. Keep the consent rules in mind: if the client uses a consent banner, only store marketing parameters when the visitor has agreed, in line with how you configured Consent Mode v2.

If the client runs iOS campaigns, keep the gbraid and wbraid fields even when they look empty most of the time. They are what you upload when there is no gclid, as explained in our guide to gbraid and wbraid offline conversion imports.

Should you use the Thank You page redirect instead?

Use the redirect when the listener cannot work: the Pop-up embed, a direct jotform.com link in an ad or email, or a client who will not allow a Custom HTML tag. In the Form Builder, go to Settings, then Thank You Page, and choose to redirect to an external link after submission. Point it to a thank you page on the client's site and fire your tags on a Page View trigger for that path.

It is simpler, but it has known weaknesses:

  • Refreshes and direct visits count. Anyone who reloads or bookmarks the thank you page fires the conversion again. Keep the page out of navigation and search, and set Google Ads Count to One.
  • Embedded forms may redirect inside the frame. Depending on the embed, the thank you page can load inside the iframe or modal rather than the whole window. Test it. If it loads in the frame, your GTM container runs inside an iframe and attribution gets messy.
  • Attribution can break. If the visitor arrives on the thank you page from a Jotform domain, GA4 may treat it as a new referral and split the session. Add the Jotform domains to the unwanted referrals list, as described in our guide to cross-domain tracking and self referrals.
  • Do not combine it with the listener blindly. If you set a redirect, the Thank You page inside the frame may never load, so the submission-completed message may not arrive. Pick one method per form and test it.

Jotform also lets you put field values into the redirect URL using field names in curly braces, which some agencies use to pass an email or a lead reference to the thank you page. Be careful with that: personal data in a URL ends up in GA4 page paths and server logs. Pass a non personal reference instead and do the matching in the CRM.

Jotform also lists a Google Analytics 4 integration in its integrations directory, which creates GA4 events from new submissions and appears to run through Zapier. It is server to server, so it does not know the visitor's GA client ID unless you capture it, and the events will not join the user's session. Treat it as a reporting supplement, not a replacement for browser tracking.

How do you test Jotform conversion tracking?

Test in GTM Preview with a real submission, then confirm each platform received it. A tag that fires in Preview but never shows up in GA4 or Ads usually points to consent, a wrong ID or a blocked request.

  1. Check the message. With Preview connected, submit the form. In Tag Assistant you should see a jotform_submit event in the left column with jotform_id in the Data Layer tab.
  2. Check the tags. On that event, the GA4 event, Google Ads conversion and Meta Lead tags should show as fired, and each only once.
  3. Check GA4. Open DebugView in GA4 and look for generate_lead with the form_id parameter.
  4. Check Meta. Use Test Events in Events Manager and confirm a single Lead per submission, or two with the same event ID marked as deduplicated if you also run the Conversions API.
  5. Check the hidden fields. Load the page with ?gclid=test123&utm_source=test, submit, and open the entry in Jotform's submissions table. Then test again landing on a different page first.
  6. Check Google Ads later. The conversion action shows its status after real ad clicks convert. Test conversions without an ad click do not appear as conversions in Ads.

Also test a failed submit: leave a required field empty and click Submit. Nothing should fire, because the Thank You page never loads. If something does fire, your trigger is listening to the wrong thing.

Common problems and the usual cause

SymptomLikely cause
No jotform_submit event at allOrigin check does not match the form's domain (EU, HIPAA or Enterprise), or the listener tag did not fire on that page
Event fires twice per submitListener installed twice, once in GTM and once in the theme, or two containers on the page
Works in Preview, nothing in GA4Consent denied in the test browser, or the GA4 tag points to a different property
Hidden fields emptyUnique names do not match the parameters, or the form is not on the landing page and nothing stores the values
Ads shows double conversionsGTM conversion tag and an imported GA4 key event both set as primary

Getting it fixed for a client

Jotform tracking usually goes wrong in small ways that nobody notices for months: the listener only matches jotform.com while the form loads from the EU domain, the gclid field exists but is never mapped to the CRM, or Google Ads counts every lead twice. If you want a second pair of eyes on a client's setup before you report on it, request a free tracking check and we will tell you what is firing, what is missing and what to change.

Just one quick fix, not a whole account? Our founder takes small fixed-price jobs on Fiverr: GA4 and Google Tag Manager tracking fix

Frequently asked questions

Does Jotform work with Google Tag Manager?

Yes, but how depends on the embed. Source code embeds work with GTM's Form Submission trigger, while the default JavaScript and iFrame embeds need a postMessage listener that catches the submission-completed message.

What is the Jotform submission-completed event?

It is a message the embedded Jotform iframe posts to the parent page when the Thank You page loads after a successful submit. It carries the action name and the form ID, but no field values.

Can I get the email address from an embedded Jotform for enhanced conversions?

Not from the browser on an iframe embed, because the message has no field values and the frame is cross-origin. Use the source code embed or send conversions back from the CRM instead.

Can I add the Meta Pixel directly inside a Jotform form?

No. Jotform removes script code from the form builder, so fire the Pixel's Lead event on your own page from the GTM listener or from a thank you page on your site.

Why are my Jotform hidden UTM fields empty?

Usually the field unique names do not match the URL parameter names, or the visitor landed on a different page than the form. Match the names exactly and store the parameters on landing so they can be added to the form later.

Muhammad Qitmeer

Written by

Muhammad Qitmeer, founder of Augere Labs

Augere Labs is the white-label tracking partner behind marketing agencies. If a client account has numbers you don't trust, I'm happy to look at it with you and tell you straight what's wrong.

Connect on LinkedIn