How to Add Google Analytics to WordPress (Full Step-by-Step Guide + GA Tracker Checker)

Tracking your website traffic can feel confusing, especially if you’ve never done it before.
But without Google Analytics, you’re flying blind.

Let’s simplify it. In just 5 easy steps, you’ll be set up and ready to go!

Step 1: Sign Up for Google Analytics

Before you can track anything, you need to sign up for a Google Analytics account.
Here’s what you need to do:

  • Go to the Google Analytics website.
  • Sign in with your Google account (or create one if you don’t have it yet).
  • Click on Start measuring.
  • Add a name for your account (something like My Website Analytics).
  • Fill in your website name, URL, industry, and time zone.

Here’s the key part:
After you’re done, Google will give you a tracking code.

It’ll look something like this:
<script> /* Your Tracking Code */ </script>

Step 2: Choose How You Want to Add Google Analytics to WordPress

You’ve got two main options for adding the code to your site:

  1. Using a plugin (no coding needed)
  2. Manually adding the code (for the hardcore DIY crowd)

Let’s tackle both methods below.

Step 3: Add Google Analytics to WordPress Using a Plugin

Most people prefer the plugin route because it’s fast and you don’t have to touch a single line of code.

Here’s what to do:

  • In your WordPress dashboard, go to Plugins > Add New.
  • Search for MonsterInsights (it’s the most popular Google Analytics plugin for WordPress).
  • Click Install and then Activate.

Once the plugin is activated:

  • Navigate to Insights > Settings.
  • Click on Connect MonsterInsights.
  • Follow the on-screen prompts to sign in to your Google Analytics account.
  • Choose the website you want to connect to Google Analytics.

That’s it! MonsterInsights will automatically add the tracking code to your site. You don’t need to mess around with any coding.

Other Plugin Options:

  • GA Google Analytics: Super lightweight, easy to use.
  • ExactMetrics: Another great choice, especially if you want in-depth reports.

Want to make sure it worked?

I’ve built a Google Analytics Tracker Checker that will tell you if your Google Analytics is installed and working correctly (more details below 👇).

Step 4: Manually Add Google Analytics Code to WordPress (For Non-Plugin Fans)

Not a fan of plugins? No worries.
You can add the code manually if you’d rather do it old school.

Here’s how:

Add the Code to Your Theme’s Header

  • In your WordPress dashboard, go to Appearance > Theme File Editor.
  • On the right-hand side, find header.php.
  • Add the Google Analytics tracking code you copied earlier right before the closing </head> tag.
  • Click Save.

Be Careful:

When you edit the theme files directly, you’re making changes to the core code.
One wrong move can break your site.
If you’re unsure about this, it’s best to stick with the plugin method.

Pro Tip: You can avoid accidentally losing your Google Analytics setup when you update your theme by using a child theme. That way, your changes to header.php stay safe.

Step 5: Verify That Google Analytics Is Tracking

You’re almost there.
You’ve added the code, but you need to make sure it’s actually working.

Here’s how to check:

  • Open your Google Analytics dashboard.
  • Go to Realtime > Overview.
  • Open a new tab and visit your website.
  • If Google Analytics detects you on the site, you’ll see active users in the Real-time overview.

If it’s tracking you, congratulations—you’re done!

If it’s not working, double-check that you’ve installed the plugin or manually added the code correctly.


Pro Tips for Using Google Analytics on WordPress:

  • Track Important Metrics: Once you’ve got Google Analytics installed, focus on key metrics like traffic sourcesbounce rate, and top-performing pages.
  • Set Up Goals: Want to know how many people complete a purchase or sign up for your newsletter? You can track that by setting up Goals in your Google Analytics account.
  • Sync with Google Search Console: This will help you monitor your site’s performance in search results and see the actual queries people are using to find you.
    Check out our guide on WordPress SEO Best Practices to help boost your traffic.

Bonus: Check If Your Site Has Google Analytics Installed with My Tool

Not sure if you’ve installed Google Analytics correctly?
Don’t worry – I’ve got you covered with a free tool that will check it for you.

Introducing the Google Analytics Tracker Checker!

Here’s what it does:

  • Enter any website URL and it’ll tell you if Google Analytics is installed.
  • Detects both Universal Analytics (UA) and Google Analytics 4 (GA4).
  • Color-coded results (Green = found, Red = not found).
  • No coding required—just plug in your URL and get instant feedback.
Google Analytics Tracker Checker

Google Analytics Tracker Checker

Checking… Please wait.

FAQs

Do I Really Need Google Analytics for My WordPress Site?
Yes. Without it, you have no idea who’s visiting your site, how they’re finding it, or what pages they’re spending time on.
Google Analytics helps you understand your audience and improve your content.

How Can I Tell If Google Analytics Is Working?
You can check it manually in your Google Analytics dashboard, or use my Google Analytics Tracker Checker for an instant confirmation.

Can I Use Google Analytics Without a Plugin?
Absolutely. If you’re comfortable editing your site’s theme files, you can add the code manually. But for most users, plugins are easier and safer.

Which Is the Best Plugin for Adding Google Analytics to WordPress?
The most popular choice is MonsterInsights. It’s beginner-friendly and gives you reports directly in your WordPress dashboard.
If you’re after something lightweight, try GA Google Analytics.

Is Google Analytics Free?
Yes, 100%. It’s one of the most powerful free tools out there for tracking website data.

Tags :
SEO & Analytics,Uncategorized
Share This :

Leave a Reply

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

Lastest In News

FREE Custom Mockup

of your new website delivered in 7 days! No cost or future obligation guaranteed!