📈 Google Analytics Setup Guide

Complete GA4 Implementation for SEO Success

🔄 Universal Analytics → GA4 Migration

Universal Analytics

Session-based model (Sunset July 2024)

Google Analytics 4

Event-based model • Privacy-focused • AI insights

🚀 Setup Steps

1

Create GA4 Property

Go to analytics.google.com, create an account, then add a GA4 property for your website.

2

Create Data Stream

Add a web data stream with your website URL. This generates your Measurement ID.

3

Install Tracking Code

Add the gtag.js snippet to your website's <head> section on all pages.

4

Verify Installation

Use Real-Time reports or Google Tag Assistant to confirm tracking works.

5

Configure Events

Set up custom events and conversions to track important user actions.

6

Link to GSC

Connect Google Search Console to see organic search data in GA4.

📝 GA4 Tracking Code Example

<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  
  gtag('config', 'G-XXXXXXXXXX');
</script>

📊 Key Metrics to Track

👥

Users

Total unique visitors to your site

📱

Sessions

Individual visit sessions

📄

Pageviews

Total pages viewed

⏱️

Engagement Time

Time actively on site

📉

Bounce Rate

Single-page visit rate

🎯

Conversions

Goal completions

🌐

Traffic Sources

Where visitors come from

📍

Geographic

Visitor locations

🎯 Events & Conversions

📊 Automatic Events

📄 page_view Page loads
📜 scroll 90% scroll depth
🔗 click Outbound link clicks
🔍 view_search_results Site search

⚙️ Custom Events

📝 form_submit Form completions
📩 newsletter_signup Email subscriptions
📥 file_download PDF/resource downloads
🎥 video_play Video engagement

📋 GA4 Reports Overview

📈 Acquisition

  • Traffic sources
  • User acquisition
  • Google Ads performance
  • Campaign tracking

👥 Engagement

  • Events overview
  • Pages and screens
  • Landing pages
  • Conversions

🔄 Retention

  • User retention
  • Cohort analysis
  • Lifetime value
  • User stickiness

📋 GA4 Setup Checklist

Initial Setup

Configuration

Optimization