How to Verify Google Analytics in WordPress

Cody Schneider9 min read

Verifying your Google Analytics setup is the crucial final step to ensure your WordPress site is collecting data accurately. Without proper verification, you could be making decisions based on faulty or incomplete information. This tutorial will walk you through a few simple and reliable methods to confirm that Google Analytics is active and tracking visitors correctly on your site.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Verifying Google Analytics is a Non-Negotiable Step

You’ve gone through the process of setting up a Google Analytics account and adding the tracking code to your WordPress site, either manually or with a plugin. But how do you know if it's actually working? Skipping this final check is a common mistake that can lead to major headaches down the road.

Here’s why verification is so important:

  • Data Accuracy: It’s the only way to be 100% sure you are capturing traffic data. Without it, you're flying blind, assuming data is being collected when it might not be.
  • Troubleshooting: If you find an issue, you can fix it immediately. It's much better to catch an installation problem on day one than to discover a month later that you have no data for your latest marketing campaign.
  • Decision Making: Every strategic decision you make - from marketing spend to content strategy - relies on accurate analytics. Faulty data leads to poor decisions.

Think of it like checking that your new microphone is plugged in before you start recording a podcast. It’s a simple check that prevents a lot of wasted effort. Fortunately, checking your GA connection is fast and easy. Let's look at three methods, from simplest to most thorough.

Method 1: Check the Realtime Report in Google Analytics

The "Realtime" report is the fastest and most popular way to see if Google Analytics is receiving data from your website. This report shows you activity on your site as it happens. If your visit registers, the connection is working.

Here’s how to do it step-by-step:

Step 1: Open Your Website and Google Analytics

First, open your WordPress website in a separate browser tab or window. It’s best to use a browser where you aren't logged into WordPress as an administrator, so your activity gets counted as a regular visitor. Using an "Incognito" or "Private Browsing" window is a great way to do this.

In another browser tab, log in to your Google Analytics account.

Step 2: Navigate to the Realtime Report

In your Google Analytics 4 property, look at the navigation menu on the left-hand side. Click on Reports, and then select Realtime.

The Realtime dashboard will load. Now, watch the "Users in the last 30 minutes" card, which is usually the large map visualization at the top.

Step 3: Perform Some Actions on Your Site

With both your site and the Realtime report open, go back to your website tab and click around. Visit a few different pages, like your blog, about page, or a product page.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 4: Look for Your Activity in Google Analytics

Switch back to the Realtime report tab. You should see the count for "Users in the last 30 minutes" change to at least "1". Your geographic location should appear on the map. As you navigate to different pages, you'll also see those page titles appear in the "Views by Page title and screen name" card.

If you see your activity show up, congratulations! Your Google Analytics tracking code is installed correctly and is actively sending data.

Pro Tip: To be extra sure, open your website on your phone (using cellular data, not your Wi-Fi). You should see the user count jump to "2" in the Realtime report, confirming that it's tracking different devices and users.

Method 2: Use the Google Tag Assistant Companion

For a more technical and definitive check, you can use the official Google Tag Assistant extension. This handy browser tool inspects your website and tells you exactly which Google tags (like Google Analytics, Google Ads, etc.) are present and if they are firing correctly.

Step 1: Install the Tag Assistant Companion Extension

This method requires Google Chrome. Go to the Chrome Web Store and search for "Tag Assistant Companion." Click "Add to Chrome" to install the extension. Once installed, you'll see its icon (a blue tag) in your browser's toolbar.

Step 2: Start a Debugging Session

Navigate to tagassistant.google.com. You'll be prompted to add a domain to debug.

A new browser window or tab will open with your website. You'll see a small "Tag Assistant Connected" badge in the bottom-right corner. This confirms that the debugging session has started.

Step 3: Analyze the Results

Switch back to the Tag Assistant tab. It will now show you the Google tags that it found on your site. Look for your Google Analytics tag, which will be identified by its Measurement ID (e.g., "G-XXXXXXXXXX").

Click on your Measurement ID to see the details. You should see a "Page View" event under the "Hits Sent" tab. If you see this, it means the tag fired successfully when the page loaded.

As you navigate around your website in the connected window, you'll see new events pop up in the Tag Assistant in real time. This is a powerful way to not only verify the basic installation but also debug more advanced event tracking.

Method 3: Check Your Website’s Page Source Code

This is the most direct way to verify the installation. It involves looking directly at the HTML code of your website to find the Google Analytics tracking script. You don't need to be a developer to do this, you just need to know what to look for.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 1: View the Page Source of Your Website

Go to your WordPress site in your web browser. Right-click anywhere on the page (not on an image) and select "View Page Source" from the context menu. This will open a new tab showing the raw HTML code of your webpage.

Step 2: Search for the Google Analytics Script

The code can look intimidating, but you can ignore almost all of it. Press Ctrl + F (on Windows) or Cmd + F (on Mac) to open your browser’s find function.

In the search box, type gtag.js. This is the name of the modern Google Analytics script library. If the tracking code is installed, your browser will highlight one or more instances of this text.

Specifically, you're looking for a block of code that looks something like this:

<!-- Global site tag (gtag.js) - Google Analytics -->
<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>

The most important part is confirming that the ID G-XXXXXXXXXX matches your actual Google Analytics 4 Measurement ID.

If you can find this script with your correct Measurement ID in the page source, it means the code is present on the page and ready to collect data.

Troubleshooting: 5 Common Reasons Verification Fails

What if you try the methods above and nothing shows up? Don't panic. It's usually due to a simple oversight. Here are the most common reasons your Google Analytics verification might fail and how to fix them.

1. Caching Plugins

By far the most common culprit. If you’re using caching plugins like WP Rocket, W3 Total Cache, or a server-side cache from your host (like SiteGround or WP Engine), your changes might not appear on the live site immediately. Caching saves a static version of your site to serve it faster to visitors.

The Fix: Clear your website’s cache via your caching plugin’s settings, then clear any server-level caches through your hosting dashboard. Finally, clear your own browser's cache before checking again.

2. Incorrect Measurement ID

A simple typo can break everything. It's easy to mistype or copy-paste the wrong Google Analytics Measurement ID (it always starts with "G-").

The Fix: Go to your Google Analytics account and navigate to Admin > Data Streams. Click on your website's data stream and copy the Measurement ID again. Paste it into your WordPress plugin's settings or your site's code, double-checking that it matches perfectly.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

3. Two Tracking Codes Are Installed

This happens more often than you'd think. You might have added the code via a plugin, but also had a theme that has its own built-in Google Analytics integration. Or maybe you added the code manually and forgot you had a plugin handling it. Having two codes can overcount your traffic or cause other conflicts.

The Fix: Use the Google Tag Assistant or search the page source code (as described in Methods 2 and 3) to see how many Google Analytics tags are present. If you see more than one with your Measurement ID, decide on one single method (a plugin is usually best) and remove all others.

4. Code Was Added to a Theme That Got Updated

If you manually pasted the tracking code into your theme's header.php file, that code can get completely overwritten and disappear the next time you update your WordPress theme.

The Fix: The best practice is to avoid editing theme files directly. Instead, use a trusted plugin like Site Kit by Google or MonsterInsights to insert the code. If you must add it manually, do so in a child theme so your customizations are not lost during updates.

5. JavaScript Errors on Your Site

Google Analytics runs on JavaScript. If another plugin or your theme has a JavaScript error on your site, it can sometimes prevent other scripts - including Google Analytics - from running correctly.

The Fix: Right-click on your site, select "Inspect," and click the "Console" tab in the developer tools. If you see angry-looking red error messages, it's a sign that some script is broken. This can be complex to fix, but a good first step is to temporarily disable other plugins one by one to see if the GA tag starts working. This helps you identify the source of the conflict.

Final Thoughts

Confirming your Google Analytics tracking is working is a quick but essential task for any WordPress site owner. By using the Realtime report, Google Tag Assistant, or checking your source code, you can be confident that you're capturing accurate data to guide your growth.

Of course, once you know your data is flowing, the next challenge is making sense of it. Manually creating reports in Google Analytics can be tedious, and answering simple business questions often means digging through confusing menus. At a certain point, the conversation changes from "Is this working?" to "What is all this data telling me?". We built Graphed for exactly this reason. It connects directly to your Google Analytics account and lets you build real-time dashboards and reports simply by asking questions in plain English, turning hours of analysis into a 30-second task.

Related Articles