Google Analytics 4 Setup and Configuration Guide
- Filed November 10, 2026
- Analytics, reporting and testing, guide 2 of 8
A GA4 setup is correct when four things are true: data arrives from every page once and only once, the events that matter to the business are marked as key events, consent choices are respected, and the reports can be trusted for the questions people will ask them. Installing the tag is only the first part of that; the rest is deciding what to measure and checking that the numbers mean what people will assume they mean.
1. Property and data stream
Google’s setup guide describes the order: create a property, add a data stream, then add the Google tag to the site (GA4 setup for a website).
- Property: one per website or app ecosystem you want reported together. Set the reporting time zone and currency correctly from the start; they affect how days and revenue are reported.
- Web data stream: created in Admin under Data collection and modification, Data Streams. The stream provides a measurement ID used by the Google tag.
- Enhanced measurement: when you create the stream, GA4 offers to collect page views and other events automatically. Google notes you can later disable individual enhanced measurement events. Review the defaults: site search, for example, triggers when a URL contains one of a set of query parameters, which you can extend (enhanced measurement).
2. Installing the tag
Install the Google tag on every page, either directly in the site template or through Google Tag Manager (where each additional tag has its own performance cost). Use one method. Installing it both ways double-counts page views and events.
On single-page applications, make sure route changes generate page views, either through enhanced measurement’s history-based page views or through explicit events.
3. Event design
GA4 collects everything as events. Plan them before configuring:
| Layer | Examples | Source |
|---|---|---|
| Automatically collected | <!–INLINECODE0–>, <!–INLINECODE1–> | GA4 |
| Enhanced measurement | <!–INLINECODE2–>, <!–INLINECODE3–>, <!–INLINECODE4–> (outbound), <!–INLINECODE5–>, <!–INLINECODE6–> | GA4, if enabled |
| Recommended events | <!–INLINECODE7–>, <!–INLINECODE8–>, <!–INLINECODE9–>, <!–INLINECODE10–> | Implemented by you, using Google's names |
| Custom events | Business-specific interactions | Implemented by you |
Use Google’s recommended event names where they fit, so standard reports understand them. Google’s help defines a custom event as one “that you define so you can collect information about an interaction that’s important to your business” (GA4 custom events). Document each event: name, trigger, parameters and owner.
4. Key events
Google defines a key event as “an event that measures an action that’s particularly important to the success of your business”, and notes that “Any event you collect can become a key event” (GA4 key events). Mark only the actions that represent business outcomes (leads, purchases, sign-ups, bookings). A page view of the contact page is not a lead.
5. Attribution settings
GA4’s attribution help lists the models available in reports as data-driven attribution, paid and organic last click, and Google paid channels last click, and states that “The first click, linear, time decay, and position-based attribution models are no longer available as of November 2023” (GA4 attribution). Choose the reporting attribution model deliberately and record the choice.
The lookback window determines how far back a touchpoint can receive credit. Google’s attribution settings page gives defaults of 30 days for acquisition key events and 90 days for other key events, with shorter options available; changes apply going forward (GA4 attribution settings).
6. Consent
Consent mode, in Google’s words, lets you “communicate your users’ cookie or app identifier consent status to Google”, so tags adjust their behavior. Google notes it “doesn’t provide a consent banner or widget”; it works with your consent management platform (about consent mode).
Set up the banner first, connect it to consent mode, and test both choices. Expect that data collected under consent restrictions will not match server logs or Search Console counts; that difference is by design.
7. Data retention and thresholds
- Event-level data retention controls how long GA4 keeps data used in explorations and other non-aggregated reports. Choose the longest period your property type and privacy obligations allow; Google notes that Large and XL properties are limited to 2 months, and that reducing the period deletes older data at the next monthly process (GA4 data retention). Standard aggregated reports are not limited by this setting.
- Data thresholds can hide rows in reports that include demographics or signals data. Google states thresholds “are system defined. You can’t adjust them”.
8. Integrations
- Search Console link: brings organic Google Search clicks and queries into GA4’s Search Console reports (how those metrics are defined). Google notes Search Console metrics are compatible only with Search Console dimensions and the Landing page, Device and Country dimensions in GA4 (GA4 Search Console integration).
- Google Ads and other products: link only what you use.
- Internal traffic and unwanted referrals: define internal IP filters and list payment processors or login domains as unwanted referrals so they do not take credit for conversions.
9. A configuration verification checklist
Run these checks before reporting from the property:
- [ ] Tag coverage: every template fires one Google tag (check a crawl or tag assistant on each template).
- [ ] No duplicates: each page view registers once in DebugView.
- [ ] Key events: each key event fires once per real action, with expected parameters, in DebugView.
- [ ] Cross-domain: if the journey spans domains, sessions continue across them.
- [ ] Internal traffic: filters active and tested.
- [ ] Unwanted referrals: payment and identity domains listed.
- [ ] Consent: with consent denied, tags behave as configured; with consent granted, data arrives.
- [ ] Time zone and currency: correct in property settings.
- [ ] Retention: set to the intended period.
- [ ] Search Console link: active, and landing pages appear in the Search Console reports.
- [ ] Attribution: model and lookback windows recorded in the measurement plan.
Why GA4 showed twice the CRM’s leads
In a hypothetical case, a B2B services site’s GA4 reports show twice as many leads as the CRM.
- DebugView: the
generate_leadevent fires on the thank-you page view and again from a form-submit trigger in Tag Manager. - Fix: keep the form-submit event with the form ID parameter, remove the thank-you page trigger, and mark only
generate_leadas the key event. - Second finding: the site has both a hard-coded Google tag and a GTM Google tag; page views are doubled. Remove the hard-coded tag.
- Verification: check that DebugView shows one page view and one lead per test submission, and over the next two weeks that GA4 lead counts fall within the expected range of CRM counts (they will not match exactly because of consent and ad blockers).
Documentation is part of the setup
Write a short measurement plan: the business questions, the events and key events that answer them, their definitions, the attribution choices, and who owns changes. GA4 configurations drift as sites change; the plan is what lets someone check the property against its intent a year later.