NOTE-073 · FIELD NOTE FILED 26 NOV 2026 · REVISED 26 NOV 2026 F-101 F-601 F-201
Form tracking on a WordPress lead-gen site: what Contact Form 7, Gravity Forms and Elementor forms each give GA4 and Google Ads.
ABSTRACT — If a WordPress site's enquiries reach the inbox but GA4 or Google Ads shows none, or too many, the form plugin isn't telling your tags when an enquiry succeeded. Contact Form 7 fires wpcf7mailsent, Gravity Forms goes to a confirmation page if you set one, or fires gform_confirmation_loaded with AJAX on, and Elementor Pro has no documented success event, so redirect to a thank-you page. Count that one signal as the lead, in GA4 and Google Ads alike.
Baris Asa, Synctag, tracking consultant, London · Last checked: 26 November 2026
If your WordPress site’s enquiries reach the inbox but GA4 or Google Ads shows none, or too many, nothing is telling your tags the moment an enquiry was actually sent. Contact Form 7 fireswpcf7mailsent. Gravity Forms sends visitors to a confirmation page, or fires gform_confirmation_loaded with AJAX on. Elementor Pro has no documented success event, so redirect to a thank-you page. Turn that one signal into a GA4 generate_lead key event and fire the Google Ads conversion from the same trigger.
Quick check. Take last month. Count the enquiries in the plugin’s entries list or your inbox. In GA4, open Reports, Engagement, Events and look for generate_lead, or whatever your developer named the lead event. In Google Ads, open Goals, Conversions, Summary and read the Conversions column (not All conv.) for the lead action, same dates.
- Zero, or nothing that looks like a lead: nothing counts the form. One common cause: the old tracking waited for a thank-you page the form no longer loads. The form needs one of the routes below.
- Well above the enquiries: something counts attempts, the newsletter box, or the same enquiry twice (F-101 ).
- Somewhat below: normal. People who refuse cookies aren’t counted directly; with Consent Mode, Google can model part of them back (F-201 ). A gap much bigger than your cookie-banner refusals means the tracking is wrong.
If the numbers are off and you’d rather not open Tag Manager yourself, email me the form’s URL and the plugin name. I’ll reply with the route it needs, then set it up. What that involves is further down.
Why any form can go missing, and the thank-you page versus event choice in general, is in GA4 form submissions not tracked. This note is about three plugins. I have no partnership or commission with any plugin or tool named here.
Which signal does each plugin give you?
| Plugin | Counted out of the box? | Signal to listen for |
|---|---|---|
| Contact Form 7 | No: needs a listener | wpcf7mailsent |
| Gravity Forms | Only with a Page or Redirect confirmation; the default Text confirmation needs a listener | Page or Redirect URL; gform_confirmation_loaded with AJAX on |
| Elementor Pro Form | No: add a thank-you page | Redirect URL; success message as a fallback |
The sections below are for whoever edits your Tag Manager container (the account that holds your tracking tags). Two terms come up throughout. AJAX means the form sends without reloading the page. The data layer is the list of events your site hands to Tag Manager.
How do you track Contact Form 7 in GA4?
Contact Form 7 sends forms by AJAX. Its documentation lists five events, fired on the form’s wrapper and passed up to the page (Contact Form 7: DOM events):
wpcf7mailsent: the submission completed and the mail was sent. This is the lead.wpcf7invalid,wpcf7spam,wpcf7mailfailed: completed, but no mail went.wpcf7submit: completed, “regardless of other incidents”. Don’t count this one.
In Tag Manager, add a Custom HTML tag (a tag that runs your own script) on the pages with the form:
<script>
document.addEventListener("wpcf7mailsent", function (event) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "wp_form_success",
form_plugin: "contact-form-7",
form_id: String(event.detail.contactFormId)
});
}, false);
</script>
contactFormId is one of the fields Contact Form 7 documents on the event, so each form reports separately.
On a handed-over site, three things to check first:
- The plugin’s own GA4 snippet. Contact Form 7’s guide offers a
gtagsnippet that sends awpcf7_submissionevent straight to GA4 (Contact Form 7: tracking with Google Analytics). If someone added it to the theme and you add the tag above, every enquiry counts twice. Keep one. - A form that reloads the page. Contact Form 7 says none of its events fire when a form runs in non-AJAX mode (Contact Form 7: DOM event doesn’t work). Its own FAQ says a form that reloads the page probably means the plugin’s JavaScript isn’t working on the site (Contact Form 7: AJAX form not working). Fix that first.
- A leftover
on_sent_okline in the form’s Additional Settings. It was removed in Contact Form 7 5.0 (Contact Form 7: additional settings), so whatever tracking it held counts nothing.
How do you track Gravity Forms in GA4?
Check two settings on the form: its confirmation (Form Settings, Confirmations) and whether AJAX is on.
Page or Redirect confirmation. Gravity Forms sends the visitor to a page on your site, or to a full URL you enter (Gravity Forms: confirmations). Use a page only a completed enquiry reaches and count it with a Page View trigger on that path. This is the route I prefer on Gravity Forms: it doesn’t depend on a JavaScript event, so plugin updates rarely break it. Check that only a completed enquiry can reach the page.
Text confirmation, AJAX off. Gravity Forms’ default is postback: “The form is submitted and the page reloads” (Gravity Forms: AJAX form submission). Its docs don’t describe a separate URL to count. Switch the confirmation to Page, or turn AJAX on and use the event below.
Text confirmation, AJAX on. Gravity Forms documents gform_confirmation_loaded, “fired on AJAX-enabled forms when the confirmation message is displayed”, with the form’s ID (Gravity Forms: gform_confirmation_loaded). It is a jQuery event:
<script>
jQuery(document).on("gform_confirmation_loaded", function (event, formId) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "wp_form_success",
form_plugin: "gravity-forms",
form_id: String(formId)
});
});
</script>
Fire this tag on DOM Ready on the form pages. If Preview shows “jQuery is not defined”, it ran too early. Gravity Forms 2.9 added a second AJAX method, switched on in code. Forms using its Stripe Add-On 7.0 or later are submitted this way: on those, confirm the event fires in Preview before relying on it, or use a Page confirmation. Forms with AJAX ticked in the block or shortcode use the older method. The event page doesn’t say which methods it covers: test with yours.
The Google Analytics Add-On. Gravity Forms offers an add-on, with an Elite or Nonprofit licence, that sends submissions to GA4 by Measurement Protocol (Google’s server-to-server route), gtag or Tag Manager (Gravity Forms: connection types). It’s a valid route for GA4. If Google Ads is the goal, avoid its Measurement Protocol connection: Gravity Forms says it doesn’t include the data needed for AdWords or remarketing. Pick the add-on or the tag above, not both (F-101 ).
Elementor form submissions not showing in GA4: what do you count?
The form shows its success message without loading a new page, and Elementor documents no JavaScript success event, so nothing tells GA4 or Google Ads the enquiry went. Fix it with a redirect to a thank-you page, or a trigger on the success message.
I found no success event in Elementor’s help or developer documentation. The Form widget is part of Elementor Pro (Elementor: Pro vs free). If a trigger works in Preview but GA4 still shows nothing, check the key event step and consent. Elementor’s help documents the Redirect action: “you can redirect visitors to a Thank You page” (Elementor: actions after submit).
Route 1, the one I use: Redirect.
- In the form’s Actions After Submit, add Redirect.
- Enter the thank-you page as a full URL. Elementor lists a URL without
http://orhttps://as a reason the redirect fails (Elementor: redirect does not work). - Make sure only a completed enquiry can reach the page: keep it out of menus and the sitemap.
- In Tag Manager, count the page with a Page View trigger on its path.
On Elementor’s Form Lite widget, the same idea is a “Redirect to Thank You Page” toggle (Elementor: Form Lite).
Route 2: the success message. If the form must stay on the page:
- In Elementor, give the form a unique Form ID.
- In Tag Manager, create an Element Visibility trigger. Google says it fires when a selected element becomes visible in the browser’s viewport (Google: Element Visibility trigger). By default at least half of it must be on screen, so a message below the fold on a phone isn’t counted until the visitor scrolls. Lower Minimum Percent Visible, and test on a phone.
- Use a CSS selector scoped to that form’s success message. Check it on the live page.
- Tick “Observe DOM changes”, which Google says catches elements that appear after the page loads. Forms inside an Elementor Popup need it too, as they only appear when the popup opens.
It breaks silently when someone rebuilds the form. You’ll find a submit_success event quoted in forums. An Elementor contributor described it in a 2018 GitHub issue, but it isn’t in Elementor’s documentation, so nothing promises it survives an update.
How does the event become a GA4 lead?
Every route ends at one of two triggers: a Page View on the thank-you path, or a Custom Event trigger on wp_form_success. Google’s Custom Event trigger fires on the event name pushed to the data layer (Google: custom event trigger).
- Attach one GA4 event tag named
generate_lead. Google defines it as measuring “when a lead has been generated (for example, through a form)” (Google: recommended events). - Send
form_pluginandform_idas parameters. Register them as custom dimensions if you want them in reports (F-601 ). - Mark
generate_leadas a key event (what GA4 counts as a conversion). Which GA4 events should be key events covers the rest. - Don’t also mark enhanced measurement’s
form_submit. Google lists it as firing “when the user submits a form”, withform_id,form_name,form_destinationandform_submit_text(Google: enhanced measurement). The page says nothing about a successful send, and it fires on every form the tag sees, newsletter box included.
The listeners above run in Custom HTML tags. Google says the built-in templates are the best way to avoid performance and malware issues (Google: custom tags), and some containers block Custom HTML by policy. If yours does, put the same lines in a child theme or a footer-scripts plugin, so a theme update doesn’t remove them.
Some WordPress analytics plugins sell form-tracking add-ons that listen for the same signals. If you use one, don’t add the listeners above as well (F-101 ).
How does Google Ads get the same lead?
From the same trigger, through one route.
- A Google Ads conversion tag in Tag Manager, on the same trigger, with the Conversion ID and Label from the conversion action’s tag setup (Google: Google Ads conversions in Tag Manager). Add a Conversion Linker tag on all pages, unless the container already loads a Google tag for that Google Ads account on every page (Google: conversion linker).
- Or a conversion created from the GA4 key event. In GA4, Advertising, under Tools, Conversion management, with GA4 and Google Ads linked and auto-tagging on. When the Google Ads account already has goals from an Analytics property, Google marks these as secondary, to avoid counting the same event twice for bidding (Google Ads: conversions from GA4 key events). If it’s your only route, set it to primary in Google Ads.
Make only one route primary (the one Google Ads bids on). If the GA4 option never appears, see GA4 conversions not importing into Google Ads. To match leads to the sales they became, enhanced conversions for leads vs GCLID import covers the choice.
How do you test it?
- Open Tag Manager Preview on the live site, not a staging copy. Submit a real enquiry with an email you control.
- Submit again with the form empty and with a bad email address. The lead trigger must not fire on either. On Contact Form 7, that’s the difference between
wpcf7mailsentandwpcf7submit. - Submit the newsletter box or any second form. It shouldn’t add a lead, unless you meant it to.
- In GA4 DebugView,
generate_leadshould appear once per real enquiry. If DebugView stays blank, use the DebugView checklist. - After any plugin or theme update, run steps 1 and 2 again. Updates are where these break.
- A week on, put GA4 leads next to the plugin’s entries. They won’t match to the unit; consent sits in the gap (events missing when visitors decline cookies). With Consent Mode set up, Google can model part of it back, above a volume threshold (F-201 ). Far above or far below means a route is wrong.
Who should set this up?
Three people can: the site owner, with a form-tracking plugin; a developer, adding a listener; or a tracking specialist, who also proves the count. Pick by whether GA4 and Google Ads need to agree with the inbox. Your developer can add a listener. What I check is the count: one route per form, one primary conversion, failed sends that don’t count. I do that inside your container or your client’s, alongside whoever built the site.
- Access needed: WordPress admin, Tag Manager publish rights, GA4 editor, Google Ads admin.
- What you get back: which route each form uses and why, a test lead seen once in DebugView and once in Google Ads, failed submissions shown not to count, and the plugin-entries check a week later.
Email me the form’s URL and the plugin name to start; I’ll reply with the route it needs. For the wider choice between a consultant and an agency, see independent consultant or agency. WooCommerce checkouts are a different job: GA4 purchase missing on WooCommerce.
Common questions
How do I track Contact Form 7 submissions in GA4 with Google Tag Manager?
Listen for Contact Form 7’s wpcf7mailsent event, which its documentation says fires when an AJAX submission has completed and the mail has been sent. A short Custom HTML tag in Tag Manager turns it into a data layer event; a Custom Event trigger on that name sends a GA4 generate_lead event. Don’t use wpcf7submit: it fires regardless of whether the mail went.
How do I track Gravity Forms submissions in GA4?
It depends on the form’s confirmation and AJAX setting. With a Page or Redirect confirmation, the visitor is sent to a page you choose, so count that page. With AJAX on and a Text confirmation, Gravity Forms documents a gform_confirmation_loaded event when the confirmation message is displayed; push a data layer event from it. Its Google Analytics Add-On, on an Elite or Nonprofit licence, is a third route for GA4. Use one, not two.
Why are my Elementor form submissions not showing in GA4?
Usually because the form shows its success message without loading a new page, and Elementor’s documentation names no JavaScript success event to listen for. Add Elementor’s Redirect action to send visitors to a thank-you page and count that page, or use a Tag Manager Element Visibility trigger on that form’s success message.
Who should set up form conversion tracking on a WordPress site?
Three people can: the site owner with a form-tracking plugin, a developer adding a listener, or a tracking specialist who also proves the count. If GA4 and Google Ads need to agree with the inbox, that last part matters: one route per form, one primary conversion, failed sends that don’t count. I do that with WordPress admin, Tag Manager publish, GA4 editor and Google Ads admin access, and hand back a test lead seen once in each.
Can I use GA4 enhanced measurement form_submit instead?
Not as the lead. Google describes form_submit as firing when a user submits a form. It carries form_id, form_name, form_destination and form_submit_text, but Google’s page says nothing about a successful send or AJAX forms, and it fires on every form the tag sees, so a newsletter box counts too. Keep it as a funnel step at most, and don’t mark it as a key event.
Sources
Read on 26 November 2026. Contact Form 7’s pages were checked against archived copies from 2025 and 2026.
- Contact Form 7: DOM events (five events and their meaning; fired on the wrapper div, bubbling;
detail.contactFormId) - Contact Form 7: tracking form submissions with Google Analytics (
gtagsnippet sendingwpcf7_submissiononwpcf7mailsent) - Contact Form 7: DOM event doesn’t work (no events in non-AJAX mode) and AJAX form not working (a reloading form probably means the plugin’s JavaScript isn’t working)
- Contact Form 7: additional settings (
on_sent_okandon_submitremoved in 5.0) - Gravity Forms: configuring confirmations (Text, Page, Redirect)
- Gravity Forms: AJAX form submission (postback is the default; AJAX method added in 2.9, enabled in code, used by Stripe Add-On 7.0+ forms; block and shortcode give legacy AJAX)
- Gravity Forms: gform_confirmation_loaded (fired on AJAX-enabled forms when the confirmation is displayed;
formId) - Gravity Forms: Google Analytics connection types and Google Analytics integration (Measurement Protocol, gtag, Tag Manager, manual; Measurement Protocol lacks AdWords and remarketing data; Elite or Nonprofit licence)
- Elementor: actions after submit, redirect does not work, Pro vs free, Form Lite (Redirect action; absolute URL; Forms in Pro; Form Lite redirect toggle)
- Elementor GitHub: issue 5305 (contributor comment on
submit_success, 2018; not in Elementor’s docs) - Google Tag Manager Help: custom event trigger, Element Visibility trigger (viewport; 50% visible by default), custom tags, Google Ads conversions, conversion linker
- Google for Developers: recommended events, generate_lead
- Google Analytics Help: enhanced measurement (
form_submitand its parameters) - Google Ads Help: conversions based on GA4 key events (GA4 Advertising, Tools, Conversion management; linking and auto-tagging; secondary when Analytics goals already exist)