Skip to content
VERQEN — home

Insight · Analytics and measurement

Tracking form submissions in GTM: count real leads, not clicks

Why form submission tracking breaks so often and how to track real successful submissions in Google Tag Manager, not clicks or page loads.

By

Published
8 November 2026
Reading time
10 min

The short answer

Tracking form submissions in GTM properly means firing the event when the form confirms success, not when someone clicks the button or a page loads. The most reliable method is a data layer event pushed on the success response, picked up by a custom event trigger and sent to GA4 as generate_lead.

Key points

  1. List every lead form and how it submits: classic, JavaScript or iframe.
  2. Choose one method per form, as close to confirmed success as possible.
  3. Prefer a data layer form_success event from the success response.
  4. Use a custom event trigger and a GA4 generate_lead tag.
  5. Send form_name and a random submission_id. No personal data.
  6. Store the same ID in the CRM.
  7. If no code access: form submission trigger with Check Validation and Wait for Tags.
  8. Run the full test table in preview and DebugView.
  9. Mark generate_lead as the key event, and only that one.
  10. Compare with the CRM weekly for a month.

To track form submissions properly in Google Tag Manager, fire your event when the form confirms success, not when someone clicks the button or a page loads. The most reliable way is a data layer event, pushed by the site when the form returns a success response, picked up by a custom event trigger and sent to GA4 as generate_lead.

Everything else is a compromise. Click triggers count failed attempts. Thank-you pages count refreshes. Built-in form triggers miss forms that submit with JavaScript. Each compromise adds error to the one number marketing is judged on: leads.

This guide compares the methods, shows how to set up the reliable one, what to do when you cannot change the site code, and how to test the result before anyone reports on it. See why GA4 and the CRM disagree on leads.

Why does form tracking break so often?

Form tracking breaks because modern forms rarely behave like the classic HTML form that Tag Manager's built-in trigger was designed for. Many submit in the background with JavaScript, many live inside a third-party iframe, and many show a success message without loading a new page.

The common failure points:

  • JavaScript submission. The form sends data without a normal browser submit, so a standard form trigger may never fire. Google's Tag Manager Help names this case: the custom event trigger is commonly used for form submissions when the default submit behaviour has been overridden.
  • Third-party iframes. Forms embedded from a marketing or scheduling tool sit on another domain. Tag Manager on your page cannot see inside them.
  • Click-based triggers. They fire on every click, including failed validation and double clicks.
  • Thank-you pages. They fire on refresh, on the back button and on return visits.
  • Redesigns. Triggers that rely on a form ID, a CSS class or button text break silently when a developer renames them.

The last one is the most expensive. Tracking that broke in a release can go unnoticed for months, because leads still arrive in the CRM and nobody compares.

Which tracking method should you use?

Use the method that fires closest to confirmed success and depends least on page details. The table ranks the options.

Form tracking methods compared: what each counts and when it breaks
MethodWhat it countsWorks well whenBreaks whenVerdict
Data layer event on success responseConfirmed submissionsA developer can add one line to the form codeRarely; only if the success code changesBest choice
Form tool's own success callback or messageConfirmed submissionsThe tool documents a callback or eventThe tool changes its APIGood for embedded tools
Tag Manager form submission trigger with "Check Validation"Submissions the browser treats as validClassic HTML formsJavaScript submission, iframes, server-side errorsAcceptable fallback
Element visibility of the success messageThe message appearingNo code access, message is stableMessage text or element changesFragile fallback
Thank-you page viewPage loadsForms redirect to a unique pageRefresh, back button, bookmarks, direct visitsUse only with a guard
Click on the submit buttonClicksNever for lead countingAlways overcountsAvoid

A note on enhanced measurement. GA4 can collect form_start and form_submit automatically, according to Google's enhanced measurement documentation. That is useful for form engagement analysis. If you also send generate_lead from Tag Manager, decide which one is your key event. Starring both counts every lead twice. See the guide on deciding which events count as key events.

How do you set up the data layer method?

Ask a developer to push one event when the form succeeds, then build a trigger and a tag around it. For a simple form it is a small code change, and it survives redesigns because it does not depend on IDs or button text.

  1. Agree the event. One name for all lead forms, for example form_success, with a parameter that says which form.
  2. Developer adds the push. In the code that runs after the server confirms the submission:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'form_success',
  form_name: 'contact',
  submission_id: 'a1b2c3'
});
  1. Create data layer variables in Tag Manager for form_name and submission_id.
  2. Create a custom event trigger. Event name: form_success. This is the pattern Google documents for the custom event trigger: a value pushed to the data layer fires the tag.
  3. Create a GA4 event tag. Event name generate_lead, a recommended event in Google's list. Add form_name and submission_id as event parameters.
  4. Mark generate_lead as a key event in GA4, once data arrives.
  5. Register custom dimensions in GA4 for form_name and submission_id, so they appear in reports.
  6. Store the same submission_id in the CRM in a hidden field. That one ID makes record-by-record reconciliation possible later.

The submission ID must be random. Never send an email address, name or phone number to GA4. Google's policies do not allow personal data in Analytics.

What to tell the developer

One sentence is usually enough: "After the form submission returns success, and only then, push form_success to the data layer with the form name and a random submission ID that is also saved on the CRM record."

What if you cannot change the site code?

Use Tag Manager's form submission trigger first, then the success message, and accept that both are weaker. Write the weakness down so reports carry it.

The form submission trigger. Google's Tag Manager Help describes two options that matter:

  • Check Validation. The trigger fires only if the form is successfully sent. Without it, the trigger fires on every attempt to submit.
  • Wait for Tags. The submission is delayed until tags that depend on the trigger have fired. Without it, slow tags may not fire before the next page loads.

Turn both on. Limit the trigger to the pages where the form lives, which Google also recommends for performance. Then test it, because "successfully sent" means valid in the browser. It does not mean your server accepted the data.

Success message visibility. If the form shows a message such as "Thanks, we will be in touch", an element visibility trigger can fire when it appears. Set it to fire once per page. Then add a note to your change log: any edit to that message can break tracking.

Thank-you page with a guard. If you must use the page, fire only when the visitor came from the form, for example with a short-lived flag set at submission and cleared after the event fires. Without a guard, every refresh is a new lead in GA4.

What about forms inside iframes?

You usually cannot track inside a third-party iframe from your own Tag Manager container. Browsers keep a page and an iframe from another domain separate, so the outer page does not see the form's events.

Three options, in order of preference:

  1. Use the tool's own success hook. Many form and scheduling tools publish a callback or a browser message when a submission succeeds. Listen for it and push your form_success event. Check the tool's documentation, because each one names it differently.
  2. Use the tool's native GA4 integration. Some tools can send events to GA4 directly. If you use this, turn off any Tag Manager tag for the same form, or you will create duplicates.
  3. Replace the embed. If neither option exists, a native form on your own page is often the cheaper long-term answer.

How do you test form tracking before you trust it?

Test every way a visitor can succeed or fail, in Tag Manager preview with GA4 DebugView open. Google's DebugView documentation notes that Tag Assistant enables debug mode, so preview sessions appear in DebugView.

Test actions for form tracking and the expected result
Test actionExpected result
Submit a valid formOne generate_lead with correct form_name
Submit with a required field emptyNo generate_lead
Click submit twice quicklyOne generate_lead (or two only if two records reach the CRM)
Refresh the success page or messageNo new generate_lead
Press back, then forwardNo new generate_lead
Submit a second form on the siteOne generate_lead with a different form_name
Decline analytics consent, submitBehaviour matches your consent setup; record what you see

Then check the other side. The test submissions should appear in the CRM with the same submission IDs. Delete or mark them as tests afterwards. Tracing real submissions through every system is also step 3 of how to audit GA4 in a day.

What not to do

  • Do not count clicks as leads. A click on "Send" is an intention, not a submission.
  • Do not rely on CSS classes or button text when a data layer event is possible.
  • Do not run two tracking methods for one form. Choose one, and remove the other.
  • Do not put personal data in event parameters or URLs. Use a random ID.
  • Do not skip the failure tests. Most overcounting shows up only when you try to break the form.
  • Do not publish a Tag Manager change without a version note. You will need the date later.

How do you know the tracking works?

Tracking works when GA4 lead events match real submissions over time, within a gap you can explain.

Each week for the first month, then monthly:

  • Compare counts. GA4 generate_lead events against entries in the form tool or CRM web-form leads, same dates, same time zone.
  • Match IDs. Submissions with an ID in both systems are confirmed. IDs only in the CRM are mostly visitors who declined consent or blocked tags. IDs only in GA4 point to tests or duplicates.
  • Watch for steps. A sudden change on one date usually means a release, a plugin update or a consent change.

GA4 will normally be a little lower than the CRM because of consent and blockers. That is expected. A gap that grows, or GA4 being higher, needs investigation. In our worked example where GA4 and the CRM disagreed by 38%, GA4 was higher because a page-view key event and a form-submit event both counted each submission. The fix was to retire the page-view version and keep the submit event.

If the comparison does not add up and you cannot see why, a GA4 audit checks the forms, the container and the CRM together. "Audit my analytics" is the place to start.

Questions teams ask about form tracking

Our agency set up a click trigger on the submit button. Is that good enough?

No, not for lead counting. It fires on failed validation and double clicks. It can be a useful engagement signal, but your lead number should come from a success event. Moving to a success event usually lowers the GA4 lead count. That drop is the data becoming correct.

Our forms come from an embedded tool. Can Tag Manager see them?

Usually not directly, because the form sits in an iframe on another domain. Use the tool's success callback or its native GA4 integration, and make sure only one of them sends the lead event.

We have no developer time. What is the minimum safe setup?

The Tag Manager form submission trigger with Check Validation and Wait for Tags on, limited to the form pages, plus the full test table. Write down that it may miss JavaScript-only submissions. Plan the data layer event for the next release.

How do we stop the tracking breaking after a redesign?

Use a data layer event, which does not depend on page design. Add form tests to the release checklist, and compare GA4 with the CRM in the first week after launch. Our page on GA4 numbers that do not match the CRM covers what to check when it has already broken.

Written by

VERQEN

VERQEN is a digital growth and search intelligence consulting firm that helps SaaS, ecommerce, marketplace and B2B companies diagnose and fix the SEO, technical, analytics, migration and AI-search problems that stop their websites from producing revenue.

About VERQEN

Want this done on your site instead of by you?

A Growth Diagnostic runs this analysis across search, technical, analytics, content, conversion and AI search, and comes back with what matters first.