On this page
What this issue is
generate_lead is a recommended GA4 event. It should be sent once, at the moment someone successfully gives you their details. This issue means it is sent earlier: when the page loads, when the DOM is ready, or when a form is merely shown.
The usual causes are a Google Tag Manager (GTM) tag using the All Pages, Page View or Window Loaded trigger, a gtag('event', 'generate_lead') call pasted into the page body without a listener, or a trigger on a page path that matches the form page and not the thank-you page.
Why it costs you leads or sales
Every visit to the page counts as a lead. Your reports show a great conversion rate while the inbox stays quiet. If the event is marked as a key event and imported into Google Ads, the bidding system learns from fake conversions and sends you more of the traffic that only views the page.
- Ad clickVisitor lands on the form page
- Page loadsgenerate_lead fires here
- Form submittedOnly some visitors get here
- Real lead dataCannot be separated from page views
The lead event is sent at page load, long before any form is submitted. Real leads can no longer be told apart from visits.
Example: 1,000 visitors, 40 real submissions. A load-triggered event reports 1,000 leads.
How to check if your site has it
Open GA4 DebugView
In GA4 go to Admin > DebugView. Turn on Google Tag Assistant debug mode, or use GTM Preview, and load your form page.
Load the page and do nothing
Do not touch the form. If generate_lead appears in the DebugView stream, it fires on load.
Submit the form
Check whether a second generate_lead appears, or none at all. Either shows the trigger is wrong.
Compare with real leads
In Reports > Engagement > Events, compare generate_lead counts with the number of entries in your CRM or inbox for the same dates. A big gap points to this issue.
How to fix it
The goal is the same everywhere: fire the event only after a successful submission. Pick the trigger that matches how your form behaves.
Open the generate_lead tag
In Tags, open your GA4 Event tag with event name generate_lead and look at its Triggering section.
Remove load triggers
Remove All Pages, Page View, DOM Ready and Window Loaded triggers from this tag.
Add a submit trigger
Create a Form Submission trigger limited to your form (Page URL or Form ID matches). If the form submits by AJAX and the trigger never fires, use a Custom Event trigger that listens for a dataLayer event your form pushes on success.
Preview and publish
Test in Preview mode, then publish the container.
Find where the event is added
Check your GA4 plugin, your form plugin's tracking or integration settings, the theme header and any code snippet plugin for a generate_lead call.
Use the form's success hook
Fire the event from the form plugin's success action (for example a thank-you redirect or its success event), not from a page-wide script.
Clear the cache
Purge page and CDN caches so the old script is gone.
Check Customer events
In Settings > Customer events, review custom pixels for a generate_lead call that runs on page_viewed.
Subscribe to the right event
Fire the lead event only on a form success signal, such as a theme newsletter or contact form success state, not on page_viewed.
Check theme code
Search theme.liquid for gtag('event', 'generate_lead').
Search custom code
In Site settings > Custom code and each page's settings, look for a generate_lead call outside a form handler.
Fire on the success state
Webflow forms submit by AJAX. Fire the event from a submit listener or a GTM trigger tied to the form, not on page load.
Check tracking code
In the funnel or website Settings > Tracking code, look for a generate_lead call in the header or footer.
Move it to the form
Fire the event on form submit, or on the thank-you step only, and make sure that step cannot be opened without submitting.
Review Marketing integrations
In Marketing & SEO > Marketing Integrations or Tracking & Analytics, check any custom tag for a generate_lead call set to load on All pages.
Limit the tag
Set the tag to fire only on the thank-you page, or use a form submit event from Wix's form settings.
Check code injection
In Settings > Developer Tools > Code Injection, look for a generate_lead call in the header or footer.
Use the form's success action
Add the event to the form block's Post-Submit Message or redirect page (Advanced settings), not to site-wide code.
Wrap the call in a listener
Move gtag('event', 'generate_lead') into a submit handler, and send it only after the server confirms success.
document.querySelector('#lead-form').addEventListener('submit', function (e) {
e.preventDefault();
var form = e.target;
fetch(form.action, { method: 'POST', body: new FormData(form) })
.then(function (res) {
if (res.ok) {
gtag('event', 'generate_lead', { form_id: 'lead-form' });
form.reset();
}
});
});Before
- Tag trigger: All Pages
- Fires when the page loads
- Leads equal page views
After
- Tag trigger: successful form submission
- Fires once per real lead
- Leads match the CRM
How to confirm it's fixed
- Load the form page in DebugView: no generate_lead appears.
- Scroll, click around and open the form: still nothing.
- Submit a valid test entry: exactly one generate_lead appears.
- Submit an invalid form: no event is sent.
- After a day, GA4 lead counts are close to your CRM entries.
How to prevent it happening again
- Never attach conversion tags to All Pages or Window Loaded triggers.
- Name triggers clearly, for example 'Form success - contact'.
- Test in GTM Preview before every publish.
- Re-run the load-and-submit test after theme, plugin or form changes.
- Compare GA4 leads with CRM leads every month.
How FunnelGuard handles this
FunnelGuard detects this only partly. It runs your lead form journey on a schedule and checks the tracking hits sent at each step. That per-step view means you can see a generate_lead hit and which step it came with. It does not assert trigger timing, so it does not on its own flag that the hit arrived at page load instead of at submit.
To cover the rest by hand, run the DebugView test above after every change: load the page, wait, and confirm nothing fires, then submit and confirm one event. FunnelGuard still helps by confirming that test leads reach your inbox and CRM, so you can compare real submissions against the lead counts in GA4.
Questions people ask
Why is my GA4 generate_lead event firing when the page loads?
The tag is most likely using an All Pages, Page View or Window Loaded trigger in Google Tag Manager, or a gtag call sits in the page without a submit listener. Change the trigger to a form submission or success event.
How do I make generate_lead fire only on form submit?
In GTM, attach the tag to a Form Submission trigger for your form, or to a Custom Event your form pushes to the dataLayer on success. For AJAX forms, send the event only after the server confirms success.
How can I tell if generate_lead fires on page load?
Open GA4 DebugView, load the form page and do nothing. If generate_lead appears, it fires on load. Also compare GA4 lead counts with entries in your CRM.
Does a wrong generate_lead trigger affect Google Ads?
Yes. If generate_lead is a key event imported into Google Ads, false conversions teach bidding to favour page viewers. Fix the trigger, then review which conversions your campaigns optimize for.
Should generate_lead fire on the thank-you page or on submit?
Either works if it is reliable. A thank-you page trigger is simple but counts refreshes and direct visits unless you guard it. A submit success trigger is more accurate when set up correctly.
Will fixing the trigger lower my GA4 conversions?
Yes, usually sharply, because the inflated page-load events disappear. The lower number is the true one, and it should match your CRM.
Can FunnelGuard tell me if generate_lead fires too early?
Only partly. FunnelGuard checks tracking hits per journey step but does not assert trigger timing, so confirm it by hand in DebugView.
Related issues
- TRK-043generate_lead not sent on form submitFix guide
- TRK-045Lead event fires on submit click even when validation failsFix guide
- TRK-046Conversion event fires on every page view of thank-you page (refresh)Fix guide
- TRK-047Event name typo (Generate_Lead vs generate_lead)Fix guide
- TRK-049Required event parameter missing (form_id, method)Fix guide
- TRK-050Parameter value is undefined, null or '(not set)'Fix guide