Last Updated on by Azib Yaqoob
If your website’s main goal is getting enquiries, your contact form is your “purchase”. For a plumber, roofer or HVAC company, a form submission is often the lead that pays the bills. Yet on many WordPress sites, GA4 either doesn’t track form submissions at all, or counts them wrong: every time someone clicks the button, even when the form fails, or twice when the thank-you message reloads.
This guide shows two ways to track form submissions properly in GA4, which one to use, and how to check that it works.
Quick answer: If your form redirects to a thank-you page, create a
generate_leadevent in GA4 from visits to that page. If it does not (Contact Form 7 usually stays on the page), use Google Tag Manager to listen for the plugin’s success signal and send onegenerate_leadevent. Then mark it as a key event and test it once with a real submission.
Table of Contents
Why the built-in GA4 form tracking isn’t enough
GA4’s enhanced measurement has a “Form interactions” setting that sends form_start and form_submit events automatically. It sounds perfect, but in practice:
- Most WordPress form plugins (Contact Form 7, WPForms, Gravity Forms) can submit without reloading the page, and GA4 often misses those submissions.
- It can fire when someone clicks submit even if the form shows an error, so failed attempts get counted as leads.
- It fires for every form on the page, including search boxes and newsletter sign-ups, so you can’t tell an enquiry from a search.
Use it as a rough signal at best. For leads you rely on, track the successful submission, as below.
Which method should you use?
| Method 1: Thank-you page | Method 2: Google Tag Manager | |
|---|---|---|
| Difficulty | Easy | Medium |
| Needs GTM | No | Yes |
| Counts only successful submissions | Yes, if the redirect happens only on success | Yes |
| Risk of double counting | Refreshes and bookmarks of the thank-you page | Running it alongside Method 1 |
| Tells you which form | Only with separate thank-you pages | Yes, with the form ID |
| Best for | One simple form | Several forms, Google Ads, accurate numbers |
If both were installed by different people over the years, pick one and remove the other, or every lead is counted twice.
Method 1: Thank-you page (simplest)
If your form plugin can redirect to a separate thank-you page after a successful submission, you can count visits to that page as leads.
- Create a page such as
/thank-you/and set your form to redirect there after a successful submission. - In GA4, go to Admin → Data display → Events → Create event. Create an event called
generate_leadwith the condition:event_nameequalspage_viewandpage_locationcontains/thank-you/. - Once the event appears, go to Admin → Data display → Events and click the star next to
generate_leadto mark it as a key event.
Watch out: anyone who bookmarks or refreshes the thank-you page is counted again. Set the page to noindex and don’t link to it from anywhere else. Contact Form 7 does not redirect by default, so most sites using it should use Method 2.
Method 2: Google Tag Manager (most accurate)
Most form plugins announce a successful submission in the page’s code. Google Tag Manager can listen for that signal and send one clean generate_lead event to GA4. This works without a thank-you page and only counts forms that were actually sent. If GTM is new to you, start with the Google Tag Manager beginner guide, and make sure GA4 itself is installed once (see how to set up GA4).
Step 1: Listen for the success signal
Contact Form 7 fires a browser event called wpcf7mailsent after an Ajax submission succeeds and the mail is actually sent. It is different from wpcf7submit, which fires whatever the outcome, and wpcf7invalid, which fires when fields are invalid (all documented on the Contact Form 7 DOM events page). So wpcf7mailsent is the right one for leads.
In GTM, create a Custom HTML tag that fires on all pages (or only pages with forms):
<script>
document.addEventListener('wpcf7mailsent', function (e) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'form_success',
form_id: e.detail.contactFormId
});
});
</script>The event also carries the visitor’s typed answers in e.detail.inputs. Do not send names, emails or phone numbers to GA4. Google’s policies do not allow personal data in Analytics, so push only the form ID.

Other plugins send their own success signal. WPForms and Gravity Forms each have one, and their documentation lists the exact name. The idea is the same: when the plugin confirms a successful submission, push a form_success event into the data layer.
Step 2: Create the trigger
Create a Custom Event trigger with the event name form_success.
Step 3: Send the event to GA4
Create a Google Analytics: GA4 Event tag with the event name generate_lead, fired by the form_success trigger. Add the form ID as an event parameter if you have more than one form, so you can see which one brings enquiries.

Step 4: Mark it as a key event
In GA4, go to Admin → Data display → Events and click the star next to generate_lead to mark it as a key event. If you run Google Ads, you can import it as a conversion from there.
How to test it
- Open GTM Preview (or GA4 Admin → DebugView) and submit a real test enquiry.
- Check that exactly one
generate_leadevent appears. - Submit the form with a required field empty. No
generate_leadshould fire. - After a day, compare the number of leads in GA4 with the emails you received. They won’t match perfectly, because some visitors decline cookies, but they should be close.
If the form shows a success message but no email arrives, fix that first: why your WordPress contact form isn’t sending emails. If the Contact Form 7 spinner never stops, see the spinner fix, because a form that hangs never fires the success event.

Where to see your leads in GA4
- Reports → Engagement → Events: total
generate_leadevents. - Reports → Acquisition → Traffic acquisition: switch the metric to key events to see which channels bring enquiries, including traffic from ChatGPT or Perplexity (see AI traffic in GA4).
- Explore: add landing page as a dimension to see which pages start the visits that end in a lead. For a local business, this shows whether your service pages or your city pages bring the calls and forms.
Example: a lead tracking plan for a roofing company
Here is a hypothetical example, not a real client. A roofer in Phoenix has a quote request form, a contact form in the footer and a phone number in the header. A simple plan looks like this:
- Quote request form: send
generate_leadwithform_idset to the quote form. - Footer contact form: send the same event with its own
form_id, so you can compare the two. - Phone number: track clicks on the
tel:link as a separate event, because a tap is not the same as a connected call. - Mark only
generate_leadas the main key event. Keep the others as supporting signals.
With this in place, you can open Explore and see which landing pages lead to enquiries, then decide where to spend time next.
Common mistakes
- Counting button clicks instead of successful submissions.
- Tracking the same form with a plugin and with GTM at the same time.
- Forgetting to mark the event as a key event, so it never shows up as a conversion.
- Sending visitor names or emails to GA4 as event parameters.
- Not tagging links in emails and WhatsApp, so leads from them land in “Direct”.
FAQ
Which GA4 event name should I use for a contact form?
generate_lead is one of Google’s recommended event names for leads, so it is a safe choice. Keep the same name across all your forms and use a parameter for the form ID.
Do I need GTM to track Contact Form 7?
Not strictly. You can add the small script from Step 1 and a GA4 gtag call by hand. GTM is easier to test and change later.
Can I track phone calls the same way?
You can track clicks on a tel: link with a GTM click trigger. That counts taps, not connected calls, so treat it as a signal and not a lead count.
Why is my lead count lower than the emails I receive?
Visitors who decline cookies, ad blockers and slow-loading tags all remove some events. A small gap is normal. A large gap means a trigger problem, so run the test steps above.
Does this work for WPForms and Gravity Forms?
Yes, with a different success signal. Check each plugin’s documentation for its JavaScript event or confirmation redirect, then use the same trigger and tag.
Want to know which pages and searches bring your enquiries? See SEO and AI search for home-service businesses, or ask for a free tracking check. For stores, the GA4 ecommerce tracking service covers purchases.


