Google Analytics (GA4) — Knowledge Base
v1 — verify/expand. GA4 + GTM + UTM essentials for 2026. This is the measurement backbone the other docs reference (
ads.md,lead-generation.md,email-marketing.md). For presenting the data, see../dashboards_decks_playbook.md.
GA4 mental model (it's not Universal Analytics)
- Everything is an event. No more pageviews-as-a-separate-thing — page_view is just an event. Sessions are derived, not primary.
- Event-based, not session-based. Engagement (engaged sessions, engagement rate, engagement time) replaced bounce rate as the core quality metric.
- Data model = events + parameters + user/session scopes. Plan events and the parameters they carry up front.
Events
Four tiers:
- Automatically collected — page_view, first_visit, session_start, etc. Free, no setup.
- Enhanced measurement (toggle in the data stream) — scrolls, outbound clicks, site search, video, file downloads, form interactions. Turn on; cheap signal.
- Recommended events — Google's named events with prescribed parameters (e.g.
purchase,generate_lead,sign_up,add_to_cart). Use the official names/params so reports + ecommerce features work. - Custom events — your own, for anything not covered. Name in
snake_case, consistently.
Register custom dimensions/metrics for any event parameter you want to report on — unregistered params aren't queryable in standard reports.
Watch limits: 50 custom dimensions / 50 custom metrics (standard), and high-cardinality params bloat reports.
Conversions (now "key events")
- Mark meaningful events as key events (GA4 renamed "conversions" → "key events"; "conversion" now leans toward Ads-imported usage).
- Define a small set of real key events (purchase, qualified lead, demo request) — not every click. Diluting key events makes reporting meaningless.
- For lead gen, fire
generate_leadon the real qualifying action (handraise), not every form view — seelead-generation.md. - Import key events to Google Ads for bid optimization; use server-side / Enhanced Conversions for signal durability (see
ads.md).
Key reports (where to look)
- Reports → Acquisition: traffic + user acquisition by channel/source/medium (UTMs drive this).
- Reports → Engagement: events, pages, engagement time/rate.
- Reports → Monetization: ecommerce (needs the ecommerce event schema implemented).
- Reports → Retention: returning users, cohorts.
- Explore (free-form, funnel, path, cohort, segment overlap): the real analysis surface — build funnels and paths here, not in standard reports.
- Advertising → attribution / model comparison: how channels get credit (GA4 default = data-driven attribution).
- Realtime / DebugView: validation, not analysis (DebugView for confirming events fire correctly during setup).
GTM basics
- GTM is the deployment layer; GA4 is the destination. Tags (what fires), triggers (when), variables (data).
- Data layer is the source of truth — push structured events/data to
dataLayerfrom the site/app, read them into GTM variables, send to GA4. Don't scrape the DOM when you can use the data layer. - Server-side GTM for first-party, durable tagging (CAPI/Enhanced Conversions, reduced ad-blocker loss). Increasingly standard.
- Consent Mode v2 required for EEA/UK ads + modeling — wire consent state into GTM.
- Test in Preview mode + DebugView before publishing; version + name everything.
UTM hygiene (the cross-doc rule)
Inconsistent UTMs fragment all your reporting. Lock a convention and never freelance.
| Param | Use | Rule |
|---|---|---|
utm_source |
platform/origin | lowercase, consistent (facebook not FB/Facebook) |
utm_medium |
channel type | use GA4's recognized values: email, cpc, social, organic, referral, affiliate |
utm_campaign |
campaign name | a consistent slug (spring_sale_2026), kebab/snake, no spaces |
utm_content |
variant/creative/link | for A/B + which link/ad |
utm_term |
paid keyword | search only |
Rules:
- Always lowercase, no spaces (GA4 is case-sensitive →
Emailandemailsplit into two channels). - Use a central UTM builder / sheet so everyone tags identically.
mediummust match GA4's default channel groupings or traffic lands in "Unassigned."- Don't UTM internal links (overwrites the original source — breaks attribution). UTMs are for inbound only.
- Turno house format:
source=email,medium=email,campaign=slug— follow per-client conventions where set.
Common pitfalls
- Unassigned / (not set) traffic — usually broken or non-conforming UTMs, or missing channel mapping.
- Self-referrals / internal UTMs corrupting source attribution.
- Treating GA4 like UA — looking for bounce rate, expecting session-first model.
- Unregistered event params → not reportable.
- Key-event sprawl → every event marked key → meaningless conversion data.
- No DebugView validation → events firing wrong/duplicated, discovered weeks later.
- Data retention defaults (2 / 14 months) — set to max if you need history in Explore.
- PII in events/params — never send emails/names/phone to GA4 (policy violation; use hashed for Enhanced Conversions only).
- Cross-domain / subdomain tracking not configured → broken sessions.
- Platform numbers ≠ GA4 numbers — they attribute differently; reconcile, don't expect a match (see
ads.md).
Quick checklist (GA4/GTM setup)
- Enhanced measurement on; data stream configured
- Key events defined (small, real set) + imported to Ads
- Custom dimensions/metrics registered for needed params
- Recommended event names/params used (snake_case)
- GTM via data layer; Preview + DebugView verified before publish
- Server-side GTM / Enhanced Conversions for durable signal
- Consent Mode v2 if EEA/UK
- UTM convention enforced (lowercase, GA4-recognized medium, central builder)
- No PII in events; internal links not UTM'd
- Cross-domain + data retention configured