The brief.
A consultancy website has one job worth measuring: turning visits into enquiries. The tracking had to show which pages and services lead to an enquiry, respect every visitor's cookie choice, and never slow the site down.
It also had to be the setup Marc recommends to clients: written down and tested.
What was built.
Consent first
A custom cookie banner, the Metric Owl Privacy Banner, runs before Google Tag Manager on every page.
- It sets the Google Consent Mode v2 default before any tag can fire.
- Visitors in the EEA and Switzerland get the opt-in version, chosen on the server before the page is sent.
- Analytics tags wait for analytics consent, and advertising tags for marketing consent.
A documented dataLayer
More than 30 events, each written up in a specification before it was built.
- One set of form events for every form, with an ID per form load that's also sent with the enquiry, so each email can be matched to its GA4 events.
- A lead counted only when the form provider accepts the enquiry, not when the button is clicked.
- No names, email addresses or message text are ever sent.
Enquiries as a funnel
Services are measured like products in a shop, so GA4's funnel reports work for a business with no checkout.
- Lists viewed, a service clicked, a service page viewed, a service chosen in the form, the form started.
- It ends in
generate_lead, the one conversion, carrying the service and its starting price as the value. - Advertising platforms get a lead, never a purchase.
Content groups
Every page says which section it belongs to, so GA4 can compare services, guides, articles and tools at a glance.
- 14 groups, from Home and Services to Sectors, Guides and Tools.
- Set by the site, so new pages are grouped automatically.
- Fills GA4's own Content group report, with no extra setup.
Custom scripts
Three scripts written for Metric Owl, loaded by Google Tag Manager from the site itself.
- Session Integrity Layer: keeps campaign attribution when tracking parameters are stripped, and keeps debugging visits out of the figures.
- Strix Score Index: measures how much of a page was read.
- Lead Quality Scoring: rates each visit's intent, so an enquiry arrives with a score.
Server-side tagging
Analytics events also go to a server-side Google Tag Manager container, with the same consent rules.
- Page views, engagement, reading, page speed and every form step.
- Each one waits for analytics consent, like the GA4 tags.
- Sent with Stape's Data Tag, which Marc also sets up for clients.
Speed.
The cookie banner and Google Tag Manager load after the page has been read, so neither holds up the first paint. The stylesheet is written into each page, and images are sized for the screen.
Testing.
An automated test runs through the site in a real browser after each change. It runs more than 40 checks: every event and parameter in the specification, the order of the funnel, and that consent comes first.
Testing also catches problems people miss. Clicking a link to another part of the same page, such as "Contact", used to make two tags fire again as if a new page had loaded, inflating reading and lead scores. Marc fixed both scripts and added the case to the test, so it can't come back.
Results.
- Every enquiry measured once, with the service it was for and a value.
- A funnel from first visit to enquiry, for a business that sells no products online.
- A written specification and a test that keep the tracking right as the site changes.
It works on any lead generation site. A GA4 mini audit shows how far yours is from it, and the free dataLayer specification template is the starting point used here.
