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

Prerequisites

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:

  1. Go to TriggersNew
  2. Name it “Jotform Conversion”
  3. Trigger Type: Custom Event
  4. Event name: jotform_conversion
  5. 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:

  1. Go to TagsNew
  2. Name it “GA4 - Jotform Conversion”
  3. Tag Type: Google Analytics: GA4 Event
  4. Measurement ID: Select your GA4 configuration tag
  5. Event Name: generate_lead
  6. 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)
  7. Triggering: Select your “Jotform Conversion” trigger
  8. Save

You’ll need to create the dataLayer variables referenced above:

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:

  1. Go to your GA4 PropertyAdminConversions
  2. Click New conversion event
  3. Event name: generate_lead
  4. 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.

If you’re using Google’s Enhanced Conversions or want maximum data collection, set up client-side GTM as your primary tracking method:

  1. In GTM, modify your GA4 Event tag
  2. Add these additional parameters:
    • enhanced_conversions: true
    • user_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

  1. Click Preview in GTM
  2. Load your page with the Jotform
  3. Submit a test form entry
  4. In GTM Preview, look for the “jotform_conversion” event
  5. Click the event and verify your GA4 tag fired with the correct parameters

Verify in GA4 DebugView

  1. Go to GA4ConfigureDebugView
  2. Submit another test form (make sure you’re in the same browser session as GTM Preview)
  3. You should see a generate_lead event appear within 30 seconds
  4. Click the event to verify parameters are populated correctly

Check GA4 Realtime Reports

  1. GA4ReportsRealtime
  2. Submit a test form
  3. Within 2-3 minutes, you should see the conversion in the “Conversions by Event name” card
  4. Look for generate_lead in the list

Cross-Reference Numbers

Check your conversion counts weekly:

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

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.