Views 2 Leads

How to Set Up Google Analytics to Measure Website Lead Generation

19 Oct 2026 4 min read

How to Set Up Google Analytics to Measure Website Lead Generation

 Step-by-step guide to setting up Google Analytics 4 to measure website lead generation, including key events, Tag Manager, data retention and testing.

Google Analytics 4 (GA4) is the standard free tool for understanding how visitors use your website. Out of the box, however, it only counts visits and page views. To measure lead generation, you need to tell it which actions matter. This guide walks through a practical GA4 setup that tracks inquiries, identifies their sources and keeps your data clean.

Step 1: Create Your GA4 Property and Data Stream

Sign in to Google Analytics, create an account and add a property for your business, choosing your time zone and currency. Then create a web data stream using your website address. GA4 will generate a measurement ID beginning with G-. This ID connects your site to your reports, so keep it handy for the next step.

Step 2: Install the Tracking Code

There are two sensible routes. You can paste the Google tag directly into your site, or, better, install Google Tag Manager once and add GA4 through it. Tag Manager makes later tracking changes much easier because you do not need to edit your site each time. WordPress users can use a reputable plugin for either method. Confirm installation by opening the Realtime report and visiting your own site.

Step 3: Enable Enhanced Measurement

In your data stream settings, enhanced measurement can automatically record scrolls, outbound clicks, site search, file downloads and some form interactions. Leave the useful options switched on. Treat automatic form events with caution, though, because they may fire on failed or spam submissions. For serious lead tracking, set up dedicated events.

Step 4: Create Lead Events

GA4 works with events, and the recommended event name for a lead is generate_lead. Use Tag Manager to fire it when a form is successfully submitted, ideally on the thank-you page or when the form plugin confirms success. Create separate events for phone_click and whatsapp_click so you can compare channels. Add parameters such as form name or service type to make reports more meaningful.

Step 5: Mark Events as Key Events

In the Admin area, open Events and mark your lead events as key events. These are the actions GA4 treats as conversions in its reports. Be selective. If you mark everything as a key event, the numbers lose meaning. Choose the actions that genuinely signal a prospect, such as form submissions, calls and WhatsApp clicks.

Step 6: Connect Search Console and Google Ads

Link Google Search Console to see which search queries lead to visits and conversions. If you run Google Ads, link your account so you can import key events and judge campaigns by leads rather than clicks. These integrations turn GA4 from a visitor counter into a lead-generation report.

Step 7: Clean Up Your Data

Create a filter to exclude internal traffic from your office or home network, otherwise your own testing inflates the numbers. Also extend data retention to fourteen months in the data settings, since the default is shorter and limits year-over-year comparisons. Add your own domain to the unwanted referrals list if payment or booking tools send visitors back to your site.

Step 8: Test Before You Trust

Use DebugView or Tag Manager’s preview mode to confirm each event fires once, at the right moment, with the right details. Submit a test form, tap your phone link and click your WhatsApp button. Fixing a broken tag takes minutes; discovering it after three months of missing data is painful.

Step 9: Build a Simple Lead Report

In Explore, create a report showing key events by source and landing page. This reveals which channels and pages produce leads. Check it monthly and compare against your lead log to confirm that analytics matches reality.

Final Thoughts

A careful GA4 setup gives you a dependable view of how your website generates leads. Create the property, install the tag, define lead events, mark key events, link your tools and test everything. The effort takes an afternoon and pays back in better decisions for years.

Get a free quote for your project.

Tell us your goal - a faster site, more leads, or a security check - and we will reply with a clear plan and price.

Achi Systems · Madonna House, Westlands, Nairobi

Reach us directly