Install the plumbing
- Cost: $0, all free tools
- Time: Half a day to a weekend
- Who it's for: every business, before any traffic
Let's get this out of the way up front, because almost every marketing failure I've seen in 25 years traces back to it: you set up the tracking, and then you drive traffic. That's the order. Not the other way around.
People want to skip this. I understand. Installing analytics is the opposite of glamorous, and it's tempting to "just get the ads running." Here's the honest cost of skipping it: every dollar you spend in the dark is a dollar you can't learn from. Ads, content, and email are all experiments; a measurement layer is what reads the results of the experiment. Without it, you're not marketing. You're guessing, expensively, at volume.
So here's the plan for the book's first recipe. By the end of this chapter, before a single campaign is turned on anywhere, you will have:
- GA4 properly installed and collecting data,
- Google Tag Manager wired to it (this is your traffic cop for everything else),
- your conversion events defined (the "that worked" moments),
- and the key connections (ads, pixels, forms, CRM) made and verified,
- plus the UTM and consent habits that keep it trustworthy.
Call it the plumbing for a reason. It's the pipes and valves behind the wall. Nobody sees it, but nothing works without it, and once it's in, every other recipe in this book is measurable. Fix it here, and you fix it forever.
What "the plumbing" actually includes
A quick map so you know the whole scope before we lay the first pipe:
| Piece | What it does | Tool (all free) | Recipe ref |
|---|---|---|---|
| Analytics | Records every visit, click, and action | GA4 | R003 |
| Tag manager | Fires tracking tags without touching code each time | GTM | R004 |
| Conversion events | The moments that mean "a lead/a sale" | GA4 key events | R004 |
| Ad accounts | Tells Google/Meta what to optimize toward | GA4↔Ads, Pixel+CAPI | R035 |
| Forms/landing pages | Captures the lead and proves the pipe delivers | GTM form trigger | R006 |
| CRM | The lead's destination so sales can act | your CRM | R041 |
| UTM discipline | Labels every link so you know which source earned the win | URL builder | R001 |
| Consent | Keeps it legal + accurate in a consent-first world | Consent Mode | R014 |
Read that table as the to-do list. Now let's install it, in order.
Step 1 · Create your GA4 property and web data stream
Official source: support.google.com/analytics/answer/9304153 (the only published steps).
- Go to analytics.google.com and click Start measuring (or Admin → Create → Account). You'll need an Editor role on the account.
- Create the property (Admin → Create → Property): give it a name, pick the reporting time zone and currency, industry category, and business size. Don't overthink it. Set these once, right, and move on.
- Under Admin → Data collection and modification → Data Streams → Add stream → Web.
- Enter your site URL and a stream name. Turn on Enhanced Measurement. This quietly collects page views, scrolls, outbound clicks, file downloads, and form interactions for you with zero code. This is the free gift you'd be silly to decline.
- Create the stream, then copy the Measurement ID (starts with
G-). You'll paste this into Tag Manager next.
Here's the subtle part for a veteran like you: GA4's automatically collected events (first_visit, session_start, user_engagement) fire from the Google tag itself, but several web interactions you might assume are "automatic" (form_start, form_submit, file_download, scroll) actually come through Enhanced Measurement. And in 2026 the Google tag only captures them if automatic event detection is toggled on in the tag settings, not just in the data stream. Both switches have to be on. Half the "why isn't my form tracking?" support tickets I've seen come from exactly one of these two being off.
✅ Tested and working. Now confirm GA4 actually sees you. Open your site in a normal (non-incognito) tab and go to GA4 → Realtime. You should appear as an active user within seconds. For a closer look, open Chrome DevTools → Network and filter for
collect.google-analytics.com. That is your GA4 hit. No hit, no data. Fix the snippet before moving on.
Step 2 · Create the Tag Manager container and connect it to GA4
Official sources: support.google.com/tagmanager/answer/14842164 · /answer/14847097 ·
/answer/9442095 · /answer/15756616.
- Go to tagmanager.google.com → Accounts → Create Account (name it sensibly; pick your country).
- Create the container: name it after your site URL, and set the type to Web. Accept the terms.
- Install the two GTM snippet blocks on your site. One in the
<head>, one right after the opening<body>tag. These two lines are the traffic-cop for everything you'll ever add. Worth 30 seconds to confirm they're on every page (your theme/header and body footer). - Add the Google tag (this is the 2026 name; see below): Tags → New → Google
Analytics → Google Analytics. Paste your Measurement ID (
G-…) as the Tag ID. - Set Triggering = Initialization – All Initialization Events. Firing on initialization (rather than "All Pages") makes the tag load early and correctly. It's the modern recommended setup, and another subtle thing that catches people out.
- Verify with Preview (Tag Assistant), then Submit → Publish and Create Version.
This is a rename you'd otherwise get wrong (2026): the old template was "Google Analytics: GA4 Configuration" fired on "All Pages." That's outdated. The current flow is a single Google tag fired on Initialization. Same job, new name and firing point. And if you're reading an older guide that says "GA4 Configuration tag on All Pages," it will lead you slightly astray.
✅ Tested and working. Use GTM Preview mode (the built-in debugger, no extension needed): click Preview, enter your site URL, and in the debug console confirm the Google tag fires on page load with your Measurement ID. Cross-check in DevTools → Network that
gtm.js?...id=GTM-XXXXloads. If the tag does not fire, fix the trigger before moving on.
Step 3 · Define your conversion events ("key events")
Official sources: support.google.com/analytics/answer/12844695 · /answer/13128484 ·
/answer/13034206.
A conversion is the moment that means the marketing worked: "someone submitted the form," or "someone bought." In GA4's current language that's a key event (they renamed it in 2024; "conversion" is the old word).
- In GTM, create a tag: Tags → New → Google Analytics: GA4 Event. Enter your
Measurement ID and the Event Name. For a lead, the recommended event name is
generate_lead. Use the recommended name whenever one matches, because GA4 then populates its standard reports for free. (2026 also added a whole recommended lead-gen set:qualify_lead,disqualify_lead,working_lead,close_convert_lead,close_unconvert_lead.) - Add a trigger for the moment it should fire: your form submission, a click on the call button, or a "thank you" page view.
- Preview it, confirm it fires, then Publish.
- In GA4: Admin → Data display → Events → Key events tab → click the star to mark the event as a key event. That star is what GA4 (and Google Ads, next) will optimize and report against.
- (Optional, for later) import the GA4 key event into Google Ads as a conversion; see Step 4.
Veteran tip: you don't always need a tag. GA4 can create a key event "without code" off an existing event, e.g. mark
page_viewon your/thank-youURL as a key event. Good for fast wins; a dedicated GA4 Event tag gives you richer lead values later.✅ Tested and working. In GTM Preview, submit your form (or click the call button) and confirm the GA4 event fires with your event name (for a lead,
generate_lead). Then in GA4 Realtime confirm the event appears, and that its key event star is set under Admin → Events → Key events. Optional Chrome helper: a dataLayer inspector extension lets you watchdataLayer.pushmessages as they fire.
Step 4 · Connect the systems (link everything before you spend)
Now the plumbing branches out to the places that need the data.
a) GA4 → Google Ads. In GA4: Admin → Google Ads linking, connect your Google Ads
account and enable the key events you want shared. Then in Google Ads, import those events as
conversions (they arrive as "secondary" by default to avoid double counting; mark the
bid-boosting ones "primary"). Now Google Ads can optimize for actions GA4 saw.
Sources: support.google.com/analytics/answer/9379420 · support.google.com/google-ads/answer/13735417.
b) Meta Pixel + Conversions API (CAPI). For Facebook/Instagram ads you need both.
In 2026 this is "pixel AND CAPI," not "pixel OR CAPI." Install the Pixel base code in the
<head>, then generate a CAPI access token in Events Manager (Settings → Generate
access token) and wire it up. The paired setup is Meta's recommended durable path for
server-side reliability.
Sources: developers.facebook.com (Meta Pixel get-started, Conversions API get-started).
c) Ecommerce events. For a store, send the recommended GA4 events with the data Google
expects: at minimum view_item, add_to_cart, begin_checkout, and purchase (each with
currency, value, and items). The event name is typed into the GA4 Event tag's "Event
name" field in GTM; the product data rides in the tag's parameters.
Source: developers.google.com/analytics/devguides/collection/ga4/reference/events.
d) Form submissions. In GTM, use the built-in Form Submission trigger; enable Wait
for Tags (so navigation doesn't kill the tracking event) and Check Validation (so only
successful submits count). If your native form handler overrides the default submit, push a
custom dataLayer event instead and trigger on it.
Source: support.google.com/tagmanager/answer/7679217.
e) CRM (and a straight-up honesty note). The lead's destination is your CRM. Two honest points, so I don't waste your time: (i) the only officially documented GTM-native path for feeding lead data to Google is enhanced conversions for leads via a user-provided-data variable, and that feeds Google Ads, not a third-party CRM; (ii) a direct GTM→CRM-webhook or GTM→Google-Sheets tag is not officially documented by Google (it's a community pattern). So don't build your pipeline on a universal "GTM sends my CRM the lead" assumption. Most CRMs/landing pages handle their own lead capture (HubSpot forms, your landing-page builder's native webhook, Zapier/Make between GTM-decorated links and the CRM). Running a serious Google-centric lead flow? Set up a webhook from your form/LP directly to your CRM. That's clean and first-party. I'm flagging this explicitly rather than feeding you a how-to someone invented.
f) UTM discipline. UTM parameters are how you know which source, medium, and campaign
earned the win. If they're not on every tracked link, all you get is "organic/unknown" and
confusion. Standardize: utm_source (google, facebook, newsletter…), utm_medium (cpc,
email, social…), utm_campaign (the campaign name), and utm_content, which is quietly
powerful for telling ads/sends apart. GA4 reads these into Traffic source / campaign
automatically; keep the case consistent (lowercase, no spaces) so they don't shard into a
dozen near-identical rows. Use the free Campaign URL Builder until an automation owns it.
✅ Tested and working, system by system. Google Ads: run a link and confirm the shared key event appears (GTM Preview + GA4 Realtime). Meta: install Meta's Facebook Pixel Helper Chrome extension, load a page, and confirm the Pixel base code fires; a server-side (CAPI) event should also show once wired. Forms: in GTM Preview, submit a form and confirm the event fires (Wait for Tags holds the navigation). CRM: confirm the lead actually arrives in your CRM from the form's or landing page's own webhook, not from GTM. Cross-domain/UTM: click a configured link and confirm the destination URL carries
_gl, and that every tracked link has your clean UTM parameters.
Step 5 · Consent Mode (get this right once, and sleep well)
Sources: support.google.com/analytics/answer/10000067 · /answer/14009635 ·
developers.google.com/tag-platform/security/concepts/consent-mode.
Consent Mode lets you keep collecting useful data while respecting a visitor's privacy choice. And in 2026 the accurate framing is Basic vs Advanced (not a single toggle):
- Basic. Google tags are held until the visitor interacts with your cookie banner. Clean, but you get no data at all (not even consent state) before consent, and the modeling is more generic.
- Advanced. Tags load with consent set to denied by default; while denied, tags send cookieless pings and the consent state; when the visitor grants, full measurement flows. Uses a more detailed, advertiser-specific model.
For most businesses Advanced is the right default because it gives far more measurement while staying compliant (and it's effectively required in the EEA/UK). The two things to get right: define your default consent states, and send the updated state when the visitor interacts with the banner, implemented in GTM before the Google tag fires.
Reality check for 2026 (so you don't teach or act on stale fear): browsers are not universally cookieless. Chrome cancelled the third-party-cookie deprecation, and the Privacy Sandbox APIs are being retired. Consent Mode v2 signal requirements apply in the EEA. So don't rebuild your whole measurement on a false "all cookies are dead" premise. First-party data (yours, from forms you own) is still the healthiest foundation. Consent Mode, first-party data, and a lean server-side setup is the balanced 2026 posture.
✅ Tested and working. In GTM Preview, load the page with consent set to denied and confirm tags still send their cookieless pings (you see a request fire, just without cookies). Then grant consent and confirm a full measurement hit follows. Preview shows you the resolved consent state for the tag, so you can verify your default and updated states are correct.
Step 6 · Verify the plumbing (you're not done until you SEE it work)
"Done" is not "I clicked the buttons." "Done" is watching a real session flow through:
- Open your site in a fresh incognito window (so you're a clean visitor).
- In GA4, open Realtime. You should see yourself appear as an active user within seconds.
- Fill out a form (or click your call button) and confirm the key event fires.
- In GTM Preview mode, watch the tags fire in order on the same actions.
- Only then do you have license to drive traffic. Any later recipe that says "turn on traffic" assumes this is already verified.
If something doesn't fire, this is where you debug it. The Realtime report and GTM Preview are your two best friends; most failures are the "automatic event detection" toggle (Step 1) or a trigger that needs Wait for Tags / Check Validation (Step 4d).
✅ Tested and working end to end. This is the chapter's capstone test. In a fresh incognito window: GTM Preview shows the Google tag firing on load; DevTools → Network shows
gtm.jsand acollect.request; GA4 Realtime shows you as active; a submitted form fires your key event; and the connected systems (Ads, Meta, CRM) each show the test event you expect. All green means the plumbing is trustworthy and everything after this in the book will measure.
Wiring it to the goal maps
This chapter is the prerequisite for nearly every traffic recipe. If your goal was "I want lead generation" (Goal A), the plumbing here is what lets the lead-gen recipes (R005 offer → R006 landing page → R004 tracking → R042 scoring) actually report who earned the lead. Cook the plumbing once; every later recipe reuses it.
What "done" looks like
- GA4 is collecting in Realtime, and your key events fire on the exact moments you decided matter.
- GTM is the single place tags are managed; you haven't hand-pasted scripts into five spots.
- Google Ads, Meta (Pixel + CAPI), forms, and your CRM each have a verified first-party connection.
- Every tracked link carries disciplined UTM parameters.
- Consent Mode (Advanced) is up, and you know which region's rules apply to you.
- You can answer, "which source produced my last three leads, and what did it cost?" from data, not memory.
TROUBLESHOOTING
- "GA4 shows me in Realtime, but no events." → Check the automatic event detection toggle in the Google tag settings (Step 1/2), not just the data-stream setting.
- "My form event never fires." → In the Form Submission trigger enable Wait for Tags
and Check Validation; if your form overrides submit, switch to a custom
dataLayerevent. - "Meta says I have no data." → Pixel alone isn't the durable answer. Connect CAPI so server events back the pixel.
- "I can't see campaigns." → UTMs missing or case-mismatched; they shard into many rows. Standardize lowercase, no spaces.
- "My CRM never gets the lead." → That's the officially-undocumented path I flagged in Step 4e. Use the form/LP's native webhook or an integration (Zapier/Make), not a GTM webhook.
- Older tutorial says "mark it as a conversion." → The term is key event now (2024 rename). Use Admin → Events → Key events tab → star.
What you just built, how to trust it, and how to document it
Take a breath. Here's what you've accomplished, plainly.
You installed the measurement layer that makes every other recipe in this book countable. In one sitting you set up GA4 and Google Tag Manager, defined your signposts (key events), and connected the places the data matters: Google Ads, Meta, your forms, and your CRM. Traffic you drive from here now produces a record you can learn from. That is the single biggest step in this book, and it is now behind you.
What it should do, in one line: every visit, and the few moments that mean something, becomes data you can see and trust, flowing to the systems that act on it.
Test the whole thing, top to bottom (a 10 minute pass)
Run each "tested and working" step in the chapter back to back:
- In a fresh incognito window, open your site. GTM Preview shows the Google tag firing on
load with your Measurement ID; DevTools → Network shows
gtm.jsand acollect.request. - In GA4 Realtime, you appear as an active user.
- Submit a real form and confirm your key event fires, and that its star is set under Admin → Events → Key events.
- Confirm the connected systems: a Google Ads conversion fires; Meta's Facebook Pixel Helper shows the Pixel (and CAPI) event; the lead lands in your CRM.
- Confirm your links: tracked links carry clean UTM parameters, and a cross-domain journey
shows
_glin the destination URL.
If a check fails, use the Troubleshooting section above. When every check passes, the plumbing is trustworthy, and anything the book tells you to drive from here will be measurable.
Document it so you never lose it
Five minutes of notes now saves an hour of digging later, and it is the foundation of next year's edition re-verification. Keep one "measurement runbook" (a shared note is fine) with:
- The account and its IDs: Google account, property name, stream name, the Measurement ID (G-...), and the GTM container ID (GTM-...).
- Every key event you defined and why (generate_lead for your form, purchase for a store, and so on).
- Every tag + trigger you created and what each fires on.
- The connections: which Google Ads account, which Meta pixel and CAPI token, which CRM and its webhook, and any cross-domain domains.
- Your consent mode choice (Basic or Advanced) and its default and updated states.
- A change log: date, what you changed, why. Future you, and next year's edition, will re-verify fast from this.
That turns a vague memory into a runbook you can trust and hand to anyone.
The confidence checklist
When you can tick all of these, trust the plumbing:
- [ ] GA4 shows your real-time session.
- [ ] Your key event fires on the exact moments you chose.
- [ ] GTM Preview shows the tags you expect, with no errors.
- [ ] Each connected system (Ads, Meta, CRM) received a test you can see.
- [ ] Your runbook documents the IDs, events, tags, and connections.
- [ ] You know where to look when something later looks wrong (Realtime, Preview, DevTools → Network, this chapter's Troubleshooting).
Done is done. You can now drive traffic with your eyes open, which most businesses never manage. Everything after this chapter assumes exactly what you have built, and it will hold for them.
Sources: what we verified and where it lives (as of 2026-11)
- GA4 property/data stream: support.google.com/analytics/answer/9304153
- GTM create/install: support.google.com/tagmanager/answer/14842164 · /answer/14847097
- Setup GA4 in GTM (Google tag): support.google.com/tagmanager/answer/9442095 · /answer/15756616
- Auto-collected & enhanced events: support.google.com/analytics/answer/9234069 · /answer/9216061
- Recommended events (incl. 2024+ lead-gen set): support.google.com/analytics/answer/9267735
- Key events (conversions): support.google.com/analytics/answer/12844695 · /answer/13128484
- GA4 events in GTM: support.google.com/tagmanager/answer/13034206
- Consent Mode: support.google.com/analytics/answer/10000067 · /answer/14009635 · developers.google.com/tag-platform/security/concepts/consent-mode
- GA4↔Google Ads: support.google.com/analytics/answer/9379420 · support.google.com/google-ads/answer/13735417
- Meta Pixel & CAPI: developers.facebook.com (Meta Pixel get-started · Conversions API get-started)
- Ecommerce events: developers.google.com/analytics/devguides/collection/ga4/reference/events
- Form trigger: support.google.com/tagmanager/answer/7679217
- Chrome 3PC deprecation cancelled / Privacy Sandbox revising: privacysandbox.google.com (2025-04, 2025-10)