How to Integrate Google Analytics with WordPress

✅ Step 1: Create a Google Analytics Account

  1. Visit Google Analytics

  2. Sign in with your Google account.

  3. Click Start measuring.

  4. Set up:

    • Account Name

    • Property Name (usually your website)

    • Time zone and currency

  5. Choose your platform: Web.

  6. Enter your website URL and name.

  7. Click Create Stream.


✅ Step 2: Copy the Tracking ID / Measurement ID


🧩 Step 3: Add Google Analytics to Your WordPress Site

Option 1: Using a Plugin (Recommended for Beginners)

👉 Popular Plugins:

How to Use Site Kit by Google:

  1. Go to your WordPress dashboard.

  2. Navigate to Plugins > Add New.

  3. Search for Site Kit by Google and install it.

  4. Activate the plugin.

  5. Follow the setup wizard to:

    • Connect your Google account

    • Grant necessary permissions

    • Link your Analytics account

  6. Done! Analytics is now tracking your site.


Option 2: Manually Add Tracking Code (Advanced Users)

  1. Copy your Global Site Tag (gtag.js) from Google Analytics.

  2. In WordPress, go to Appearance > Theme File Editor.

  3. Open the header.php file.

  4. Paste the code before the closing </head> tag.

  5. Save changes.

⚠️ Warning: Editing theme files directly can break your site. Use a child theme or back up your site before editing.


✅ Step 4: Test Your Setup

  1. Go back to Google Analytics.

  2. Use Realtime > Overview to check if your visit appears.

  3. Use tools like Google Tag Assistant or GA Debugger Chrome extensions.


📊 Bonus Tips

Leave a Reply

Your email address will not be published. Required fields are marked *