Google Analytics Not Tracking Page Views? Try These Fixes First
Google Analytics stops tracking page views more often than you'd think. I'll walk you through the three most common reasons and how to fix them fast.
You open Google Analytics, expecting to see your traffic numbers climbing. Instead, you see a flat line. Nothing. Zero page views. That sinking feeling hits hard.
I've debugged this issue for small businesses maybe 50 times over the past few years. The good news? It's almost always one of three things. Let's fix it.
1. The Tracking Code Is Missing or Wrong
This is the one I see most often. Someone updates the website, or switches themes, and the Google Analytics tracking code gets lost. Or maybe it's there but pointing to the wrong property ID.
I had a client last month whose entire tracking setup broke after they switched from Universal Analytics to GA4. They copy-pasted the old code by accident. Took me 5 minutes to find, but they'd been without data for two weeks.
How to check your tracking code
- Open your website's source code in your browser (right-click, view page source).
- Search for 'gtag' or 'ga(' or 'gtm-'.
- If you're on GA4, you'll see something like
gtag('config', 'G-XXXXXXXXXX');. If you're on Universal Analytics, you'll seega('create', 'UA-XXXXX-Y', 'auto');. Make sure the ID matches the one in your Analytics property.
What to do if it's missing
Go into your website's header template (usually in your theme or CMS). Paste the full tracking code from Google Analytics right before the closing tag. Save and reload your page. After a few minutes, check if real-time tracking shows a visitor.
If you're using a CMS like WordPress, check if you have a plugin like 'Insert Headers and Footers' or 'Google Site Kit'. Those can override your manual code. Disable any conflicting plugins and test again.
Pro tip: Use Google Tag Assistant (the Chrome extension) to see if your tracking code fires correctly. It'll tell you if the tag is missing or broken. I use this every single time.
2. Ad Blocker or Browser Extension Is Blocking the Script
This one is sneaky. You might have a browser extension that blocks Google Analytics scripts. Ad blockers, privacy tools, even some VPNs can kill tracking.
I ran into this with a client who used uBlock Origin. His Analytics showed zero page views for his own site. He couldn't figure it out until he opened an incognito window without extensions. Boom—suddenly his page views appeared. He'd been blocking his own data for months.
How to test
- Open your website in an incognito or private window.
- Disable all browser extensions.
- Visit a page on your site.
- Check GA real-time reports.
If you see the page view appear, then an extension was the problem. The fix isn't to ask visitors to disable their ad blockers—that's unrealistic. Instead, use server-side tracking as a backup. That way even if the client-side script gets blocked, you still get data.
Server-side tracking isn't for everyone. But if you're losing a lot of visitors to ad blockers (like news sites or tech blogs), it's worth it. Services like Google Tag Manager's server-side container can help.
Quick check: Go to your site's page, right-click and 'Inspect', then look at the Console tab. If you see a warning like 'Failed to load resource: net::ERR_BLOCKED_BY_CLIENT', that's an ad blocker blocking GA.
3. Cookie Consent Banner Is Blocking Tracking Before Consent
This is the one that trips up newer sites. If you use a cookie consent banner (like Cookiebot, OneTrust, or a WordPress plugin), it might be set to block Google Analytics until visitors click 'Accept'. That means your traffic data only shows visitors who accept cookies.
I had a client last year whose GA numbers dropped by 40% after they installed a consent banner. They thought their traffic died. Nope—the banner was blocking all tracking for visitors who didn't accept. That's about 30-40% of visitors for most sites.
How to check if this is your problem
- Open your site in a browser where you haven't accepted cookies yet.
- Open the browser's DevTools (F12 or right-click and Inspect).
- Go to the 'Network' tab and filter by 'analytics' or 'google'.
- Load your page. See any 'collect' or 'gtag' requests? If not, the consent banner is blocking them.
How to fix it
You have two choices:
- Option A: Change your consent banner settings to allow 'measurement' cookies to load before consent. Some laws allow this if it's for analytics only (check with your legal person).
- Option B: Use Google Analytics' consent mode. This tells Google to collect data without cookies until consent is given. It's incomplete data but better than nothing.
Google Tag Manager makes consent mode easier. You set up a variable that checks if the user accepted analytics cookies. If yes, load the GA tag normally. If no, load it with consent mode 'denied' but still send a basic ping.
Real-world fix: For a client using Cookiebot, I set their consent category for 'Statistics' to 'necessary' (which loads immediately). Then I configured GA4 consent mode to send data with a 'denied' default. That way we got at least some page view data from everyone, and full data from those who accepted.
Quick-Reference Summary Table
| Cause | Symptom | Fix |
|---|---|---|
| Tracking code missing or wrong | No data at all, even in real-time reports | Check source code for correct GA ID; re-paste code from GA |
| Ad blocker or extension blocking GA | Data shows in incognito but not regular browsing | Use server-side tracking or ask users to whitelist your site |
| Cookie consent banner blocking before consent | Partial data (only from users who accept cookies) | Use consent mode or adjust banner settings |
Most of the time, the fix is simpler than you think. Start with the tracking code. Then check your extensions. Then look at your consent setup. You'll probably have your page views tracking again within 30 minutes.
And if none of these work? Open a support ticket with Google. But honestly, I've never had to go that far.
Was this solution helpful?