On this page
What this issue is
Universal Analytics (UA) was the previous version of Google Analytics. Its tracking IDs start with UA-. Google Analytics 4 (GA4) replaced it, and its measurement IDs start with G-.
On an affected site, the page still loads old code such as analytics.js or a gtag('config', 'UA-XXXXX-Y') call. No GA4 tag is present. The old tag sends hits to a system that no longer processes them, so your GA4 property stays empty.
This usually happens on sites built years ago, where the tag was pasted into a theme, a plugin setting or a Tag Manager container and never updated.
Why it costs you leads or sales
With no GA4 data, you cannot see which channels bring leads or sales. Conversions are not recorded, so reports show zero or stale numbers. Anything that depends on GA4 breaks too: imported conversions in Google Ads, audiences and attribution reports.
The risk is quiet. The site works and the old tag loads without errors, so nobody notices until someone asks why the reports are empty. Ad budget can keep flowing to campaigns you cannot measure.
- Visitor landsPage loads normally
- UA- tag firesOld analytics.js hit is sent
- GA4 receives hitNo G- tag on the page
- Reports and adsEmpty or stale numbers
The visit happens, but the old tag sends it to a system that no longer processes it.
Example: a site gets 40 real enquiries a week, but GA4 shows none because only the old UA- tag is installed.
How to check if your site has it
View the page source
Open a key page, right-click, choose View page source, and search for
UA-,analytics.jsandG-. A UA- match with no G- match is the problem.Check the Network tab
Open browser developer tools, go to Network, reload, and filter for
collect. A GA4 hit goes to a URL containing/g/collect. Old UA hits go to/collectwithout theg.Inspect Tag ManagerGoogle Tag Manager
If you use Google Tag Manager, open the container and look for a Universal Analytics tag type or a Google Analytics settings variable holding a UA- ID.
Check GA4 itself
In GA4, open Reports, then Realtime. Visit your site in another tab. If nothing appears, no GA4 hit is arriving.
How to fix it
First find your GA4 measurement ID. In GA4 go to Admin, Data streams, choose your web stream, and copy the ID that starts with G-. If you have no GA4 property yet, create one in Admin first.
Find where the UA- ID lives
Check your analytics plugin settings, the theme's header scripts option and any header and footer injection plugin. Search the theme's header.php for UA-.
Swap in the G- ID
Replace the UA- ID with your G- measurement ID in the plugin, or remove the old snippet and add the GA4 snippet. Avoid leaving both an old plugin and a new one active.
Clear caches
Purge your caching plugin and CDN so visitors get the updated page.
Check the Google and YouTube app
In the Shopify admin, open Sales channels, then Google & YouTube, and connect your GA4 property.
Remove old code
Go to Online Store, Themes, Edit code, and search theme.liquid for UA- and analytics.js. Delete the old snippet. Also check Settings, Customer events for old custom pixels.
Create a GA4 configuration tag
Add a new tag of type Google tag, enter your G- ID, and set the trigger to Initialization - All Pages.
Delete the Universal Analytics tags
Pause or delete tags using a UA- ID and any variable holding it. Recreate event tags as GA4 event tags.
Preview, then publish
Use Preview to confirm the GA4 tag fires, then click Submit to publish.
Open project settings
Go to Site settings, then Integrations, and find the Google Analytics field. Paste your G- ID there.
Remove old custom code
Check Site settings, Custom code, for a pasted UA- snippet and delete it. Publish the site.
Use the marketing integration
In the dashboard open Marketing integrations, or Settings, Marketing, then connect Google Analytics and enter your G- ID.
Remove custom code
Under Settings, Custom code, delete any old UA- snippet, then publish.
Update the analytics setting
Go to Settings, Developer tools or Integrations, Google Analytics, and enter the G- measurement ID. Availability of the field depends on your plan and version.
Check code injection
Under Settings, Advanced, Code injection, remove any UA- snippet from the header or footer.
Check funnel and site tracking code
In each funnel or website, open Settings, Tracking code, and look in the header code for UA- or analytics.js. Replace it with the GA4 snippet. Check the sub-account's Integrations for an old Google Analytics connection too.
Remove the old snippet
Delete the analytics.js loader and the ga('create', 'UA-...') call from your templates.
Add the GA4 snippet
Paste the snippet below as high in the head of every page as possible, with your own G- ID.
<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>Before
- Loads analytics.js with a UA- ID
- No G- ID anywhere on the page
- GA4 Realtime stays empty
After
- Loads gtag.js or GTM with a G- ID
- Network tab shows a /g/collect hit
- Visits appear in GA4 Realtime
How to confirm it's fixed
- Page source has your G- ID and no UA- ID or analytics.js
- The Network tab shows a request to /g/collect with status 200
- Your own visit shows in GA4 Realtime within a minute or two
- Tag Manager Preview shows the GA4 tag fired on All Pages
- Form submits and purchases show as events in Realtime or DebugView
- Checked on the home page, a landing page and the thank-you page
How to prevent it happening again
- Keep a list of every tracking ID in use and where it is installed
- Remove old tags during any redesign, theme change or migration instead of copying them over
- Use one install method for GA4, either Tag Manager or gtag.js
- Review the Tag Manager container for unused tags every few months
- Run an automated check that looks for a GA4 hit on key pages
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor loads your funnel pages on a schedule and watches the tracking hits the page sends. If the page makes no GA4 hit, FunnelGuard flags it (the check note reads: no GA4 hit on page). A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
The check sees that no GA4 hit is sent. It does not edit your site, so you still make the change above. Test traffic is marked with utm_source=funnelguard and fg_test=1. The Free plan covers 1 site and 2 journeys with daily checks and needs no card. Paid plans include a 3-day free trial.
Questions people ask
Why is my GA4 not collecting any data?
A common cause is that the site still runs an old Universal Analytics tag (UA- ID) and has no GA4 tag. Check the page source for a G- measurement ID. If only UA- appears, replace it with a GA4 tag.
Is the old UA- tracking code still working?
No. Universal Analytics stopped processing new data, so a UA- tag no longer feeds any report you can use. You need a GA4 tag with a G- measurement ID.
How do I replace a Universal Analytics tag with GA4?
Copy your G- measurement ID from GA4 under Admin, Data streams. Remove the UA- code from your theme, plugin or Tag Manager, then add the GA4 tag with that ID. Confirm a hit in GA4 Realtime.
How can I tell if my site uses UA or GA4?
View the page source and search for UA- and G-. A UA- ID or analytics.js means the old version. A G- ID with gtag.js or a GTM container that has a Google tag means GA4.
Do my old Universal Analytics goals move to GA4?
No. Goals do not transfer automatically. Recreate each one as a GA4 event, mark the important ones as key events, and re-import them in Google Ads if you use them.
Can I keep the UA- tag and add GA4 as well?
There is no reason to keep the UA- tag, since it records nothing useful. Remove it and keep a single GA4 install to avoid duplicate hits and extra page weight.
How do I check that GA4 is receiving hits?
Open GA4 Realtime and visit your site in another tab. You can also watch the Network tab for a request to /g/collect. If neither shows activity, the tag is not firing.
Can FunnelGuard tell me if my site has no GA4 tag?
Yes. FunnelGuard loads your funnel pages on a schedule and flags pages that send no GA4 hit. It rechecks from a second region before alerting you.
Related issues
- TRK-001GA4 tag missing from a funnel pageFix guide
- TRK-002GA4 tag missing site-wide after a theme or builder changeFix guide
- TRK-008gtag.js loaded but config command never calledFix guide
- TRK-006GA4 installed twice (gtag.js and GTM) causing double page_viewsFix guide
- TRK-003Wrong GA4 measurement ID (staging or another client's property)Fix guide
- TRK-012GA4 missing on thank-you or order confirmation pageFix guide