Foundation & Setup

Set Up Google Analytics 4 (GA4) — Step-by-Step Guide

Track user behavior, traffic sources, conversions, and engagement. Configure events to measure SEO ROI accurately.

Easy Critical Impact 20 min Online Local Hybrid
Pro Tip

Link GA4 with Search Console immediately — this unlocks the "Google organic search traffic" report showing landing pages + queries together, which is invaluable for SEO analysis.

Warning

GA4 does not import historical data from Universal Analytics. If you haven't migrated yet, set up GA4 now — every day without it is data you'll never get back.

Step-by-Step Guide

1

Create a GA4 property

Go to analytics.google.com, click Admin (gear icon), then "Create Property". Enter your website name, timezone, and currency.

2

Set up a data stream

After creating the property, add a "Web" data stream. Enter your website URL. GA4 will generate a Measurement ID (starts with G-).

3

Install the tracking code on your website

Choose the method that matches your setup:

  • Google Tag Manager (recommended): Create a GA4 Configuration tag with your Measurement ID. Trigger on "All Pages".
  • WordPress: Use a plugin like Site Kit by Google, MonsterInsights, or paste the gtag.js snippet into your theme's <head>.
  • Shopify: Go to Online Store > Preferences, paste your Measurement ID in the Google Analytics field.
  • Custom/React/Next.js: Add the gtag.js script to your document head or use the @next/third-parties package.
4

Configure enhanced measurement events

GA4 auto-tracks some events. Go to Admin > Data Streams > your stream > Enhanced Measurement. Enable:

  • Page views (on by default)
  • Scrolls (triggers at 90% page depth)
  • Outbound clicks (tracks clicks to external sites)
  • Site search (tracks internal search queries)
  • File downloads (tracks PDF, DOC, etc. downloads)
5

Link GA4 with Google Search Console

Go to Admin > Product Links > Search Console Links > Link. Select your Search Console property. This unlocks the "Queries" and "Google organic search traffic" reports inside GA4.

6

Set up key events (conversions)

Go to Admin > Events. Mark important events as "Key Events" (formerly "Conversions"):

  • form_submit — Track contact form submissions
  • purchase — Track e-commerce transactions
  • sign_up — Track account registrations
  • generate_lead — Track lead generation events
  • Create custom events for your specific business goals via GTM

Video Tutorial

Tools & Resources

Google Analytics 4Google Tag Manager

Learn More

Install GA4 with GTM — Analytics ManiaarticleGA4 Setup Guide — Googleofficial

Do this task in the interactive tool

Track your progress and get guided through every step.

Open Interactive Tool

More in Foundation & Setup

Install Google Search Console

Easy15 min

Run a Full Site Audit

Medium1-2 hrs

Define KPIs & Goals

Easy30 min

Competitor Backlink & Keyword Analysis

Medium1-2 hrs

Install an SEO Plugin/Tool

Easy15 min