Skip to the tool
OnPageKit

Google Analytics Checker

Find GA4, GTM and legacy UA tags and what is wrong with them.

view source, select all, paste

The markup is read in this tab. Nothing is fetched, and no tag in it is run.

Tag IDs
0
gtag.js loads
0
GTM containers
0
Consent mode
No
  • No Google Analytics, gtag or Tag Manager ID in this markup. If the site adds tracking through a plugin, a consent tool or server-side tagging, it may not be in the page source at all.

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

What this tool does

This Google Analytics checker reads the HTML you paste and lists every Google tag ID in it: GA4 measurement IDs (G-), Universal Analytics properties (UA-), Tag Manager containers (GTM-) and Google Ads tags (AW-), each with the line it first appears on. Then it checks how they are installed, which is where most tracking problems really come from.

It works as a GTM checker and a GA4 tag checker in one pass. It flags the gtag.js library loaded twice, the same ID configured twice, a config call with no library behind it, retired Universal Analytics code, a missing consent mode default or one set too late, and tags placed in the body or the GTM noscript iframe placed in the head.

How to use it

  1. Open the page in a browser, choose View Source, select everything and copy it. Use view source, not the Elements panel: the panel shows what scripts added after load, which is not what you shipped.
  2. Paste it into the box. The IDs and findings appear as you paste.
  3. Fix the errors first, then the warnings. The notes are context, not faults.

Nothing is fetched and no script in the markup is executed. The tool never contacts Google, which is also why it cannot tell you whether hits are arriving — that is a job for GA4's DebugView.

What each finding means

Universal Analytics is gone. A UA- ID or an analytics.js include is dead weight: it still downloads and still fires, and nothing receives it. Plenty of sites migrated to GA4 by adding the new tag and never removed the old one.

Duplicates inflate everything. Every gtag('config', 'G-…') call sends its own page view. Two calls mean double sessions, a bounce rate close to zero and conversion rates that look better than they are. The same happens when a theme and a plugin both add the snippet, or when a hard-coded tag and a Tag Manager tag share an ID.

Order matters for consent. Consent mode only works if the default is set before the first tag command. A default that arrives after the config call is too late: the first hit has already gone out as though the visitor had agreed.

Placement matters for counting. Google asks for both the gtag snippet and the GTM snippet as high in the head as possible. A tag at the bottom of the body misses every visitor who leaves before the page finishes loading. The GTM <noscript> iframe is the opposite case: it belongs right after the opening body tag, and putting it in the head makes the parser end the head early, which pushes your canonical and meta tags into the body.

When the source shows nothing

Some sites add tracking through a consent platform, a WordPress plugin that injects the tag after load, or server-side tagging on a first-party domain. None of those show up in the raw source, so an empty result is not proof that a site is untracked.

To check the rest of the head while you are there, the meta tag analyzer reads the same pasted source. Tags loaded over plain HTTP show up in the mixed content checker, and the UTM builder tags the campaign links whose traffic GA4 is meant to attribute.

Frequently asked questions

How do I find the GTM container ID on a site?

Open the page, view its source and search for GTM- followed by letters and digits. It appears in the container snippet near the top of the head and again in the noscript iframe after the body tag. Paste the source here and the ID is listed with the line it sits on.

Does a UA- tag still do anything?

No. Standard Universal Analytics stopped processing data on 1 July 2023 and Analytics 360 properties followed on 1 July 2024. A UA- tag still loads and still sends requests, but nothing records them. Remove it and make sure a GA4 property with a G- ID covers the same pages.

Why are my GA4 page views doubled?

Almost always because the same measurement ID is configured twice: two gtag config calls, the gtag snippet pasted into a theme and again by a plugin, or a hard-coded tag plus a GA4 tag inside Google Tag Manager. This checker finds the first two in the source. For the third it tells you both are present, and you confirm it in the container.

Can this tell whether GA4 is actually receiving data?

No, and it does not try. It reads the markup you paste and never runs the tags or contacts Google. To confirm hits arrive, open the Realtime report or DebugView in GA4, or use Tag Assistant while browsing the live site.

What is consent mode and do I need it?

Consent mode is a gtag command that sets the default storage state, such as analytics_storage denied, before any tag fires, then updates it when the visitor chooses. Google has required it for Ads measurement of EEA traffic since March 2024, and without it tags behave as if every visitor had agreed. The default must come before the config call or the GTM snippet.

Related tools

Updated