Why Isn't Google Analytics Tracking My Website?

Cody Schneider9 min read

It’s a frustrating feeling: you’ve correctly installed the Google Analytics tracking code on your website, but when you check your reports, you’re greeted with a flat line. Zero users, zero sessions, zero pageviews. Before you panic, know that this is a very common issue with a handful of straightforward solutions. This guide will walk you through the most frequent reasons why Google Analytics isn't tracking your website and provide step-by-step instructions to get your data flowing correctly.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

First, Confirm Your Tracking Code is Installed

Before diving into complex troubleshooting, let's start with the basics. The most common reason for no data is a simple problem with the tracking code's installation or setup. There are three easy ways to verify if the Google Analytics tag is active on your site.

1. Check Your Website's Source Code

Your Google Analytics tracking code is a JavaScript snippet that needs to be present on every single page of your website. You can manually check for it by looking at your site's source code.

  • Navigate to your website in a web browser (preferably Chrome).
  • Right-click anywhere on the page and select "View Page Source." (Alternatively, you can use the keyboard shortcut: Ctrl+U on Windows or Cmd+Option+U on Mac).
  • A new tab will open with the HTML code of your website. Use the find function (Ctrl+F or Cmd+F) and search for "gtag.js".
  • You should find a script that looks something like this. The important part is making sure the Measurement ID (starting with "G-") matches the one in your Google Analytics account.
<!-- Google tag (gtag.js) -->
<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>

2. Use Google's Tag Assistant Legacy

Checking the source code works, but an easier, more reliable method is using Google’s free browser extension, Tag Assistant Legacy.

  • Install the Tag Assistant extension from the Chrome Web Store.
  • Go to your website and click the Tag Assistant icon in your browser's toolbar.
  • Click "Enable" and then refresh the page.
  • The Tag Assistant will analyze the tags on your page. If it finds your Google Analytics tag, you'll see it listed. The tag should ideally be green, which indicates it's firing correctly. A yellow or red tag indicates a potential problem that the assistant will help diagnose.

This tool is excellent because it not only confirms the tag's existence but also flags common implementation errors.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

3. Check the Realtime Report

The simplest test of all is to check your Realtime report in Google Analytics. This report shows activity on your site as it happens.

  • Log in to your Google Analytics account.
  • Navigate to Reports > Realtime.
  • In a separate browser window or on your phone (making sure you aren't on an office network that might be filtered out), visit your website.
  • If everything is working, you should see at least one active user appear in the Realtime report within a few seconds. Try clicking on a few different pages to see if the activity registers.

If you see yourself in the Realtime report, congratulations! Your tracking is working. Any data issues you’re seeing elsewhere might be related to data processing delays, which can sometimes take 24-48 hours. But if you see nothing, it’s time to move on to troubleshooting common issues.

Common Installation Issues and Simple Fixes

If your initial checks show that the tracking code is missing or not firing correctly, it's likely due to one of these common mistakes.

Incorrect Placement of the Tracking Code

The Google Analytics code snippet needs to load as early as possible to capture every pageview. The official recommendation is to place it immediately after the opening <head> tag on every single page of your site.

If the code is placed at the bottom of the page (e.g., before the closing <body> tag), it might not fire if a user clicks away before the page fully loads. Check your site's template or theme files to ensure the snippet is in the correct place.

Wrong Measurement ID or an Old Tag Type

It's surprisingly easy to copy the wrong code. Double-check that the Measurement ID (G-XXXXXXXXXX) in your website’s code matches the one from your GA4 property's data stream.

  • In Google Analytics, go to Admin (the gear icon in the bottom left).
  • Under the Property column, click Data Streams and select the relevant stream for your website.
  • Your Measurement ID will be displayed in the top right. Make sure this is the ID in the tracking snippet on your website.

Also, ensure you are using the modern Google tag (gtag.js) and not a legacy Universal Analytics tag (analytics.js). Mixing up tags can cause tracking failures.

Problems with Your CMS, Theme, or Plugin

Most modern websites are built on a Content Management System (CMS) like WordPress, Shopify, or Squarespace. These systems often have a dedicated section in their settings to add your GA4 Measurement ID, which handles the code placement for you.

  • WordPress: If you're using a plugin like Site Kit by Google, GA Google Analytics, or MonsterInsights, you typically just need to paste your "G-" Measurement ID into the plugin’s settings, not the full code snippet. If you've manually added the full snippet to your theme files and used a plugin, you might have duplicate tracking, which can cause reporting errors. Choose one method and stick with it.
  • Shopify: Shopify has a native Google Analytics integration. Navigate to Online Store > Preferences, and you'll find a "Google Analytics" section where you can paste your "G-" ID.

Always check your CMS or theme documentation if you're unsure. If a feature or plugin is meant to simplify installation, verify its settings first.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Google Tag Manager (GTM) Setup Errors

Many advanced users manage their scripts via Google Tag Manager. If you're using GTM, your Google Analytics snippet (gtag.js) should NOT be on your website directly. Instead, you should only have your GTM container snippet installed.

Inside GTM, you need to ensure two things are set up correctly:

  1. A Google Analytics: GA4 Configuration Tag: This tag stores your Measurement ID and sends pageview events.
  2. A Trigger: The tag needs to be told when to fire. For standard page tracking, this tag should be linked to the built-in "Initialization - All Pages" or "Container Load - All Pages" trigger.

The best way to debug this is with GTM’s Preview mode, which lets you see exactly which tags are firing (or not firing) on your site in real-time.

Beyond Installation: Other Reasons for No Data

If your code is installed perfectly but data is still missing, the cause might be related to filters or other site settings that block data collection.

Internal and Developer Traffic Filters

Google Analytics 4 allows you to create filters to exclude traffic from specific IP addresses. This is commonly used to prevent employees' sessions (internal traffic) or developers' activity from cluttering your data.

Check if you have inadvertently set up a filter that is excluding your own traffic.

  • Go to Admin > Data Streams > Configure tag settings > Show all > Define internal traffic. Make sure the filter isn't overly broad.
  • Next, check Admin > Data Settings > Data Filters. Here you'll see if any filters, like "Developer Traffic," are active. You can temporarily set a filter to "Testing (Inactive)" to see if that allows your data to come through.

Ad Blockers and Privacy Extensions

Many ad blockers and privacy-focused browser extensions (like Ghostery or uBlock Origin) block Google Analytics scripts by default. If you or your team members have these installed, your visits might not be tracked.

While you can't control what your visitors use, you should disable your own blockers when testing your website's analytics. This is a common source of discrepancy but isn't usually the reason for zero traffic unless almost all of your early visitors are your internal team using these tools.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Incorrectly Configured Cookie Consent Banner

This is an increasingly common culprit, especially for websites with European traffic. Privacy regulations like GDPR require you to get user consent before deploying tracking cookies. Most Cookie Consent platforms do this by preventing tracking scripts like Google Analytics from firing until the visitor clicks "Accept."

If your consent platform is misconfigured, it might be blocking Google Analytics entirely. Here’s how to check:

  • Open your website in an incognito or private browsing window (so it treats you as a new visitor).
  • Do not interact with the cookie banner.
  • Use Tag Assistant or check the Realtime report to see if GA is firing. It shouldn’t be.
  • Now, go back and click "Accept" on the cookie banner.
  • Re-check Tag Assistant or the Realtime report. The tag should now fire, and your visit should appear.

If the tag never fires, even after granting consent, you likely have an issue with how your consent management platform is integrated with GTM or your site’s scripts.

Your Quick Troubleshooting Checklist

Feeling overwhelmed? Run through this checklist to quickly diagnose the problem.

  • Use the Realtime Report first. It's the fastest way to confirm if tracking is live.
  • Verify the Measurement ID. Ensure the "G-" ID on your site matches the one in your GA4 property.
  • Check code placement. Confirm the tracking snippet is in the <head> section of every page.
  • Use Tag Assistant Legacy. Let Google's own tool diagnose installation mistakes for you.
  • Review Active Filters. In the GA Admin panel, check that you aren't accidentally filtering all traffic.
  • Test your Cookie Banner. Make sure it allows the GA tag to fire after a user gives consent.
  • Disable personal Ad Blockers during your testing.
  • If using a CMS/plugin, check its settings directly rather than looking for code in your theme.
  • If using GTM, use Preview Mode to ensure your GA4 Configuration tag is firing on every page load.

Final Thoughts

Troubleshooting Google Analytics can feel like looking for a needle in a haystack, but the issue is almost always traced back to a handful of basics: an incorrect ID, improper code placement, a plugin misconfiguration, or an overly aggressive filter. By methodically working through these common scenarios, you can quickly find the root cause and get your data tracking accurately.

Manually debugging tracking scripts and navigating GA's admin panel is exactly the kind of friction stopping many teams from getting the answers they need. We designed Graphed to solve this by automating away the technical headaches. Once your data sources are connected, you simply ask for the reports you need in plain English. You can instantly create real-time dashboards by asking, "show me website traffic and conversions by landing page this month," and let AI handle the heavy lifting without making you hunt for the right report.

Related Articles