Google Tag Manager

GTM Form Submission Trigger Not Firing? How to Track Contact Forms Reliably

Your contact form works. Messages land in your inbox. But in GTM Preview, the Form Submission trigger never shows up, or it fires the moment someone clicks Send, even when the form rejected their email address.

If you’re stuck with a GTM form submission trigger not firing, the cause is almost always the same: the built-in trigger was designed for old-style forms, and most forms on your site today don’t work that way. The fix is to stop relying on it.

Why the Form Submission trigger fails on most modern forms

The built-in trigger listens for the browser’s native submit event on a form element. That works when clicking Send reloads the page with a normal HTTP post.

GTM form submission trigger not firing on an AJAX form, and the fix with a dataLayer success event
AJAX forms never tell GTM they succeeded, so push your own success event and send generate_lead from it.

Plugins like Contact Form 7, WPForms, Gravity Forms (in AJAX mode), Elementor Forms and HubSpot embeds usually do something different. They intercept the click, send the data in the background with JavaScript, and show a success message without leaving the page. Some stop the native submit event from reaching GTM at all. Others render the form inside an iframe, which GTM can’t see into.

The opposite failure happens too. The trigger fires on the submit attempt, before the server or the validation says yes. That’s how you end up with GA4 leads that outnumber the emails you actually received.

Check what your form actually does in GTM Preview

Before you change anything, find out which of these cases you’re in. Open Tag Manager, click Preview, enter your page URL and submit the form with a valid entry.

  • If you see a Form Submission event in the left timeline, the trigger can see the form. Check whether it appeared before or after the success message.
  • If you see nothing, or only Click and History Change events, the form is submitted by JavaScript or sits in an iframe.
  • If you see a custom event with a name like wpcf7mailsent or gform_confirmation_loaded, you’re in luck. Jump to Option 1.

Also look at the Data Layer tab for each event. Some plugins push their own events already, and you may have never noticed.

The Wait for Tags and Check Validation settings people miss

If the Form Submission trigger does fire, two settings decide whether it’s reliable. Open the trigger and tick Check Validation. This tells GTM to ignore submits that the browser or the form’s validation blocked, which stops the “fires on failed form” problem for simple forms.

Then tick Wait for Tags and set a max wait time (2000 ms is a common choice). Without it, a normal page-reload form can navigate away before your GA4 tag finishes sending, and the hit gets lost.

These settings help with classic forms. They do nothing for AJAX forms, because the problem there isn’t timing, it’s that GTM never learns the form succeeded.

Option 1: Use the form plugin’s success event with a Custom Event trigger

Many plugins fire a JavaScript event in the browser when the server confirms success. Contact Form 7, for example, fires a DOM event called wpcf7mailsent. GTM can’t listen to DOM events directly, so you’d still need a small bridge to the dataLayer. Some plugins, such as Gravity Forms with certain add-ons, push to the dataLayer themselves. Check Preview first.

If the plugin does push an event, create a trigger of type Custom Event, enter the exact event name (it’s case sensitive) and leave it as “Some Custom Events” if you want to filter by form ID. I prefer this to a Click trigger on the submit button, because a click only proves someone tried to send the form.

Option 2: Push your own dataLayer event on success

If the plugin doesn’t push anything useful, add a small listener that does. This example is for Contact Form 7, which fires wpcf7mailsent only after the mail was accepted. Add it as a Custom HTML tag firing on All Pages (or in your theme if a developer manages it).

<script>
  window.dataLayer = window.dataLayer || [];
  document.addEventListener('wpcf7mailsent', function (event) {
    dataLayer.push({
      event: 'form_submit_success',
      form_id: String(event.detail.contactFormId),
      form_name: 'contact_form_7'
    });
  }, false);
</script>

For a custom form that uses fetch, push the same event inside the success branch of your response handler:

window.dataLayer = window.dataLayer || [];
fetch('/api/contact', { method: 'POST', body: new FormData(form) })
  .then(function (response) {
    if (response.ok) {
      dataLayer.push({
        event: 'form_submit_success',
        form_id: 'contact',
        form_name: 'contact_form'
      });
    }
  });

Now create a Custom Event trigger with the event name form_submit_success. Optionally create two Data Layer Variable variables for form_id and form_name.

Option 3: Thank-you page view as a fallback

If the form redirects to something like /thank-you/, you don’t need any of the above. Use a Page View trigger (or a Window Loaded trigger) with the condition Page Path equals /thank-you/.

It’s good enough when each form has its own thank-you URL and the page can’t be reached any other way. It’s weak when people can refresh the page, bookmark it, or when your ad platform lands people on it directly. Set the page to noindex and consider firing the tag once per session to limit that.

Send the generate_lead event from a GA4 event tag

Create a tag of type Google Analytics: GA4 Event. Select your Google tag or Measurement ID, then set the event name to generate_lead. This is a recommended GA4 event name, so you get consistent handling in reports. Add parameters such as form_id and form_name using your Data Layer Variables. Attach the Custom Event trigger (or thank-you Page View trigger) from the option you chose.

Then, in GA4, go to Admin > Data display > Events and mark generate_lead as a key event. If you want to report on the form parameters, register them under Admin > Data display > Custom definitions as event-scoped dimensions.

Test in GTM Preview, GA4 DebugView and the Realtime report

  1. In GTM Preview, submit the form with a deliberately invalid email. Your trigger should not fire.
  2. Submit it correctly. You should see form_submit_success (or your thank-you page view) and your GA4 tag listed under Tags Fired.
  3. Open GA4 Admin > DebugView. Confirm generate_lead arrives once, with your parameters.
  4. Check the Realtime report afterward. Realtime is a sanity check, not proof of correctness.

Also open the browser’s network tab and filter for collect. One submission should produce one request containing en=generate_lead.

How to stop duplicate form conversions

Duplicates usually come from stacking methods. Say you have a Form Submission trigger from an old setup, plus your new Custom Event trigger, plus a thank-you page tag. One real lead now counts three times.

Pick one method per form and pause the others. Look for duplicate listeners too: if your Custom HTML tag fires on All Pages and also sits on a trigger that fires more than once, you’ll register the event listener repeatedly. Set the tag’s firing option to Once per page. If you’re chasing similar double counting on a shop, my GA4 purchase audit uses the same logic.

What to do next

  • Open GTM and list every trigger and tag that sends a lead event.
  • Submit your form in Preview, once with errors and once correctly.
  • Pick the most reliable option above and pause the rest.
  • Mark generate_lead as a key event and compare the count with your inbox or CRM after a week.

If your form tracking still doesn’t add up, or the form lives in an iframe you can’t change, I’m happy to look at it. You can reach me at The GTM Guy contact page.