Jotform + GA4 Conversion Tracking Setup
About 30% of the sites I audit are losing Jotform conversions in GA4 because they’re trying to track submissions with a generic form listener that never fires. Jotform runs in an iframe, so standard form submission events don’t bubble up to your parent page where GTM can catch them.
The postMessage method I’ll show you captures the actual submission event from Jotform’s iframe and pushes it to GA4 as a properly formatted conversion event.
What You’ll Have Working By The End
- Jotform submissions automatically tracked as ‘generate_lead’ events in GA4
- Real-time conversion data flowing into GA4’s DebugView and Realtime reports
- Proper conversion marking so events can be imported into Google Ads
- Cross-platform attribution working between your ads and form submissions
- A testing workflow to verify everything is firing correctly
Prerequisites
- Google Tag Manager container installed on your site
- GA4 property connected to your GTM container
- GA4 measurement ID readily available
- Admin access to your GA4 property (to mark conversions)
- Jotform embedded on your site or redirect thank-you page set up
Step 1: Set Up the Jotform PostMessage Listener
Jotform fires a postMessage event when a form is submitted successfully. You need to catch this message and convert it into a dataLayer push that GTM can use.
Add this code to your site’s <head> section, before your GTM script:
<script>
window.addEventListener('message', function(e) {
// Only listen to messages from Jotform
if (e.origin.indexOf('jotform') === -1) return;
// Check if this is a form submission event
if (e.data && e.data.type === 'form-submit' && e.data.formID) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'jotform_conversion',
'form_id': e.data.formID,
'form_title': e.data.formTitle || 'Jotform Submission',
'conversion_value': 0 // Set this to your lead value if known
});
}
});
</script>
If you’re using Jotform’s thank-you page redirect instead of the iframe method, you can skip the postMessage listener and just add this to your thank-you page:
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'jotform_conversion',
'form_id': 'redirect_submission',
'form_title': 'Jotform Lead',
'conversion_value': 0
});
</script>
Step 2: Create the GTM Trigger
In Google Tag Manager:
- Go to Triggers → New
- Name it “Jotform Conversion”
- Trigger Type: Custom Event
- Event name:
jotform_conversion - Save
This trigger will fire whenever the dataLayer receives a jotform_conversion event from your postMessage listener.
Step 3: Configure the GA4 Event Tag
Create the tag that sends conversion data to GA4:
- Go to Tags → New
- Name it “GA4 - Jotform Conversion”
- Tag Type: Google Analytics: GA4 Event
- Measurement ID: Select your GA4 configuration tag
- Event Name:
generate_lead - Parameters (click to expand):
form_id:{{DLV - form_id}}form_name:{{DLV - form_title}}value:{{DLV - conversion_value}}currency:USD(if you’re tracking value)
- Triggering: Select your “Jotform Conversion” trigger
- Save
You’ll need to create the dataLayer variables referenced above:
- Variables → New → Data Layer Variable
- Variable Name: “DLV - form_id”, Data Layer Variable Name: “form_id”
- Repeat for
form_titleandconversion_value
Step 4: Mark the Event as a Conversion in GA4
The event won’t show up as a conversion in GA4 until you mark it:
- Go to your GA4 Property → Admin → Conversions
- Click New conversion event
- Event name:
generate_lead - Click Save
It takes about 30 minutes for new conversion events to start appearing in GA4 reports, but you’ll see them immediately in DebugView.
Step 5: Configure Client-Side GTM (Recommended)
If you’re using Google’s Enhanced Conversions or want maximum data collection, set up client-side GTM as your primary tracking method:
- In GTM, modify your GA4 Event tag
- Add these additional parameters:
enhanced_conversions:trueuser_data.email_address:{{DLV - user_email}}(if collecting email)user_data.phone_number:{{DLV - user_phone}}(if collecting phone)
Update your postMessage listener to capture form field data:
window.addEventListener('message', function(e) {
if (e.origin.indexOf('jotform') === -1) return;
if (e.data && e.data.type === 'form-submit' && e.data.formID) {
// Extract form field values if available
const formData = e.data.formData || {};
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'jotform_conversion',
'form_id': e.data.formID,
'form_title': e.data.formTitle || 'Jotform Submission',
'conversion_value': 0,
'user_email': formData.email || '',
'user_phone': formData.phone || ''
});
}
});
Testing & Verification
Real-Time Testing in GTM
- Click Preview in GTM
- Load your page with the Jotform
- Submit a test form entry
- In GTM Preview, look for the “jotform_conversion” event
- Click the event and verify your GA4 tag fired with the correct parameters
Verify in GA4 DebugView
- Go to GA4 → Configure → DebugView
- Submit another test form (make sure you’re in the same browser session as GTM Preview)
- You should see a
generate_leadevent appear within 30 seconds - Click the event to verify parameters are populated correctly
Check GA4 Realtime Reports
- GA4 → Reports → Realtime
- Submit a test form
- Within 2-3 minutes, you should see the conversion in the “Conversions by Event name” card
- Look for
generate_leadin the list
Cross-Reference Numbers
Check your conversion counts weekly:
- Jotform: Dashboard → Form → Submissions count
- GA4: Reports → Engagement → Conversions (filter by
generate_lead)
Acceptable variance is 5-15%. GA4 will typically show 10-20% fewer conversions due to ad blockers and privacy settings blocking client-side tracking.
Troubleshooting
Problem: GTM Preview shows the custom event firing but GA4 tag doesn’t trigger → Check that your trigger event name exactly matches what’s being pushed to dataLayer. It’s case-sensitive. Use the dataLayer tab in GTM Preview to verify the exact event name.
Problem: GA4 tag fires in GTM but no events show up in DebugView → Your GA4 Measurement ID is likely wrong or the GA4 configuration tag isn’t firing. Check that your GA4 config tag triggers on “All Pages” and verify the measurement ID matches your GA4 property.
Problem: PostMessage listener isn’t catching Jotform submissions
→ Jotform’s iframe domain changed. Update your origin check to look for any domain containing ‘jotform’. Some enterprise accounts use custom domains, so you might need e.origin.indexOf('yourcompany.jotformeu.com') !== -1.
Problem: Events show in DebugView but not in GA4 conversion reports
→ You haven’t marked generate_lead as a conversion event in GA4 Admin, or it’s been less than 30 minutes since you marked it. New conversion events take time to appear in standard reports.
Problem: Thank-you page method fires multiple times per session
→ Users are refreshing your thank-you page or navigating back to it. Add a session storage check to prevent duplicate firing: if (sessionStorage.getItem('jotform_conversion')) return; sessionStorage.setItem('jotform_conversion', 'true');
Problem: Conversion count in GA4 is 40%+ lower than Jotform submission count → You likely have significant ad blocker usage or privacy-conscious visitors. This is normal for client-side tracking. Consider server-side GTM or use Jotform’s webhook integration to send conversions directly to GA4’s Measurement Protocol.
What To Do Next
- Set up Jotform to Google Ads conversion tracking to get your lead data flowing to your ad campaigns
- Configure Jotform to Meta Ads tracking if you’re running Facebook or Instagram ads
- Connect your leads to your CRM with Jotform to HubSpot integration
- Get a free tracking audit to make sure your conversion data is accurate across all platforms
This guide is part of the GA4 Conversion Tracking Hub — complete setup guides for tracking conversions from any form, landing page, or lead source in Google Analytics 4.