Free SEO audit for new clients — claim yours
Home/Blog/Analytics/How to Track Form Submissions in GA4 and GTM
Analytics

How to Track Form Submissions in GA4 and GTM

How to Track Form Submissions in GA4 and GTM
Table of contents
  1. Key Takeaways
  2. Choosing a method
  3. Method 1: Enhanced measurement
  4. Method 2: Thank-you page
  5. Method 3: GTM Form Submission trigger
  6. Method 4: Element visibility on the success message
  7. Method 5: Data layer event (most reliable)
  8. After tracking: make the data useful
  9. Common mistakes in form tracking
  10. Related Guides
  11. Frequently Asked Questions
    1. Does GA4 track form submissions automatically?
    2. What event name should I use for form submissions?
    3. Why is my GTM Form Submission trigger not firing?
    4. Can I track Contact Form 7, Gravity Forms or WPForms?
    5. How do I test form tracking?
  12. Conclusion
  13. References

For most service businesses, a form submission is the moment a visitor becomes a lead. Yet form tracking is one of the most commonly broken parts of analytics. Enhanced measurement fires on attempts that fail validation, AJAX forms never trigger a page load, and thank-you pages get bookmarked and revisited. The result is lead numbers nobody trusts.

This guide explains five ways to track form submissions in GA4 and Google Tag Manager, from the quick default to the most reliable developer approach. You will learn which method suits which form, how to set each up step by step, and how to test it before you report on it.

If you need a refresher on how events work, see our guide to GA4 events. For GTM basics, see our Google Tag Manager guide.

Key Takeaways

  • GA4's enhanced measurement can send form_start and form_submit, but it is not reliable enough for lead reporting on many sites.
  • A dedicated thank-you page is the simplest robust method when your form supports redirects.
  • GTM's Form Submission trigger works for classic HTML forms; enable "Check Validation" to ignore failed attempts.
  • For AJAX forms, use a data layer event pushed on success, or a visibility trigger on the success message.
  • Mark the final event as a key event and never send personal data such as email addresses to GA4.

Choosing a method

MethodReliabilityEffortBest for
Enhanced measurement (form_submit)Low to mediumNoneQuick directional data
Thank-you page viewHighLowForms that can redirect to a unique URL
GTM Form Submission triggerMediumLowStandard HTML forms that reload the page
Element visibility (success message)Medium to highMediumAJAX forms with a confirmation message
Data layer event on successHighestMedium (may need a developer)Any form, especially plugins with JavaScript hooks

Method 1: Enhanced measurement

GA4's enhanced measurement includes form interactions: form_start the first time a user interacts with a form in a session, and form_submit when a form is submitted. It is switched on in the web data stream settings.

The problem is that it detects the submit action, not success. It may fire on attempts that fail validation, miss AJAX forms or count newsletter, search and login forms alongside lead forms. Use it as a sanity check, not as your lead count. To report on parameters such as form ID, Google notes you need to create custom dimensions for them.

Method 2: Thank-you page

If your form plugin can redirect to a dedicated page, such as /thank-you-quote/, you can count page views of that URL as leads.

  1. Create a unique thank-you page for each important form and set it to noindex.
  2. Configure the form to redirect there on success.
  3. In GA4, go to Admin → Events → Create event and create a new event, for example generate_lead, when event_name equals page_view and page_location contains your thank-you path.
  4. Mark generate_lead as a key event.
  5. Test with a real submission and check DebugView.

Weakness: anyone who revisits or bookmarks the page counts again. Keep it out of navigation and internal links.

Method 3: GTM Form Submission trigger

Google Tag Manager has a built-in Form Submission trigger that listens for the browser's submit event. Two options matter. "Check Validation" makes it fire only when the form is successfully sent. "Wait for Tags" delays the submission briefly so your tags can fire, and Google explains why:

“If unselected, slow tags may not fire before the form submit causes the next page to load.”

— Tag Manager Help, Form submission trigger
  1. Enable the built-in Form variables (Form ID, Form Classes, Form URL and others) under Variables → Configure.
  2. Create a trigger of type Form Submission, tick Wait for Tags and Check Validation.
  3. Limit it to "Some Forms" using a condition such as Form ID equals contact-form.
  4. Create a GA4 Event tag with event name generate_lead and a parameter like form_name.
  5. Test in Preview mode with both a valid and an invalid submission.

Many modern forms submit via JavaScript without a native submit event, so this trigger may never fire. If Preview shows no "Form Submit" in the event list, move to method 4 or 5.

Method 4: Element visibility on the success message

AJAX forms usually show an inline message such as "Thanks, we will be in touch". GTM's Element Visibility trigger can fire when that element appears.

  • Identify the success message's CSS selector or ID using your browser's inspect tool.
  • Create an Element Visibility trigger using that selector, firing once per page, with "Observe DOM changes" enabled.
  • Attach your GA4 generate_lead event tag to it.

This is reliable as long as the message only appears on success, and the selector does not change when the plugin updates.

Method 5: Data layer event (most reliable)

The gold standard is to push a custom event into the data layer when the form confirms success. Many popular WordPress form plugins expose JavaScript events or hooks for exactly this. A developer can add:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "form_success",
form_name: "quote_request",
form_location: "pricing_page"
});

In GTM, create a Custom Event trigger for form_success, register form_name as a data layer variable and send it with your GA4 event. This method ignores validation failures and works with AJAX, multi-step and embedded forms.

After tracking: make the data useful

TaskWhy
Mark generate_lead as a key eventShows leads in acquisition reports and allows import to Google Ads; see GA4 key events
Register form_name as a custom dimensionLets you compare contact, quote and demo forms
Import into Google AdsLets Smart Bidding optimise for leads; see Google Ads conversion tracking
Send offline outcomesTrack which leads actually become customers via offline conversion tracking
Filter internal trafficStop staff test submissions inflating results; see exclude internal traffic in GA4

Leads from native ad forms, such as Google Ads lead forms and Facebook lead ads, never touch your website, so they will not appear in GA4. Report them separately or bring them in through your CRM.

Common mistakes in form tracking

  • Counting attempts, not successes. Validation errors fire the event and inflate leads.
  • Sending personal data. Never pass names, emails or phone numbers to GA4 as parameters; Google's policies prohibit personally identifiable information.
  • One event for every form. Newsletter sign-ups and quote requests have very different value. Use a form_name parameter or separate events.
  • Double counting. Enhanced measurement form_submit plus a GTM event both marked as key events counts each lead twice.
  • Not retesting after updates. Plugin, theme and form builder updates often change selectors and break triggers.

Frequently Asked Questions

Does GA4 track form submissions automatically?

Partly. Enhanced measurement can send form_start and form_submit, but it may count failed attempts or miss AJAX forms, so use a dedicated method for lead reporting.

What event name should I use for form submissions?

Google's recommended event generate_lead is a sensible choice for lead forms. Add a form_name parameter to tell different forms apart.

Why is my GTM Form Submission trigger not firing?

Many forms submit with JavaScript and never fire a native submit event. Use an element visibility trigger on the success message or a data layer event instead.

Can I track Contact Form 7, Gravity Forms or WPForms?

Yes. Most popular WordPress form plugins offer a redirect option or a JavaScript success event you can use with a GTM custom event trigger.

How do I test form tracking?

Use GTM Preview and GA4 DebugView. Submit once with valid data and once with an error, and confirm the event fires only on the successful submission.

Conclusion

Reliable form submission tracking is the foundation of every lead-gen report and every bidding algorithm, and it is what makes marketing reports clients actually read credible. Start with a thank-you page or data layer event, test valid and invalid submissions, mark the event as a key event and connect it to your ads and CRM. If you want more of those forms filled in the first place, explore our conversion optimisation services or get a quote.

References

  1. Google Analytics Help: Enhanced measurement events
  2. Tag Manager Help: Form submission trigger
  3. Google Analytics Help: About key events
  4. Google Analytics Help: Monitor events in DebugView
  5. Google for Developers: Recommended events reference
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

How to Choose the Primary Keyword for an Existing Page
Analytics

How to Choose the Primary Keyword for an Existing Page

Old pages drift into ranking for searches nobody planned. Here is how to use Search Console data to pick one clear primary keyword and re-center the page without losing what already works.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote