Skip to content

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.

Illustration: a submitted form sends a glowing event along a path into an analytics funnel and a bar chart
On this page
  1. Why visits and page views are not enough
  2. Events, key events and conversions: the vocabulary in 2026
  3. The architecture: from a confirmed form to a key event
  4. Step 1 — Push a dataLayer event after the server confirms
  5. Step 2 — Configure Google Tag Manager
  6. Step 3 — Mark generate_lead as a key event
  7. Step 4 — Test with Tag Assistant and DebugView
  8. Tag your campaigns with UTM parameters
  9. Attributing leads: what GA4 tells you, and what to keep in your CRM
  10. Measuring with consent
  11. Your checklist
  12. 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.

Diagram: the form is submitted, the server saves the lead, the page pushes generate_lead to the dataLayer, a GTM trigger fires the GA4 event tag if consent allows, GA4 counts a key event.
The lead is counted only after the server has saved it, and only sent to Google when consent allows 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.

contact-form.js
// 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:

  1. Variables: create a Data Layer Variable for each parameter you pushed (lead_source, form_topic).

  2. Trigger: create a Custom Event trigger whose event name is exactly generate_lead.

  3. Tag: create a Google Analytics: GA4 Event tag with your measurement ID, the event name generate_lead and the two parameters mapped to the variables; attach the trigger.

  4. 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

  1. In Tag Manager, click Preview: Tag Assistant opens your site in debug mode.

  2. 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.

  3. Send a real test request through the form, with an obvious test name so your team can ignore it.

  4. In Tag Assistant, check that the generate_lead event appears in the left column and that your GA4 event tag fired once, with the right parameters.

  5. In GA4, open Admin › DebugView: the real-time debug stream should show generate_lead with its parameters.

  6. 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.

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_lead push, 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_lead marked 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?
Since March 2024, an event you flag as important in Google Analytics 4 is called a key event and is used for analysis in GA4 reports. A conversion is a key event that you also use in a linked Google Ads account to measure and optimise campaigns.
Can I track form submissions in GA4 without Google Tag Manager?
Yes, with gtag.js your developer can send the generate_lead event directly after the server confirms the lead. Tag Manager is not mandatory, but it keeps all tags and consent rules in one place and lets you change them without touching the code.
Why does GA4 show fewer leads than my inbox or CRM?
Visitors who refuse analytics cookies are not counted, and blockers or private browsing also hide some visits. Use your CRM or database as the reference for the number of leads, and GA4 for trends and channels.
Should I use the enhanced measurement form_submit event?
It is a useful signal of intent, but it is recorded when a form is submitted, not when your server accepts it. For counting leads, a generate_lead event pushed after the server’s confirmation is more reliable.
Do I need UTM parameters for Google Ads?
Not if Google Ads and GA4 are linked with auto-tagging enabled. UTM parameters are for everything else: newsletters, social media, QR codes, partner sites and ads on other platforms.

Know where your clients come from

We set up lead tracking that respects consent and gives you numbers you can act on.

Talk to us

Newsletter

Practical notes on web, SEO and AI

One e-mail a month at most: new articles, checklists and what actually works for small businesses. No spam, unsubscribe in one click.

Your address is only used to send this newsletter, through our e-mailing provider Brevo. Privacy policy

Web development 9 min read

Website security for small businesses: 10 practical measures

HTTPS and HSTS, updates, passwords and two-factor authentication, access rights, 3-2-1 backups, firewall, form protection, hosting, monitoring and what the GDPR requires after a breach: ten measures to secure a small business website.

Roma Roterman

Automation 8 min read

CRM for a small business: how to choose one and connect your website

What a CRM is really for, the features a small business needs, how to design pipeline stages, three ways to connect your website form without double entry, the GDPR settings to make from day one, and the main types of tools.

Roma Roterman

Have a project in mind?

Tell us what you want to achieve: you get a clear proposal and a fixed price before any work starts.

Talk about your project