What You Will Learn
- How GA4 differs from Universal Analytics — event model, cross-platform, privacy architecture
- How to create a GA4 property and configure the correct account structure
- How data streams work — web, iOS, Android — and when to use multiple streams
- Three tag installation methods: gtag.js, Google Tag Manager, and CMS plugins
- What Consent Mode v2 is and how to implement it for GDPR/UK compliance
- How to configure data retention settings and why 14 months is the right choice
- How to link GA4 to Google Search Console and Google Ads
- How to verify data is collecting correctly using DebugView and Realtime
GA4 vs Universal Analytics
Universal Analytics measured user behaviour as sessions containing pageviews, goals, and events — sessions were the primary unit. GA4 measures everything as events. A pageview is an event. A scroll is an event. A purchase is an event. Every interaction is an event with parameters attached, and all reports are built from this unified event stream. This model is more flexible and naturally cross-platform — the same event schema works for websites, iOS apps, and Android apps in a single property.
GA4 also introduces machine learning throughout: predictive audiences, modelled conversions for non-consenting users, and anomaly detection are built in. These features address the data gaps created by privacy regulations and browser cookie restrictions — GA4 estimates behaviour it cannot directly measure using aggregate patterns from users who have consented.
UA sunset
UA permanently stopped processing data (Google official announcement)
Primary unit
Everything in GA4 is an event — pageviews, scrolls, purchases, custom interactions
Platforms
One GA4 property can measure website, iOS, and Android together
Creating the GA4 Property
Navigate to analytics.google.com → Admin (gear icon, lower left) → Create Property. The setup wizard prompts for:
- Property name. Use a descriptive name: "yoursite.com — Production." The Production/Development distinction matters — always create a separate property for staging and development environments to prevent test data from contaminating production analytics.
- Reporting time zone. Set to your primary business time zone. This determines how days are counted in reports and how day-level data aligns with business calendars.
- Currency. Set to the currency in which your revenue is denominated. This affects the currency formatting in revenue reports.
- Industry and size. Used for Google's benchmarking features. Does not affect data collection.
- Business objectives. GA4 uses these to pre-configure relevant conversion events. Choose the objectives that match your primary goals — you can modify conversions later.
Test traffic, bot traffic, and development events contaminate production analytics if mixed. Google's own setup documentation recommends separate properties for production and development environments. Set up both before implementing the tag — it costs nothing and prevents significant data quality problems.
Data Streams
A data stream is a source of data flowing into the property. Web streams collect browser-side data from websites; app streams collect data from iOS or Android applications. One property supports multiple streams — a website plus both mobile apps in a single property provides unified cross-platform reporting.
Web stream configuration
After the property is created, GA4 guides you to set up a web data stream. Provide the website URL and a stream name, and GA4 generates a Measurement ID (G-XXXXXXXXXX) — this ID is used in the tracking tag. Within the web stream settings, configure:
- Enhanced Measurement. GA4 automatically collects scrolls (90% depth), outbound clicks, site search queries, video engagement, and file downloads without additional code. Review each event and disable those irrelevant to your site — unnecessary events add noise to reports.
- Cross-domain measurement. If the user journey spans multiple domains (main site + checkout domain, or multiple regional subdomains on different root domains), add all domains to the cross-domain list so GA4 treats them as one continuous session. Without this, users crossing domains appear as new sessions — breaking funnel and attribution data.
- Unwanted referral exclusion. Payment processors (PayPal, Stripe hosted checkouts) and your own domains should be in the referral exclusion list to prevent them from appearing as traffic sources and breaking attribution.
Tag Installation
The Google Tag (gtag.js) sends event data from the user's browser to GA4. Three installation paths:
Direct gtag.js (simplest)
Paste the snippet provided in the data stream settings into the <head> of every page. The snippet loads the gtag.js library and configures it with your Measurement ID. This requires direct template access and must be present on every page — typically added to the site's global header template.
Google Tag Manager (recommended)
GTM installs a single container snippet on the site; all tags (GA4, Ads, Clarity, etc.) are then deployed through the GTM interface without further code changes. This is Google's recommended approach for most implementations: it separates tag management from development deployments, enables preview/debug before publishing, maintains version history, and allows non-developers to manage tags. Requires a one-time GTM container snippet installation by a developer, then all subsequent tag changes are code-free. See the Google Tag Manager guide in this series.
CMS integrations
WordPress: Google's official Site Kit plugin connects GA4, Search Console, and Ads from within WordPress without code. Shopify: use the GA4 integration in Shopify's native Preferences or a dedicated GA4 app from the Shopify App Store. Squarespace, Wix, and other hosted platforms all provide GA4 integration fields in their analytics settings.
Consent Mode v2
Google Consent Mode v2 is required from March 2024 for sites using GA4 and Google Ads in the European Economic Area (EEA), UK, and Switzerland. It allows GA4 to adjust data collection based on user consent choices, while using machine learning to model the behaviour of non-consenting users.
The four consent signals in Consent Mode v2
| Signal | Controls | Default |
|---|---|---|
analytics_storage | Analytics cookies and measurement | Should default to "denied" before consent is obtained |
ad_storage | Advertising cookies used for ad targeting | Should default to "denied" |
ad_user_data (v2 new) | Whether user data can be sent to Google for advertising purposes | Should default to "denied" |
ad_personalization (v2 new) | Whether data can be used for personalised advertising | Should default to "denied" |
Modelled conversions
When a user declines consent, GA4 sends cookieless pings (no personal data, no cookies) that indicate an interaction occurred without identifying the user. Google's modelling uses these pings alongside patterns from consenting users to estimate the conversions that occurred among non-consenting users. GA4 reports include both measured conversions (from consenting users) and modelled conversions, with clear labelling. This maintains measurement quality while respecting consent — an approach documented in Google's official Consent Mode technical documentation.
Implementing Consent Mode
Consent Mode requires your Consent Management Platform (CMP) to fire the consent signals when users make choices. Google maintains an official list of certified CMPs that support Consent Mode v2 (accessible from the Consent Mode documentation). Popular certified options include Cookiebot by Usercentrics, OneTrust, and Sirdata. The CMP fires the gtag('consent', 'update', {...}) command based on the user's consent choice, which GA4 reads to adjust its collection behaviour.
Data Retention Settings
GA4 stores event-level data for a configurable period — after which it is permanently deleted. The default is 2 months. Change this to 14 months immediately after setup: Admin → Data Settings → Data Retention → Event data retention → 14 months → Save.
Why 14 months: Exploration reports (custom analysis in GA4) draw from raw event data. With 2-month retention, any Exploration query looking back more than 2 months returns incomplete data — meaning year-over-year comparisons in explorations are impossible. Standard reports (Acquisition, Engagement, etc.) use aggregated data retained indefinitely, so this setting only affects Explorations and the Segment Overlap report.
14 months is the maximum available — Google limits retention to this period as a privacy measure. GA4's standard report data is unaffected and retained indefinitely.
Account and Property Structure
| Scenario | Recommended Structure | Reason |
|---|---|---|
| Single website | 1 account → Production property + Development property | Keeps test data separate from production data |
| Website + mobile app | 1 account → 1 property with web stream + iOS stream + Android stream | Unified cross-platform reporting in one property |
| Multiple brands | 1 account → separate property per brand | Keeps brand data separate; enables brand-level reporting and access control |
| Agency managing clients | Separate account per client (client-owned); agency access via user permissions | Client owns their data; clean separation of client accounts |
Google Search Console Integration
Linking GA4 to Google Search Console brings organic search performance data (impressions, clicks, average position, CTR) into GA4 — enabling analysis of how search visibility connects to on-site behaviour. Link via: Admin → Product Links → Search Console Links → Link.
After linking, organic search data appears in GA4 under Reports → Acquisition → Search Console. This shows which landing pages are receiving the most search traffic, which queries are driving sessions, and — with conversion data configured — which organic queries are driving conversions. This integration is the closest you can get to connecting GSC's search funnel data with GA4's on-site conversion data without a separate reporting tool.
Google Ads Linking
Linking GA4 to Google Ads enables: importing GA4 conversions into Google Ads for Smart Bidding optimisation; importing GA4 audiences into Google Ads for remarketing; and viewing full campaign performance (cost, clicks, sessions, conversions) in GA4. Link via: Admin → Product Links → Google Ads Links → Link.
After linking, confirm that auto-tagging is enabled in Google Ads (Settings → Account settings → Auto-tagging → on). Auto-tagging adds the gclid parameter to all Google Ads URLs, enabling GA4 to attribute sessions and conversions to the correct campaign, ad group, and keyword.
Verification and Debugging
- Realtime report (Reports → Realtime). Visit the site from a separate browser or device. You should appear as an active user in the Realtime report within seconds. No user = tag not firing.
- DebugView (Admin → DebugView). Install Google Analytics Debugger (Chrome extension by Google), enable it, browse the site. DebugView shows every event with all parameters in real time — the best tool for confirming events are named correctly and parameters are populated.
- GA4 Setup Assistant (Admin → Setup Assistant). A checklist showing the status of key configuration items: data streams, conversions, Google Signals, Search Console link. Use this to confirm no critical setup steps are incomplete.
- Google Tag Assistant (tagassistant.google.com). Google's official tag debugging tool — validates that the GA4 tag is firing correctly and shows any configuration errors detected.
Authentic Sources
Every factual claim in this guide is drawn from official Google documentation, regulatory bodies, or platform-published technical specifications. No third-party blogs or marketing tools are used as primary sources. All content is written in our own words — we learn from official sources and explain them; we never copy.
Official step-by-step GA4 property creation and setup documentation.
Official documentation on GA4 data retention settings.
Official documentation for connecting GA4 to Google Search Console.