Google Analytics Shows “No Data Received in Past 48 Hours”: How to Fix It
Your GA4 property says data collection isn’t active. Work through seven checks in order: Measurement ID, tag placement, caching, consent, GTM, filters and ad blockers.
<!-- Google tag (gtag.js) --> <script async src="…/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>
What does “no data received in past 48 hours” mean?
Google Analytics has not received one single hit from your website in two days. Either the tag is not firing, or the hits never reach the right property.
Realtime vs reports
Realtime updates in seconds. Standard reports can lag 24 to 48 hours, so always test in Realtime first.
Measurement ID
GA4 uses IDs that start with G-. Old UA-XXXXX codes stopped processing data in 2023.
Tools you need
Admin access to GA4, access to your site’s theme or plugin, and a Chrome browser with DevTools.
Time needed
Most sites are fixed in 10 to 20 minutes. Data then appears in Realtime right away.
Why GA4 shows no data: the 7 usual causes
Each one has its own fix in the next section.
Wrong Measurement ID
A typo, an old UA code, or the ID of a different property.
Tag not on every page
Installed on the homepage only, or missing from a child theme.
Cache or minify plugin
Delay-JS and defer options can stop gtag.js from ever running.
Cookie banner blocking
The tag waits for consent that visitors never give.
GTM not published
The tag exists in Tag Manager but the container was never published.
Filters and blockers
Internal traffic filters, ad blockers and strict CSP rules.
Wrong data stream
The stream points to another domain, or the plugin is linked to another account.
Google Analytics no data: fixes, step by step
Do them in order. After each one, open your site and check Reports → Realtime.
Step 1: Copy the right Measurement ID
In GA4 go to Admin → Data streams → your web stream and copy the ID that starts with G-. Compare it character by character with the one on your site.
// Run this on your site (F12 → Console) console.log(window.google_tag_manager); // You should see your G-XXXXXXXXXX key listed.
Step 2: Install the Google tag in the head of every page
Paste the tag once, as high as possible inside <head>. In WordPress use header.php of your child theme, or a header-scripts plugin.
<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>Step 3: Exclude the tag from caching and minify
Clear every cache layer (plugin, server, CDN) and exclude these URLs from delay, defer and combine options in your optimization plugin.
googletagmanager.com/gtag/js google-analytics.com gtag( dataLayer
Step 4: Set Consent Mode so the banner doesn’t block the tag
Load the tag always, and let consent decide what it may store. Put this before the config line, then update it when the visitor accepts.
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied'
});
// When the visitor clicks "Accept":
gtag('consent', 'update', { analytics_storage: 'granted' });Step 5: Publish your Google Tag Manager container
If you use GTM, open Preview and confirm the GA4 Configuration tag fires on Page View. Then click Submit → Publish. A saved draft sends nothing. Also make sure the GTM snippet itself is on the site.
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>Step 6: Check filters, ad blockers and your CSP
In Admin → Data settings → Data filters, make sure no filter in the Active state removes all traffic. Test in an incognito window with extensions off, or on your phone with mobile data. If you send a Content-Security-Policy header, allow the Google domains.
Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' https://www.googletagmanager.com; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; img-src 'self' https://*.google-analytics.com https://*.googletagmanager.com"
Step 7: Verify with Tag Assistant and DebugView
Open tagassistant.google.com, enter your URL and confirm the Google tag is detected. Then in GA4 open Admin → DebugView while the Tag Assistant window is connected. You should see page_view events arrive. You can force debug mode like this:
gtag('config', 'G-XXXXXXXXXX', { 'debug_mode': true });Tip: remove debug_mode after testing. If Realtime shows your visit but the message stays, wait up to 48 hours: the warning only clears once Google processes the data.
Quick checklist: is your GA4 working?
Realtime shows 1 user
Open your site in a new tab and watch Reports → Realtime.
Tag Assistant is green
The Google tag is detected with the right G- ID.
No console errors
No blocked requests to googletagmanager.com or google-analytics.com.
Fix the ID, check Realtime.
Most “no data” cases come from a wrong ID, a cached script or a blocking cookie banner. Fix those three first.
Google Analytics no data: frequently asked questions
Why does Google Analytics say no data received in the past 48 hours?
Google Analytics has not received a single hit from your site in 48 hours. The usual causes are a missing or wrong Measurement ID, a tag that is not on every page, a caching or minify plugin that breaks the script, a consent banner that blocks the tag, or a GTM container that was never published.
How long does GA4 take to show data?
The Realtime report updates within seconds. Standard reports can take 24 to 48 hours, so test with Realtime first.
Where do I find my GA4 Measurement ID?
Go to Admin, Data streams, click your web stream and copy the ID that starts with G-.
Can a cookie banner stop Google Analytics from collecting data?
Yes. If the banner blocks the Google tag until consent and visitors decline or never respond, GA4 receives nothing. Use Consent Mode (Step 4) so the tag loads and respects the choice.
Can I have two Google Analytics tags on one site?
You can, but a theme, a plugin and GTM often add the same tag twice. Keep one tag per Measurement ID to avoid duplicate pageviews.
Will an ad blocker hide my own visits?
Yes. Many ad blockers block google-analytics.com and googletagmanager.com, so test in a clean browser profile or on your phone with mobile data.
More tutorials and projects
Same free, hands-on style.
PHP projects
Source code, free.
open ↗ pyPython projects
Clean and readable.
start now ↗ JSJavaScript projects
Make the browser do things.
start now ↗Still no data?
Ask the community.
Join our Telegram group for daily exercises, answers and friendly help.
