How to check if a site uses Google Analytics or Tag Manager
Updated 2026-11-26T00:00:00.000Z
Quick answer
Search the page source for googletagmanager.com. A G- followed by letters and digits is a Google Analytics 4 measurement ID, and GTM- marks a Tag Manager container.
Search the source
Paste the address on viewhtmlonline, open the Code tab, and type these in the Find box:
| Search for | What it means |
|---|---|
gtag/js?id=G- |
Google Analytics 4, with its measurement ID |
gtm.js?id=GTM- or GTM- |
Google Tag Manager container |
UA- |
Old Universal Analytics, no longer collecting data |
googletagmanager.com |
Either of the first two |
A Google Analytics 4 tag usually looks like this:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
When you can’t find it
- It is inside Tag Manager. If you only see
GTM-, the Analytics ID lives in the Tag Manager setup, not the page. - It waits for consent. Many cookie banners load analytics only after a visitor clicks accept, using a script.
- It runs on the server. Some sites send data from their server, which leaves nothing in the HTML.
In your own browser
Open Developer Tools (F12), go to Network, reload the page and filter on collect. Requests to google-analytics.com mean data is being sent. You may need to accept cookies first.
Other tracking tags show up the same way: search for fbq( (Meta Pixel), clarity.ms (Microsoft Clarity) or hotjar.
Questions people ask
I see a UA- ID. Is that still working?
No. UA- IDs belong to Universal Analytics, which Google stopped processing in 2023. The site needs a Google Analytics 4 ID starting with G-.
Why can’t I find any analytics code?
It may be loaded by Tag Manager, added by a script after the page loads, or held back until a visitor accepts cookies.