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 type | What lands on the page | Can GTM see the fields? | Tracking method that works |
|---|---|---|---|
| JavaScript (the default) | A script that loads the form inside an iframe and resizes it | No | postMessage listener |
| iFrame | An iframe tag plus a small handler script | No | postMessage listener |
| Lightbox, Feedback Button | The form opens in a modal, still in a frame | No | postMessage listener, test it |
| Pop-up | A link that opens the form in a separate browser window | No | Redirect to a thank you page on your site |
| Source Code | The full form HTML and scripts inside your page | Yes | GTM Form Submission trigger or a custom listener |
| Direct link to jotform.com | Nothing on your site, the visitor leaves | No | Redirect 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 domainjotformeu.com, HIPAA subdomains, or an Enterprise custom domain. A listener that only checks forjotform.comsilently 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.
- 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.
- Create a Data Layer Variable. Name it
DLV - jotform_idwith the Data Layer Variable Namejotform_id. - 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 whereDLV - jotform_idequals that form number. - 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 parameterform_idset to the variable. - 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.
- Add the Meta Lead tag if the client runs Meta ads, covered further down.
- 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.
