📈 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
Create GA4 Property
Go to analytics.google.com, create an account, then add a GA4 property for your website.
Create Data Stream
Add a web data stream with your website URL. This generates your Measurement ID.
Install Tracking Code
Add the gtag.js snippet to your website's <head> section on all pages.
Verify Installation
Use Real-Time reports or Google Tag Assistant to confirm tracking works.
Configure Events
Set up custom events and conversions to track important user actions.
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
⚙️ Custom Events
📋 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