← Clarigital·Clarity in Digital Marketing
Analytics & CRO · Session 12, Guide 1

GA4 Setup & Configuration · Install, Configure & Verify

Google Analytics 4 is Google's current analytics platform, replacing Universal Analytics (UA) which was permanently sunset on 1 July 2024. GA4 is a fundamental redesign — moving from session-based to event-based measurement, adding built-in privacy controls through Consent Mode, and enabling cross-device reporting. Configuring GA4 correctly from day one prevents months of data quality problems: missing conversions, broken attribution, and privacy compliance gaps. This guide covers the complete setup process drawing entirely from Google's official documentation.

Analytics & CRO5,000 wordsUpdated Apr 2026

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

1 Jul 2024

UA permanently stopped processing data (Google official announcement)

Primary unit

Events

Everything in GA4 is an event — pageviews, scrolls, purchases, custom interactions

Platforms

Web + App

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.
Always create a separate Development property

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.

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

ScenarioRecommended StructureReason
Single website1 account → Production property + Development propertyKeeps test data separate from production data
Website + mobile app1 account → 1 property with web stream + iOS stream + Android streamUnified cross-platform reporting in one property
Multiple brands1 account → separate property per brandKeeps brand data separate; enables brand-level reporting and access control
Agency managing clientsSeparate account per client (client-owned); agency access via user permissionsClient 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

Source integrity

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.

OfficialGoogle Analytics Help — Set Up GA4

Official step-by-step GA4 property creation and setup documentation.

OfficialGoogle Developers — Consent Mode

Official implementation guide for Google Consent Mode v2.

OfficialGoogle Analytics Help — Data Retention

Official documentation on GA4 data retention settings.

OfficialGoogle Analytics Help — Link to Search Console

Official documentation for connecting GA4 to Google Search Console.

600 guides. All authentic sources.

Official documentation only.