Gravity Forms Event Listener: Track Confirmations in GTM

Gravity Forms can confirm without a page reload, which breaks page based tracking. Here is the listener that catches it, and the setting it depends on.

Gravity Forms tracking usually breaks for one specific reason, and it is a setting rather than a bug. This post covers the listener and the setting it depends on.

By the end you will have Gravity Forms confirmations firing conversions in GA4, Google Ads and Meta.

The setting that decides everything

Gravity Forms can submit in two ways. With AJAX enabled it swaps in the confirmation without reloading. Without AJAX it does a normal page post.

The listener below hooks gform_confirmation_loaded, which only fires on AJAX submissions. If your form does not have AJAX enabled, the event never fires and you will spend an afternoon debugging a listener that is working perfectly.

Check the form’s embed settings first. If AJAX is off, either turn it on or track the confirmation page URL instead.

The listener code

This is the Gravity Forms listener from DumbData.

The full listener is in the copy block at the bottom of this page, with a copy button. It is reproduced exactly as DumbData publish it, so you can copy it straight from here or from their page.

It waits for the confirmation to load, then pushes formSubmissionSuccess with the form ID.

Note it uses jQuery. On WordPress that is nearly always available, and Gravity Forms itself depends on it, so this is safe here.

Installing it in GTM

  1. Create a Custom HTML tag in Google Tag Manager and paste the listener.

  2. Trigger it on All Pages, or limit it to the pages that contain the form.

  3. Save and open Preview.

Creating the trigger

  1. New trigger, type Custom Event.

  2. Event name: formSubmissionSuccess

  3. Leave it on All Custom Events unless you want to split by form.

  4. Save it as CE Gravity Form Success.

Creating the Data Layer Variable

  1. Data Layer Variable named formID. Call it DLV Gravity Form ID.

Mind the capitalisation. It is formID with a capital I and D, which differs from other listeners and is a common source of undefined values.

Sending it to GA4

  1. Create a GA4 Event tag.

  2. Event name: generate_lead

  3. Add a form_id parameter from your Data Layer Variable.

  4. Trigger: CE Gravity Form Success.

Use one event name across every form and separate them with parameters. Six differently named events are much harder to report on than one event with a form_id.

Sending conversions to Google Ads

  1. Create a conversion action in Google Ads and note the ID and label.

  2. Add a Google Ads Conversion Tracking tag in GTM with those values.

  3. Trigger: CE Gravity Form Success.

  4. Turn on Enhanced Conversions if the form collects an email: Enhanced Conversions setup

Meta and everything else

Same trigger, different tag. A Meta Pixel tag with the Lead event, a Mixpanel or Piwik PRO tag from their GTM template, a LinkedIn or Microsoft conversion tag. You write the listener once and every platform reads from the same event.

Testing

  1. Confirm AJAX is enabled on the form.

  2. Open GTM Preview and submit the form.

  3. Confirm formSubmissionSuccess fires when the confirmation appears.

  4. Check formID in the Data Layer tab.

  5. If you have several forms, test each one. AJAX is set per embed, not globally.

Common issues

  • Nothing fires. AJAX is off on that form. This is the cause roughly nine times out of ten.

  • Works on one form, not another. Same reason. Check each embed.

  • Fires on page load. You are on the confirmation page of a non AJAX form, which is a different tracking method. Pick one.

  • jQuery errors in console. Something has deregistered jQuery. Rare on WordPress, and it does happen with aggressive optimisation plugins.

Privacy considerations

  • Never send names, emails, phone numbers or free text into GA4. It breaches Google’s terms and it is the most common way personal data ends up where it should not be.

  • Hash anything you send to an ad platform for matching.

  • Gate the tags behind marketing consent in your consent tool: Consent Mode v2 in GTM

Final thoughts

Gravity Forms is straightforward once you know about the AJAX setting. Check that first, install the listener second, and the rest is the same pattern as every other form.

Listener from DumbData.

Need this built properly?

Check the AJAX setting before you debug anything else. I set up and repair tracking for ecommerce stores and lead generation businesses, so the numbers in your ad accounts match the money in your bank account.

Have a look at what I do, or book a call and we can go through your setup together.

Need accurate tracking?

Its Free

500+ Happy Clients ⭐️

Keep Reading

See exactly where you’re wasting ad spend and how better tracking can double your sales.

See exactly where you’re wasting ad spend and how better tracking can double your sales.

Tracking in 3 Hours

Tracking in 3 Hours

I Manage Everything

I Manage Everything

24/7 Expert Support

24/7 Expert Support

TESTIMONIALS

Trusted by 500+ satisfied clients

Discover how we’ve driven growth and innovation.

500+ Tracking

500+ Tracking

Adélaïde De Vos

3,922 followers

I had the pleasure to work with Abdul and I can say that he exceeded my expectations. He was professional, patient, and clear in his explanations and committed to client satisfaction. If you're looking for someone who is not only highly skilled but also reliable and committed to client satisfaction, I highly recommend Kayium!

Dean Watson

1,030 followers

Kayium setup our tracking for Google Ads and Meta Ads, which helped us get 20%+ more conversions on the same ad spend. He didn’t just handle the technical setup,he also took the time to explain why it works and how it improves results. If you’re looking for someone skilled, reliable, and committed to delivering real results, I highly recommend him!

David Friend

CEO: Profitable Sites

Kayium set up accurate tracking that helped us scale ads fast and boost conversions by over 25%. He gave us clear insight into which ads drive revenue.

Lalita Sundari

7,924 followers

I've worked with Kayium; his strategic mindset and expertise in GTM, GA4, Pixel & Server Side Tracking, are invaluable! I highly recommend Kayium!

© 2026 Abdul Kayium

Owned by Kayium

© 2026 Abdul Kayium

Owned by Kayium