• Wednesday, February 25, 2026

Knowledge Base

How to Add Google Analytics to WordPress

Tracking Website Visitors

Google Analytics shows you who visits your site and what they do.

Step 1: Create Google Analytics Account

  1. Go to analytics.google.com
  2. Sign in with Google account
  3. Click "Start measuring"
  4. Create account and property
  5. Get your Measurement ID (G-XXXXXXX)

Step 2: Add to WordPress

Method A: Using Plugin (Recommended)

  1. Install "Site Kit by Google" plugin
  2. Connect your Google account
  3. Follow setup wizard

Method B: Manual (Header)

  1. Copy the GA4 tracking code
  2. Go to Appearance → Theme Editor
  3. Edit header.php
  4. Paste code before </head>

Method C: Using Insert Headers Plugin

  1. Install "Insert Headers and Footers" plugin
  2. Go to Settings → Insert Headers and Footers
  3. Paste tracking code in header section
  4. Save

Verifying Installation

  1. Go to Google Analytics
  2. Check Real-Time reports
  3. Visit your site
  4. Your visit should appear

Key Metrics to Track

  • Users and sessions
  • Page views
  • Bounce rate
  • Traffic sources
  • Popular pages