Skip to content
🚀 Find us on Product Hunt
WordPress form on a laptop screen with a green checkmark and a rising analytics chart

Quick answer

Your WordPress form submits, the entry lands in your inbox, but GA4 shows no leads and Google Ads reports no conversions. The usual cause is not a broken tag — it is a form that never tells GTM anything happened. Gravity Forms, WPForms and Contact Form 7 all submit by AJAX by default: the page never reloads, the browser never fires a native submit event, and GTM’s built-in Form Submission trigger has nothing to hear. Each plugin does announce a successful submission, but each one uses a different signal — Gravity Forms fires gform_confirmation_loaded, WPForms fires wpformsAjaxSubmitSuccess, and Contact Form 7 fires wpcf7mailsent. The fix is one small listener tag per plugin that catches its signal and pushes a single shared form_submission event into the dataLayer. From there a generated container takes over: one GA4 generate_lead event, one Google Ads conversion and one Meta Lead event, all firing on that one trigger. Generate the container with the GA4 WordPress form submission recipe, import it, add the listener for your plugin, and test one real submission in Preview before you trust the numbers.

Why WordPress forms go missing in GA4

The setup looks finished. GTM is installed, the form works, people complete it, and the entries arrive. But GA4 shows no generate_lead events, Google Ads reports no conversions, and Meta Events Manager is empty. Nothing is broken in the usual sense — the tracking was built for a form that does not exist on your page.

A normal HTML form lives in your page’s document. When someone submits it, the browser fires a submit event that GTM’s built-in Form Submission trigger can hear. The three big WordPress form plugins do not work that way. With AJAX on, the form sends its data in the background and swaps in a confirmation message without reloading the page. No page reload means no native submit event, and the built-in trigger never fires. This is the same shape of problem as the Typeform guide, the HubSpot guide and the Calendly guide on this site — the form’s success happens somewhere GTM’s standard triggers cannot see — except here the form is on your own page, so the fix is a listener rather than an iframe workaround.

The second trap is counting the wrong moment. A submit button click is not a lead. A validation failure is not a lead. A spam submission is not a lead. Each plugin fires its success signal only after the server has accepted the submission, and that is the only moment worth counting. Every method in this guide counts that moment and nothing else.

Which signal each plugin gives you

Before you write any code, work out which plugin your form uses and how it confirms a submission. The signal you listen for depends on both.

PluginHow it confirms (default)Success signal to listen forWhat it carries
Gravity FormsText confirmation on the same page (AJAX on), or a Page / Redirect confirmationgform_confirmation_loaded (jQuery event) — only when AJAX is onForm ID as the event argument
WPFormsMessage on the same page (AJAX on by default for new forms), or Show Page / Go to URLwpformsAjaxSubmitSuccess (jQuery event) — only when AJAX is onForm ID, plus the form element with its data-formid attribute
Contact Form 7Success message on the same page (AJAX is the default)wpcf7mailsent (DOM event, bubbles to document)Form ID in event.detail.contactFormId

Two details in that table decide whether your fix works. First, the Gravity Forms and WPForms signals only exist when AJAX is on — and AJAX is a per-form setting, so one form on your site can be AJAX and another not. Second, Contact Form 7 fires several events that sound similar but mean different things: wpcf7mailsent means the mail was sent, while wpcf7submit fires on every submission whatever the outcome, including validation failures and spam. Listening to the wrong one is the fastest way to report more leads than you actually received.

Diagnose first: four checks before you change anything

Do not rebuild the container yet. Four checks take five minutes and tell you which half of the setup is actually broken — the container half or the listener half.

CheckWhat to look forWhat it tells you
1. Does the page reload when you submit?Submit the form and watch the address bar and the page. A reload means a normal page post; no reload means AJAX.AJAX means the built-in Form Submission trigger can never work — you need a listener. A reload means the built-in trigger or a thank-you page URL can work, and a listener is the wrong tool.
2. Which plugin, and which confirmation?Open the form in the WordPress admin and read its confirmation setting: Text / Message, Page / Show Page, or Redirect / Go to URL.A Redirect confirmation sends the visitor to a thank-you page, so a Page View trigger on that URL is the simplest fix. A same-page confirmation needs the listener below.
3. Does Preview show the event after a submit?Open GTM Preview, submit the form, and watch the event list on the left. Look for form_submission.If the event appears, the listener works and the problem is downstream — a tag, a trigger condition, or Consent Mode. If it never appears, the listener is missing or listening for the wrong signal.
4. Is GA4 counting something else as a lead?In GA4, open Reports, Engagement, Events and look for form_submit as well as generate_lead.form_submit is GA4’s Enhanced Measurement counting the attempt. If it is there and generate_lead is not, your custom tracking is missing and the automatic count is the only signal — and it counts attempts, not successes.

If check 3 shows form_submission in Preview but GA4 still shows nothing, skip to the verification checklist — your problem is a tag, a variable or a consent setting, not the form. If the event never appears, work through the fix below.

The fix, step by step

The fix has two halves. The builder generates the container — the GA4, Google Ads and Meta tags, already wired to a Custom Event trigger for form_submission. The listener supplies the push that trigger is waiting for. Neither half works without the other: the container listens for an event nothing pushes, and a listener pushing an event no tag is wired to changes nothing. The recipe pages say this outright: the container “listens for it, it doesn’t generate it”. All three plugins push the same event name, so one container covers every form on the site — the form_tool parameter tells you which plugin each lead came from.

Step 1 — Generate the container

Open the builder and choose WordPress as the platform, then GA4, Google Ads and Meta as the tools, and select the Form Submission event. Enter your GA4 Measurement ID, your Google Ads Conversion ID and label, and your Meta Pixel ID. Keep the Advanced defaults as they are — Consent Mode off, Enhanced Conversions off, Debug off, Cross-Domain off — unless your site already needs one of them on. Generate and download the container file. The builder’s WordPress event picker offers 21 events — 11 conversion and 10 engagement, with Form Submission first under Conversion; you only need Form Submission for this fix, so leave the rest unselected and the container stays small and readable. For this exact build — WordPress with GA4, Google Ads and Meta and only the Form Submission event — the generated container has 4 tags, 2 triggers and 1 variable. The WordPress hub lists every WordPress recipe by tool and event, and the recipe index covers all four platforms.

Step 1 of the TagManagerBuilder flow: WordPress selected as the platform
Step 1 of the TagManagerBuilder flow: WordPress selected as the platform
Step 2 of the TagManagerBuilder flow: GA4, Google Ads and Meta Pixel selected as the tracking tools
Step 2 of the TagManagerBuilder flow: GA4, Google Ads and Meta Pixel selected as the tracking tools
Step 3 of the TagManagerBuilder flow: Form Submission selected; the WordPress picker offers 21 events
Step 3 of the TagManagerBuilder flow: Form Submission selected; the WordPress picker offers 21 events
Step 4 of the TagManagerBuilder flow: sample tracking IDs entered for GA4, Google Ads and Meta Pixel
Step 4 of the TagManagerBuilder flow: sample tracking IDs entered for GA4, Google Ads and Meta Pixel
Step 5 of the TagManagerBuilder flow: Advanced options at their defaults
Step 5 of the TagManagerBuilder flow: Advanced options at their defaults
Step 6 of the TagManagerBuilder flow: review screen showing WordPress, the three tools and the form_submission event
Step 6 of the TagManagerBuilder flow: review screen showing WordPress, the three tools and the form_submission event

Step 2 — Import it with Merge, never Overwrite

In GTM, go to Admin, then Import Container. Choose the downloaded file, pick your workspace, and select Merge — not Overwrite. Overwrite replaces the whole container with the imported file and deletes every tag you already have. Merge adds the new tags, triggers and variables alongside the existing ones. After the import, open Preview and confirm the container still contains your existing tags before you publish anything.

The generated container for this build: 4 tags, 2 triggers and 1 variable
The generated container for this build: 4 tags, 2 triggers and 1 variable

Step 3 — Add the listener for your plugin

Create one Custom HTML tag in GTM, fire it on All Pages (or on the pages that hold the form), and paste the listener for your plugin. Use only the listener that matches your form — the other two do nothing on your pages, but keeping all three in one tag is harmless if your site runs more than one plugin.

Gravity Forms. This listener hooks the confirmation event Gravity Forms fires when an AJAX submission succeeds. It only fires when AJAX is enabled on that form’s embed — check the embed settings first, because a listener on a non-AJAX form will never fire and you will spend an afternoon debugging code that is working perfectly.

<script>
jQuery(document).on('gform_confirmation_loaded', function (event, formId) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'form_submission',
    form_tool: 'gravity-forms',
    form_id: String(formId || '')
  });
});
</script>

WPForms. WPForms fires its success event on the form element as soon as the server reports success — before it shows the confirmation message or redirects. The form ID arrives as an argument, and the form element itself carries it in a data-formid attribute. AJAX is on by default for new forms, under Settings, General, in the Advanced section; older forms may have it off, so check rather than assume.

<script>
(function () {
  if (!window.jQuery) { return; }
  jQuery(document).on('wpformsAjaxSubmitSuccess', function (event, json, formId) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      event: 'form_submission',
      form_tool: 'wpforms',
      form_id: String(formId || '')
    });
  });
})();
</script>

Contact Form 7. Contact Form 7 sends its events as DOM events that bubble up to document, so one listener catches every form on the page. Listen for wpcf7mailsent only — the success event. Do not listen for wpcf7submit: it fires on every submission whatever the result, so it counts validation failures and spam as leads.

<script>
document.addEventListener('wpcf7mailsent', function (event) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'form_submission',
    form_tool: 'contact-form-7',
    form_id: String(event.detail.contactFormId || '')
  });
});
</script>

One deliberate rule across all three listeners: they push the form ID and the plugin name, and nothing else. They do not push names, email addresses, phone numbers or any submitted field value. Pushing field values into the dataLayer puts personal data into GA4, which its terms forbid and which turns a tracking fix into a privacy problem. If you need Enhanced Conversions in Google Ads, collect the email through Google’s own User-Provided Data variable on the conversion tag — not through a dataLayer push from the form.

If you would rather not write a listener at all, GTM4WP has a built-in Contact Form 7 integration that pushes the same events for you, and it documents Gravity Forms tracking the same way. That is a fair alternative — but it is a second plugin to install and keep updated, and the three listeners above are twelve lines each. The GTM4WP vs TagManagerBuilder comparison on this site explains where GTM4WP ends and a generated container begins.

Step 4 — Read the form ID with two variables

Create two Data Layer Variables in GTM: one named form_id reading the Data Layer Variable Name form_id, and one named form_tool reading form_tool. The key names must match the pushed object exactly, including case — a variable called formID reading a push that used form_id returns undefined, and your GA4 event arrives with a blank form ID. If you copied a listener from another guide, check which spelling it pushes and name your variable to match it, not the other way round.

The site's live GTM container variables list: six user-defined variables
The site’s live GTM container variables list: six user-defined variables

Step 5 — Send it to GA4, Google Ads and Meta

The generated container already wires this up, but check the three tags so you know what to look for in Preview. The GA4 event tag sends generate_lead with form_id and form_tool as parameters, on the Custom Event trigger for form_submission. The Google Ads conversion tag fires on the same trigger, with the Conversion Linker tag on All Pages. The Meta Lead event fires on the same trigger. One trigger, three destinations, one counted lead — if the three platforms disagree afterwards, the difference is attribution and consent, not a missing event.

Then mark generate_lead as a key event in GA4: Admin, Data display, Events, find generate_lead and mark it. Until you do, GA4 records the event but does not count it as a conversion, and Google Ads imports nothing from it.

The site's live GTM container tags list: 11 tags including GA4 Event form_submission
The site’s live GTM container tags list: 11 tags including GA4 Event form_submission
The GA4 Configuration tag in the site's live GTM container: a Google Tag using the GA4 Measurement ID variable, firing on All Pages
The GA4 Configuration tag in the site’s live GTM container: a Google Tag using the GA4 Measurement ID variable, firing on All Pages
The site's live GTM container triggers list: six triggers including Form Submission Custom Event
The site’s live GTM container triggers list: six triggers including Form Submission Custom Event

Step 6 — If your form redirects to a thank-you page, skip the listener

Not every form needs a listener. If the confirmation is a Redirect (Gravity Forms), Go to URL (WPForms), or a Page confirmation that loads a dedicated thank-you page, the visitor lands on a URL only a successful submission reaches. In that case the simplest fix is a Page View trigger on that thank-you URL, firing the same three tags. Add noindex to the thank-you page so Google does not index a page with no content, and do not link to it from anywhere else on the site. If the confirmation is a same-page message, the listener in step 3 is the only route — there is no URL to trigger on.

The duplicate trap: why GA4 shows more leads than your inbox

The most common follow-up complaint after fixing a missing form is the opposite one: GA4 now reports more leads than the entries list. Four mechanisms cause it, and they stack.

CauseHow it happensFix
Enhanced Measurement counts the attemptGA4’s “Form interactions” Enhanced Measurement logs form_submit on every submit click, including failed validations — and it runs alongside your custom generate_lead.Turn off Form interactions in the GA4 data stream once the custom tracking works, and report on generate_lead only.
Listening to the wrong CF7 eventwpcf7submit fires on every submission, including invalid and spam ones.Listen for wpcf7mailsent only.
Counting the button clickA Click trigger on the submit button fires before validation, so every attempt — including empty and failed ones — counts as a lead.Count only the success signal, never the click.
Two containers firing the same eventA manually added Meta Pixel snippet and the GTM Meta tag both fire Lead on the same submission.Remove the manual snippet; keep one implementation per platform.

A small gap in the other direction is normal and not a bug. People who refuse cookies are not counted directly, and with Consent Mode Google models part of them back. If GA4 shows somewhat fewer leads than your inbox, compare the gap with your cookie-banner refusal rate first — only a gap much bigger than refusals means the tracking is still wrong.

Eight mistakes that break WordPress form tracking

MistakeWhat happensFix
Built-in Form Submission trigger on an AJAX formThe trigger never fires — there is no native submit event for it to hear.Use the plugin’s success signal and a listener, as in step 3.
Gravity Forms listener with AJAX offgform_confirmation_loaded never fires, so nothing is ever pushed.Turn AJAX on for that form’s embed, or track the confirmation page URL instead.
WPForms listener on a form with AJAX offwpformsAjaxSubmitSuccess never fires — the page reloads before the event exists.Turn AJAX on, or use the built-in Form Submission trigger scoped to the form ID.
Listening for wpcf7submit in Contact Form 7Validation failures and spam count as leads.Listen for wpcf7mailsent only.
Variable key spelled differently from the pushformID vs form_id — the Data Layer Variable returns undefined and GA4 gets a blank form ID.Copy the key from the push, character for character, into the variable name.
Listener tag limited to the wrong pagesA Page Path condition that excludes the page holding the form means the listener is never on the page when the form is submitted.Fire the listener on All Pages, or check the condition against the real form page URL.
Pushing submitted field values into the dataLayerNames and email addresses flow into GA4, against its terms.Push form ID and plugin name only; use Google’s User-Provided Data variable for Enhanced Conversions.
Importing the container with OverwriteEvery existing tag in the container is deleted and replaced by the imported file.Always import with Merge, and check Preview before publishing.

Verification checklist

Test with a real submission, not a button click. Use test data you can recognise in the entries list afterwards.

CheckPass looks like
GTM Preview: submit the formform_submission appears in the event list, with form_tool and form_id showing the right plugin and form.
GTM Preview: tags firedThe GA4 event tag, Google Ads conversion tag and Meta Lead tag all fire on that one event.
GA4 DebugViewgenerate_lead appears within seconds, with the form_id and form_tool parameters attached.
GA4 key eventgenerate_lead is marked as a key event, so it counts as a conversion.
Google AdsThe conversion action shows recent activity after a test submission, and the Conversion Linker tag is live on All Pages.
Meta Events Manager Test EventsA Lead event arrives with the right Pixel ID — and only once per submission.
Counts agreeOver the same week, GA4 generate_lead count is close to the plugin’s entries count, allowing for cookie refusals. A large gap in either direction means a duplicate or a missed form.
Every form, not just oneRepeat the test for each form and each plugin on the site — AJAX is per-form, so one working form does not prove the next one works.

Frequently asked questions

Why doesn’t GTM’s built-in Form Submission trigger work on my WordPress form?

Because the form submits by AJAX. The built-in trigger listens for the browser’s native submit event, and an AJAX form never fires one — it sends the data in the background and swaps in a confirmation message. Gravity Forms, WPForms and Contact Form 7 all default to AJAX, so the trigger has nothing to hear. You need a listener for the success signal each plugin fires instead.

Which event name should I send to GA4 — form_submission or generate_lead?

Both, at different layers. form_submission is the dataLayer event your listener pushes and your GTM trigger matches. generate_lead is the event name the GA4 tag sends to Analytics — it is Google’s recommended name for acquiring a lead. Mark generate_lead as a key event in GA4 so it counts as a conversion.

Can I use one container for Gravity Forms, WPForms and Contact Form 7 together?

Yes. All three listeners in this guide push the same form_submission event, so one generated container and one trigger cover every form on the site. The form_tool parameter records which plugin each lead came from, and form_id records which form, so you can split the reports in GA4 without building a container per plugin.

My form redirects to a thank-you page — do I still need a listener?

No. If the confirmation sends the visitor to a thank-you page, use a Page View trigger on that URL instead — it is simpler and has fewer moving parts. Add noindex to the thank-you page. You only need a listener when the confirmation appears on the same page with no reload.

Why does GA4 show more leads than my inbox?

Something is counting attempts as leads. The usual causes are GA4’s Enhanced Measurement form_submit running alongside your custom event, a Contact Form 7 listener on wpcf7submit instead of wpcf7mailsent, or a Click trigger on the submit button. Fix each one in the duplicate trap section above, then compare the GA4 count with the plugin’s entries list over the same week.

Do I need GTM4WP for Gravity Forms or Contact Form 7?

No. The listeners in this guide do the same job in a few lines of code, and the generated container supplies the tags. GTM4WP is a fair alternative if you would rather install a plugin than paste a listener — it pushes Contact Form 7 and Gravity Forms events into the dataLayer for you — but it is a second plugin to maintain, and it does not replace the container itself.

Share with