Google Analytics 4
Google Analytics 4 (GA4) is Google's web and app analytics product, built on an event-based data model: page views, scrolls, purchases, and sign-ups are all events with parameters, collected from websites and mobile apps into one property. It provides acquisition and engagement reports, conversion tracking (key events), audiences for advertising, explorations for ad hoc analysis, and a raw-data BigQuery export.
Getting trustworthy numbers from GA4 requires deliberate implementation. Revenue in GA4 rarely matches the order database exactly — because of ad blockers, consent choices, duplicate purchase events, time zones, attribution differences, and data thresholds — and teams lose confidence when nobody can explain the gap. Implementing events carefully, validating them, and reconciling against the warehouse turns GA4 into a reliable view of marketing and site behavior.
TL;DR
- Everything is an event with parameters; register custom parameters as custom dimensions and metrics to use them in reports.
- Use enhanced measurement for common interactions, recommended events for ecommerce and sign-ups, and custom events for the rest.
- Mark business outcomes as key events; send
transaction_idwith purchases to deduplicate them. - Implement with gtag.js or Google Tag Manager; send server-side events with the Measurement Protocol.
- Configure Consent Mode before any tags fire, and validate with DebugView and Tag Assistant.
- Use the BigQuery export for raw data and to reconcile GA4 with backend numbers.
Quick Example
Consent defaults before loading the tag, then configuration (gtag.js):
When the user accepts analytics cookies, and when an order completes:
Reconciling daily orders and revenue from the BigQuery export against the order database:
Core Concepts
The Event Model
Use recommended event names wherever they fit, so built-in reports work. Custom parameters appear in reports only after being registered as custom dimensions or metrics, which have per-property limits — avoid high-cardinality values such as unique IDs as dimensions.
Key Events
Mark the events that represent business outcomes — purchases, sign-ups, qualified leads — as key events (previously called conversions) for reporting, and import them into advertising platforms where needed.
Implementation Options
Identity and Reporting
GA4 identifies users through device identifiers (cookies, app instance IDs), an optional user ID you set for signed-in users, and Google signals where enabled. Reporting identity settings control how these are combined, and data thresholds may hide small rows to protect privacy. Report time zone and currency settings also affect totals.
Consent Mode
Consent Mode passes users' consent state to Google tags. With consent denied, tags adjust their behavior (cookieless pings in advanced mode, or no tags in basic mode), and GA4 can model some missing data. For traffic from the European Economic Area, Consent Mode v2 signals (ad_user_data, ad_personalization) are required to use advertising features. Set defaults before any tag loads and update them from your consent banner. See Consent Management.
Validation
- DebugView shows events from debug-enabled devices in real time, with parameters.
- Tag Assistant and GTM preview mode show which tags fired and why.
- Network inspection confirms requests, parameters, and consent states.
- Automated checks in end-to-end tests can assert that key
dataLayerpushes happen with the right values.
BigQuery Export and Reconciliation
The BigQuery export delivers raw event data daily (and optionally streaming), with nested event_params and items, without sampling or thresholds. Standard properties have export limits, so check daily volumes. Use it to build reports GA4's interface cannot, join with business data, and reconcile:
See Google BigQuery.
Best Practices
Write a Measurement Plan
List business questions, the events and parameters that answer them, key events, and owners before tagging — and keep it updated.
Prefer Recommended Events
Use Google's event and parameter names for ecommerce and common actions so standard reports and integrations work.
Govern Tag Manager
Limit publish rights, use workspaces and version notes, and review container changes; an ungoverned GTM container becomes a security and performance liability.
Reconcile Monthly
Compare key metrics with backend data and document expected differences, so stakeholders know how far to trust each number.
Common Mistakes
Purchases Without transaction_id
Tags Firing Before Consent
Personal Data in Parameters
FAQ
What is Google Analytics 4?
Google's current analytics platform for websites and apps, built on an event-based data model, with reporting, explorations, audiences, key event tracking, and export of raw data to BigQuery.
What is the difference between GA4 events and key events?
Every interaction is an event. Key events are the events you mark as important business outcomes, such as purchases or sign-ups, for conversion reporting and advertising integrations.
Should I use Google Tag Manager or gtag.js?
gtag.js is simpler when developers manage tracking in code. Google Tag Manager suits teams that need to manage many tags without code changes, with appropriate governance over who can publish.
Why don't GA4 numbers match my database?
Ad blockers, consent choices, duplicate or missing events, refunds, time zone and currency settings, attribution models, and privacy thresholds all cause differences. Reconcile using the BigQuery export and server-side events.
What is Consent Mode?
A way to pass users' consent choices to Google tags so they adjust data collection accordingly. Consent Mode v2 signals are required for using advertising features with users in the European Economic Area.
Related Topics
- Web Analytics — Measuring website behavior
- Consent Management — Collecting and honoring consent
- Server-Side Tagging — Controlling data collection server-side
- Event Tracking — Designing analytics events
- Google BigQuery — Analyzing exported GA4 data
- Conversion Optimization — Improving conversion rates