Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Old UA- tag still installed, GA4 missing: how to fix it

TRK-004High impactDetectedBy FunnelGuardPublished Updated
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.

Where the data stops
  1. Visitor landsPage loads normally
  2. UA- tag firesOld analytics.js hit is sent
  3. GA4 receives hitNo G- tag on the page
  4. Reports and adsEmpty or stale numbers

The visit happens, but the old tag sends it to a system that no longer processes it.

Tracked conversions in GA4 vs real conversionsExample numbers
Tracked conversions in GA4 vs real conversions (example)Real enquiries: 40 conversions per week; Seen in GA4: 0 conversions per week01531400Real enquiriesSeen in GA4conversions per week

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

Check for a UA- tag and a missing GA4 tag
  1. View the page source

    Open a key page, right-click, choose View page source, and search for UA-, analytics.js and G-. A UA- match with no G- match is the problem.

  2. 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 /collect without the g.

  3. 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.

  4. 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.

Replace the UA- tag with GA4
  1. 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-.

  2. 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.

  3. Clear caches

    Purge your caching plugin and CDN so visitors get the updated page.

GA4 gtag.js snippet (replace G-XXXXXXXXXX)html
<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>
Page head before and after

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

Confirmation checks
  • 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

Prevention habits
  • 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: no GA4 hit on page.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.