Google Analytics 4 not collecting data: how to find the cause and fix it
GA4 shows no data when the tracking tag is missing, has the wrong Measurement ID, is blocked by a consent banner, or when a filter hides the traffic. A Realtime test and a quick look at your page source will usually tell you which one it is.
You open Google Analytics 4 and the reports show zeros, a flat line, or a warning that no data has been received. Visitors are still coming to your site, but GA4 is not hearing about them. The cause is nearly always one of a handful of things, and you can find it in about fifteen minutes without writing code.
What you see
- The Realtime report shows 0 users while you are browsing your own site.
- The data stream page says no data has been received in the past 48 hours.
- Reports worked until a certain date (often a redesign, theme change, platform move or banner install) and then stopped.
- Numbers are far lower than you expect from your sales, calls or emails.
Why it matters
Without data you cannot tell which pages, ads, emails or search terms bring customers. You end up spending money on guesses, and you cannot prove that a website change helped. GA4 does not go back and fill in missing days, so every week of broken tracking is lost for good.
There is a trust side too. If a cookie banner is set up badly, you may lose data you were allowed to collect, or collect data before the visitor agreed. Fixing tracking and consent together saves you doing the work twice.
How to check your site (free)
- Run a Realtime test. In GA4 go to Reports, then Realtime. In another window, open your site in a private browser window with ad blockers off, and accept cookies if a banner appears. Wait a minute. You should show up as one user.
- Compare the Measurement ID. In GA4 click Admin, then Data streams, then your web stream. The ID starts with
G-. Now open your site, view the page source (Ctrl+U on Windows, Cmd+Option+U on Mac) and search forG-andgoogletagmanager. The ID on the site must match the stream exactly. - Use Tag Assistant. Google's free Tag Assistant (tagassistant.google.com) loads your page and tells you whether a Google tag is present and whether it fires.
- Look at the network request. Open your browser's developer tools, go to the Network tab, type
collectin the filter and reload. A request togoogle-analytics.com/g/collectmeans the browser is sending data. If nothing appears, the tag is not firing. If the request appears but GA4 stays empty, look at the ID, the property and your filters. - Try DebugView. In GA4 Admin, DebugView shows events from a browser that Tag Assistant or the debug mode has flagged, which helps when Realtime is unclear.
Common causes and fixes
| Cause | How to spot it | Fix |
|---|---|---|
| Tag never added, or lost in an update | No googletagmanager in the page source | Add the Google tag again, once, in one place |
| Wrong or old ID | ID in source differs from the data stream, or starts with UA- | Replace it with the G- ID from the current stream |
| Tag Manager changes not published | Tag appears in preview mode but not on the live site | Click Submit, then Publish in the container |
| Consent banner blocks the tag | Data appears only after you click accept | Check the banner's analytics setting and how it talks to Google tag |
| Ad blocker or browser privacy | Works in a clean private window, not in your daily browser | Normal for some visitors, cannot be fully fixed |
| A data filter hides traffic | Filter set to Active under Admin, Data collection and modification, Data filters | Review it, see the note below |
| Tag only on some pages | Source shows the tag on the home page but not on others | Move it to the site-wide header or template |
| Just a delay | Realtime works, standard reports are empty | Wait 24 to 48 hours |
If your site still uses the old Universal Analytics code, that stopped processing data in 2023 and will never show anything in GA4. See Universal Analytics still installed.
If you set up an internal traffic filter and switched it to Active, it can hide your own visits while you test, which looks like a fault. Read GA4 internal traffic not filtered to set it up safely.
Where to look on common platforms
Menu names change between versions, themes and plans, so treat these as starting points.
- WordPress: the ID is usually entered in an analytics plugin such as Site Kit by Google, or in a theme setting, or pasted into the header. Check that only one of these is in use. Caching plugins can keep serving an old page, so clear the cache after changes.
- Shopify: look under Online Store, then Preferences for a Google Analytics field, or use the Google & YouTube app. Which one applies depends on your store setup.
- Wix: usually under Marketing integrations or Marketing & SEO, where you connect Google Analytics with the
G-ID. - Squarespace: usually in the Analytics or External API keys settings. Some plans limit code injection, so check what yours allows.
- Webflow: Site settings, then Integrations, then Google Analytics. Publish the site afterwards, because changes do not go live until you do.
- Next.js: the tag must be in the layout or in the official
@next/third-partiesGoogle Analytics component. Environment variables read by the browser need theNEXT_PUBLIC_prefix and must be set in the production build, not just on your computer. - Google Tag Manager: you need a Google tag with your
G-ID, a trigger that fires on all pages, and a published container. See our Google Tag Manager guide.
How to confirm the fix worked
- Your own visit shows up in Realtime within a minute or two.
- The Network tab shows a
collectrequest that completes successfully. - Tag Assistant sees the tag on several different pages, not just the home page.
- Test on a phone using mobile data, so you know it is not only your office or your browser.
- Test the banner both ways: accept and decline. Make sure the behaviour matches what your cookie policy says.
- After a day or two, standard reports (Acquisition, Pages and screens) show sessions.
How to stop it coming back
- Write down the Measurement ID and exactly where it is installed (plugin, theme, Tag Manager, code).
- Use one method only. Two installs cause a different problem, covered in GA4 duplicate tracking.
- Run the Realtime test after every theme change, platform migration, plugin update or cookie banner change.
- Keep a monthly reminder to open Realtime and look at the last 30 days for sudden drops.
- Tell any developer or agency who edits your site that analytics must keep working.
SiteMonday's week 38 Analytics setup check covers this each year, ending in a written report and a ranked fix list. SiteMonday finds and explains the problem. Making the change is up to you or your developer.
Step by step for your platform
- GA4 showing no data on WordPress
- GA4 showing no data on Shopify
- GA4 showing no data on Google Tag Manager
- GA4 showing no data on Wix
- GA4 showing no data on Squarespace
- GA4 showing no data on Webflow
- GA4 showing no data on Next.js
Questions
How long until GA4 shows data after I fix it?
The Realtime report should show your visit within a minute or two. Standard reports can take 24 to 48 hours to fill in.
Why does Realtime work but my normal reports are empty?
Standard reports process data with a delay, so new data may not appear for up to 48 hours. If it is still empty after that, check for an active data filter and make sure you are viewing the right property and date range.
Can I recover the data from the days GA4 was not collecting?
No. GA4 only records what the tag sends at the time of the visit, and it does not backfill. Your server logs or hosting statistics may still give you rough visit numbers for that period.
Does a cookie banner stop GA4 collecting data?
It can. If the banner is set to block analytics until the visitor accepts, you will only see data from people who accept. Check how your banner is connected to the Google tag and test with both accept and decline.
Why is my data lower than my real traffic?
Ad blockers, browsers with strict privacy settings and visitors who decline cookies all reduce what GA4 can see. Some gap is normal, but a drop to near zero points to a setup fault.
My site still has a UA- code. Is that why there is no data?
Yes, if that is your only analytics code. Universal Analytics stopped processing data in 2023, so you need a GA4 property and a `G-` Measurement ID installed on the site.