Tutorials 10 min read
GA4 lead tracking: measure the leads your website really brings
A step-by-step method to count every confirmed lead in Google Analytics 4: a dataLayer event after the server confirms, Google Tag Manager, key events, UTM parameters, testing with DebugView — and consent.
On this page
- Why visits and page views are not enough
- Events, key events and conversions: the vocabulary in 2026
- The architecture: from a confirmed form to a key event
- Step 1 — Push a dataLayer event after the server confirms
- Step 2 — Configure Google Tag Manager
- Step 3 — Mark generate_lead as a key event
- Step 4 — Test with Tag Assistant and DebugView
- Tag your campaigns with UTM parameters
- Attributing leads: what GA4 tells you, and what to keep in your CRM
- Measuring with consent
- Your checklist
- Frequently asked questions
“How many leads did the website bring last month, and from where?” Most small businesses cannot answer that question with confidence. Google Analytics shows visits and page views, but a visit is not a client. GA4 lead tracking closes that gap: every confirmed quote request or contact form becomes an event, the important events are marked as key events, and campaign links carry UTM parameters so you know which channel produced each lead. This guide shows a clean, reliable setup with Google Tag Manager, how to test it, and how to stay within the consent rules.
Why visits and page views are not enough
A thank-you page view is the classic shortcut for counting leads, and it is fragile: the page can be reloaded, bookmarked or reached without sending anything, and some forms never show a separate page at all. The automatic “form interactions” of GA4 enhanced measurement are not precise either: form_submit is recorded when the visitor submits a form, not when your server has accepted it — a submission rejected for a missing field, a spam check or a network error looks the same. To count leads you can trust, the signal must come from the moment the lead is actually saved.
Events, key events and conversions: the vocabulary in 2026
In Google Analytics 4 everything is an event: a page view, a scroll, a click, a lead. In March 2024 Google renamed the events you flag as important in GA4: they are now called key events, and the word conversion is reserved for actions used to measure and optimise Google Ads campaigns. In Google’s words, a key event “measures an action that’s particularly important to the success of your business”. The practical consequence:
Key event — what you analyse in GA4 reports: which pages, sources and campaigns produce leads.
Conversion — a key event you also import into a linked Google Ads account, so that bidding can optimise for it.
For leads, Google recommends a standard event name, generate_lead, described as measuring “when a lead has been generated (for example, through a form)”. It accepts an optional lead_source parameter, and value with currency if you give leads a monetary value. Using the recommended event names rather than inventing your own keeps your data compatible with Google’s reports and future features.
The architecture: from a confirmed form to a key event
A robust setup has five links, each with a single job. The website announces the fact (“a lead was saved”), Tag Manager decides which tag to fire, the consent state decides whether Google may receive it, and GA4 counts it.
Step 1 — Push a dataLayer event after the server confirms
The dataLayer is a simple JavaScript array that your site uses to pass information to Google Tag Manager. Your developer adds one push in the place where the website knows for sure that the lead was saved: the success handler of a form sent in the background, or the confirmation page rendered by the server right after saving (shown once, not on every reload). Google’s dataLayer documentation recommends declaring the array as high as possible in the page, before the Tag Manager snippet.
// Run only once the server has confirmed that the lead was saved,
// e.g. in the success callback of the form request.
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'generate_lead',
lead_source: 'contact_form', // which form produced the lead
form_topic: 'website_redesign' // a category chosen in the form, never free text
});
Two rules matter here. First, never send personal data: no name, e-mail address or phone number, not even hashed in a parameter you invented. Google’s policy is explicit that no data may be passed to Analytics that Google could recognise as personally identifiable information. Send categories (which form, which service), not people. Second, keep the event name stable: reports, key events and Google Ads conversions all depend on it.
Step 2 — Configure Google Tag Manager
In your Tag Manager container, the event above is picked up in four moves:
Variables: create a Data Layer Variable for each parameter you pushed (
lead_source,form_topic).Trigger: create a Custom Event trigger whose event name is exactly
generate_lead.Tag: create a Google Analytics: GA4 Event tag with your measurement ID, the event name
generate_leadand the two parameters mapped to the variables; attach the trigger.Consent: in the tag’s consent settings, check that it depends on
analytics_storage, then preview, test and publish the container with a clear version name.
Custom parameters such as form_topic are collected straight away, but to see them in standard reports you must register them as custom dimensions in the GA4 admin.
Step 3 — Mark generate_lead as a key event
In GA4, open Admin, then the Key events page under data display, and create a key event with the exact name generate_lead (or flag the event in the events list once it has been received). From then on, reports show key events by page, source, medium and campaign. If you advertise on Google Ads, link the accounts and create a conversion from this key event, so that campaigns optimise for real leads rather than for clicks.
The recommended lead events go further than the first contact: qualify_lead, working_lead, disqualify_lead, close_convert_lead and close_unconvert_lead describe what happens to the lead afterwards. These usually happen in your CRM, not on the website, so they are sent server-side, if at all. Start with generate_lead: one reliable event is worth more than six approximate ones.
Step 4 — Test with Tag Assistant and DebugView
In Tag Manager, click Preview: Tag Assistant opens your site in debug mode.
Accept analytics cookies in your own banner. Google notes that events do not appear in DebugView when consent mode is active and the visitor has not consented to analytics.
Send a real test request through the form, with an obvious test name so your team can ignore it.
In Tag Assistant, check that the
generate_leadevent appears in the left column and that your GA4 event tag fired once, with the right parameters.In GA4, open Admin › DebugView: the real-time debug stream should show
generate_leadwith its parameters.Try the failure cases: an empty required field, an invalid e-mail address. No event must fire.
Standard reports are not real-time: allow time for processing before judging the numbers, and use DebugView or the real-time report to validate the setup.
Tag your campaigns with UTM parameters
GA4 recognises search engines and many websites on its own, but newsletters, social posts, QR codes and partner links all look alike unless you tag them. UTM parameters are added to the link and read by GA4 when the visitor arrives. Google’s URL builder guide recommends always setting at least the first three:
Parameter | What it answers | Example value |
|---|---|---|
utm_source | Who sent the visit? | newsletter, linkedin, partner-site |
utm_medium | Through which kind of channel? | email, social, cpc, qr |
utm_campaign | For which campaign? | spring-offer, webinar-march |
utm_content | Which version of the link or creative? | button-top, visual-b |
utm_term | Which paid keyword? | web-agency-paris |
Values are case-sensitive (“LinkedIn” and “linkedin” become two sources), so write a naming convention once and keep it in a shared sheet. Never tag internal links between your own pages: that would restart the session’s source and erase the real origin of the visit. Google Ads links are tagged automatically (auto-tagging); you do not need UTMs there.
Attributing leads: what GA4 tells you, and what to keep in your CRM
When several visits lead to one request, GA4 has to decide which channel gets the credit. Today it offers three attribution models: data-driven, paid and organic last click, and Google paid channels last click; first click, linear, time decay and position-based models were removed in November 2023. That is enough to compare channels over time, but GA4 remains an aggregated, consent-dependent view: it will never tell you that this client came from that newsletter.
For lead-level attribution, store the origin with the lead itself. When the form is submitted, the website saves the UTM parameters of the landing page and the page the request came from alongside the message, and sends them to your CRM. You can then answer the questions that matter commercially: which channel brings leads that sign, not only leads that fill in forms. If your forms already flow into a CRM, our guide on connecting a CRM to your website shows how to carry these fields over without double entry.
Measuring with consent
In France, Google Analytics in its standard configuration needs the visitor’s prior consent, and Google’s tags read that choice through Consent Mode v2. We explain the banner rules, the four consent signals and the difference between basic and advanced mode in our article on the cookie banner and Consent Mode v2. For lead tracking, three consequences matter:
Your dataLayer push can run for everyone; Tag Manager and the consent state decide whether the GA4 tag may send it. Keep the logic in one place.
Visitors who refuse analytics are not counted in GA4. Your GA4 lead count will therefore be lower than the real number of requests — that is normal, not a bug.
The source of truth for the number of leads is your database or CRM; GA4 tells you the trends and the channels among visitors who accepted.
Your checklist
One
generate_leadpush, fired only after the server has saved the lead, with categories but no personal data.A Custom Event trigger and a GA4 event tag in Tag Manager, governed by
analytics_storage.generate_leadmarked as a key event; custom parameters registered as custom dimensions.Success and failure cases tested in Tag Assistant and DebugView.
A written UTM convention applied to every newsletter, post, QR code and partner link.
UTM parameters and source page saved with each lead and sent to the CRM.
A monthly look at leads by channel, compared with the leads that actually signed.
Measurement is also a design question: a landing page built around one clear request is easier to measure — and to improve — than a page with five competing buttons. If you want an expert check of what your current site really measures, our website audit covers tags, consent and key events.
Frequently asked questions
What is the difference between a key event and a conversion in GA4?
Can I track form submissions in GA4 without Google Tag Manager?
Why does GA4 show fewer leads than my inbox or CRM?
Should I use the enhanced measurement form_submit event?
Do I need UTM parameters for Google Ads?
Know where your clients come from
We set up lead tracking that respects consent and gives you numbers you can act on.