On this page
What this issue is
A lead event such as GA4's generate_lead should record one thing: a person successfully gave you their details. This issue happens when the tag fires on the click of the submit button instead. The click happens before the form checks the fields.
If the visitor leaves the email empty, mistypes it, or skips a required field, the form shows an error and sends nothing. The click already happened, so the event has already gone to GA4, and often to Google Ads, Meta and other platforms that share the same trigger.
- Visitor fills formEmail field has a typo
- Clicks submitClick trigger fires the lead event
- Validation failsError message, nothing sent
- No lead in CRMBut analytics counts one
The tracking fires at the click, before validation decides whether the lead is real.
Why it costs you leads or sales
The damage is to your data, and through your data, to your spend. Reports show more leads than your CRM holds, so cost per lead looks better than it is. Campaigns that attract people who struggle with the form look like winners.
It is worse when the event is imported as a conversion. Smart bidding in Google Ads and Meta's optimisation learn from conversions. If failed attempts count, the platforms learn from them and can steer budget toward the wrong audiences.
Example: 100 visitors click submit in a week. 30 hit a validation error on the first try and 12 of them give up. Click tracking counts every click, success tracking counts only sent forms.
How to check if your site has it
Open GTM Preview or GA4 DebugView
In Google Tag Manager click Preview and enter your page URL. Or enable DebugView in GA4 under Admin > DebugView with the Tag Assistant or a debug extension.
Submit the form with errors
Leave a required field empty or type an invalid email such as 'test@'. Click submit and confirm the page shows an error.
Look for the lead event
If
generate_lead(or your lead tag) appears in the preview or DebugView, the event fires without validation. It should not appear until a valid submit.Compare with your inbox or CRM
Over a week, compare GA4 lead counts with entries in the form tool or CRM. A GA4 count clearly higher than real entries is a strong sign.
Check the trigger typeGoogle Tag Manager
In GTM open the lead tag and read its trigger. A 'Click' trigger on a button, or a Form Submission trigger with 'Check Validation' off, is the usual cause.
How to fix it
The principle is the same everywhere: fire the event on a success signal, not on the click. Good signals are a redirect to a thank-you page, a success message appearing, or a success event the form pushes to the data layer.
Replace the click trigger
Open the lead tag, remove the button Click trigger and create a new one. Use a Form Submission trigger, tick 'Check Validation' and, if the form reloads the page, 'Wait for Tags'.
Or use a thank-you page trigger
Create a Page View trigger where Page Path equals your thank-you URL. This is the most reliable option when the form redirects.
Or use a success event
For AJAX forms, ask the developer or form plugin to push an event on success, then trigger on a Custom Event with that name.
Preview and publish
Test an invalid and a valid submit in Preview, then publish the container.
Use the form plugin's success hook
Contact Form 7 fires a
wpcf7mailsentDOM event only after the mail is sent. Gravity Forms and WPForms can redirect to a confirmation page or show a confirmation you can trigger on.Remove click tracking from the theme or tracking plugin
Check any plugin setting that tracks 'button clicks' as leads and turn it off for the form.
Trigger in GTM
Create a Custom Event trigger from the data layer push or the thank-you page view.
Find the success state
Shopify contact and newsletter forms add
?contact_posted=trueto the URL, or show a success block. Trigger on those rather than the button.Check theme code
Search the theme for custom
gtag('event'ordataLayer.pushcalls inside a click handler and move them to the success branch.
Use the success state
Webflow shows a 'Form Success' block only after a valid submit. Trigger on its visibility in GTM, or set a redirect to a thank-you page in the form settings.
Avoid button click triggers
Remove any custom code or GTM tag that listens to clicks on the submit button.
Redirect to a thank-you page
In the form or survey settings set a redirect URL after submission, then fire the lead event on that page.
Remove click-based tracking
Delete custom scripts in the funnel step that fire on button click.
Set a thank-you page action
In the form settings choose 'Go to a thank you page' after submission.
Track the thank-you page
In Marketing Integrations or GTM, fire the lead event on that page only, not on the button.
Use the form storage and redirect
In the form block's Storage or Advanced settings, set a custom redirect or use the success message.
Track the redirect page
Fire the lead event on the redirect page via GTM or Code Injection, not through a button click.
Fire inside the success handler
Call the event only after the server or validation confirms success, as in the snippet below.
// Wrong: fires before validation
// button.addEventListener('click', () => gtag('event', 'generate_lead'));
form.addEventListener('submit', async (e) => {
e.preventDefault();
if (!form.checkValidity()) {
form.reportValidity();
return; // no event on invalid input
}
const res = await fetch(form.action, { method: 'POST', body: new FormData(form) });
if (res.ok) {
gtag('event', 'generate_lead', { form_id: form.id });
}
});Before
- Trigger: click on the submit button
- Fires on empty or invalid forms
- GA4 leads higher than CRM entries
After
- Trigger: success signal or validated submission
- Invalid attempts send nothing
- GA4 leads match CRM entries
Click trigger
Leads or data lost
An invalid form still sends a lead event. GA4 and ad platforms count a lead that never reached you.
Toggle the trigger to see what an invalid submit does to your lead count.
How to confirm it's fixed
- Submit with an empty required field: no lead event in GTM Preview or DebugView
- Submit with an invalid email: no lead event
- Fix the error and submit validly: exactly one lead event
- Refresh the thank-you page: no second event (see TRK-046)
- The test entry appears in your inbox or CRM
- After a week, GA4 lead count is close to real form entries
How to prevent it happening again
This usually returns when someone rebuilds the form, swaps a plugin or adds a new tag in a hurry. Keep a short rule in your tracking notes: lead events fire on success, never on click.
- Include an invalid-submit test in your launch checklist for every new form
- Review GTM triggers whenever a form tool or theme changes
- Reconcile GA4 lead counts with CRM entries monthly
- Use a naming note in GTM such as 'Lead - success only' on the tag
- Share the success-signal rule with anyone who edits tags
How FunnelGuard handles this
FunnelGuard does not check this yet. Its robot visitor submits your form with valid test data, so an invalid-submit variant is not built. It is a possible future check.
What FunnelGuard does cover nearby: it runs your real lead journey on a schedule, checks that the tracking hits to GA4, Google Ads, Meta and other platforms are sent on a valid submit, and checks that the test lead reaches your inbox and CRM. That helps you spot a lead event that stops firing, but it will not tell you that the event also fires on failed attempts.
Questions people ask
Why is my GA4 lead event firing when the form has errors?
The tag is most likely triggered by a click on the submit button. The click happens before the form validates, so the event is sent even if the form is rejected. Switch the trigger to a success signal such as a thank-you page or a validated form submission.
How do I make GTM fire a tag only when a form is valid?
Use a Form Submission trigger and tick 'Check Validation'. GTM then ignores submissions that the form blocks. If the form is AJAX-based and GTM does not detect it, use a Custom Event pushed to the data layer on success.
Why does GA4 show more leads than my CRM?
Common causes are click-based triggers counting failed attempts, retries firing the event several times, and thank-you page refreshes. Test an invalid submission in DebugView to see whether failed attempts are being counted.
How do I test that my lead event does not fire on invalid input?
Open GTM Preview or GA4 DebugView, then submit the form with an empty required field or a malformed email. If no lead event appears, the setup is correct. Then submit validly and confirm exactly one event.
Does a wrong lead event affect Google Ads and Meta?
Yes, if the event is imported as a conversion or sent to those platforms. Their bidding learns from the conversions you report, so failed attempts can push budget toward audiences that never become leads.
Is a thank-you page trigger better than a form submit trigger?
Usually yes, because the page only loads after a successful submission. Its weakness is that refreshes can fire the event again, so limit it to once per session or per load. See the thank-you page refresh issue for that.
Does FunnelGuard detect lead events firing on invalid submits?
No. FunnelGuard does not check this yet, and it is a possible future check. It does run your real form journey with valid data and verifies tracking hits and lead delivery, so you still need to test invalid input manually.
Related issues
- TRK-043generate_lead not sent on form submitFix guide
- TRK-044generate_lead fires on page load instead of submitFix guide
- TRK-046Conversion event fires on every page view of thank-you page (refresh)Fix guide
- TRK-049Required event parameter missing (form_id, method)Fix guide
- TRK-047Event name typo (Generate_Lead vs generate_lead)Fix guide
- TRK-050Parameter value is undefined, null or '(not set)'Fix guide