How to Tell if a Website Uses Google Analytics 4
Google Analytics 4 leaves clear signals: a gtag.js script, a G-XXXXXXX measurement ID, /g/collect requests and _ga cookies. Here is how to spot it fast.
To tell if a website uses Google Analytics 4, view the page source and search for G-: every GA4 property has a measurement ID in the form G-XXXXXXX, loaded via googletagmanager.com/gtag/js?id=G-. Finding that ID is close to conclusive. Confirm it two more ways — open the DevTools Network tab and filter for collect to watch hits fire to google-analytics.com/g/collect, or check Application > Cookies for a _ga cookie and a property-specific _ga_<suffix> cookie. This guide covers every signal, shows how to tell GA4 (G-) apart from the retired Universal Analytics (UA-), and explains how to handle GA4 when it is loaded through Google Tag Manager.
It is a focused companion to how to find out what analytics a website uses and connects directly to how to check if a website uses Google Tag Manager, since GA4 is so often loaded through GTM.
What Google Analytics 4 is
Google Analytics 4 (GA4) is the current generation of Google's free web (and app) analytics platform. It replaced Universal Analytics, the previous version, which Google stopped processing data for in mid-2023 — so GA4 is now the default analytics anyone setting up Google's tooling will use. GA4 is built around an event-based data model and loads through Google's gtag.js library, identified by a measurement ID in the G-XXXXXXX format. For detection, the important point is that GA4 has a consistent, well-documented install pattern — a specific script, a specific ID format, a specific data-collection endpoint and specific cookies — which makes it one of the most reliably identifiable tools on the web. It is also extremely widely deployed, so it is a common find on almost any professional site.
Signal 1: the gtag.js script and G- measurement ID
The primary GA4 fingerprint is the loading script and its measurement ID. GA4 is installed with a snippet that loads gtag/js from googletagmanager.com, passing the measurement ID as a parameter — googletagmanager.com/gtag/js?id=G-ABC123DEF4. The snippet then calls gtag('config', 'G-ABC123DEF4') to initialise tracking. The G- measurement ID is the definitive marker: no other common tool uses that exact format. So a request to googletagmanager.com/gtag/js?id=G-... in the Network tab, or a G- string and a gtag('config', 'G-...') call in the page source, is essentially proof that GA4 is present. The specific ID also identifies that particular data stream.
Signal 2: the /g/collect hits
GA4 sends the data it gathers to a collection endpoint, and watching those hits is a great live confirmation. GA4 posts to /g/collect on google-analytics.com (and to region-specific or first-party variants in some setups). Open DevTools (F12), go to the Network tab, type collect into the filter box, and reload: you will see the /g/collect requests fire as the page records a page view and any events. Inspecting one of these requests shows the measurement ID and the event parameters being sent. This is the most concrete evidence that GA4 is not merely referenced but actively collecting — the /g/collect endpoint is GA4-specific, so filtering for collect is one of the cleanest single checks you can run.
Signal 3: the _ga and ga<suffix> cookies
GA4 sets a recognisable pair of first-party cookies, readable under Application > Cookies. The first is _ga, the general Google Analytics client-ID cookie (also used by older versions, so on its own it is suggestive rather than definitive). The GA4-specific one is _ga_<CONTAINER> — a cookie named _ga_ followed by the property's container suffix (for example _ga_ABC123DEF4), which GA4 uses for session state. The _ga_ prefix with a suffix is the tell that distinguishes GA4 from a legacy Universal Analytics setup, which did not use that cookie. So finding both _ga and a _ga_<suffix> cookie is strong, independent confirmation of GA4.
Signal 4: telling GA4 (G-) from Universal Analytics (UA-)
A crucial distinction is the identifier format, because it dates the install. GA4 uses G-XXXXXXX. Universal Analytics — the previous, now-retired version — used UA-XXXXXX-X and sent hits to an older /collect endpoint (google-analytics.com/collect or /j/collect) rather than /g/collect. Since Google stopped processing Universal Analytics data in mid-2023, a UA- ID found today indicates a legacy or leftover install that is no longer collecting into a live UA property, not active analytics. So if you see a UA- ID, treat it as historical; if you see a G- ID, that is current GA4. Some sites still carry an old UA- snippet alongside their G- GA4 — a sign of an incomplete migration worth noting.
The signal table
| Signal | Where to find it | What it means |
|---|---|---|
googletagmanager.com/gtag/js?id=G-... | Network tab, View Source | GA4 library loading — strong |
G-XXXXXXX measurement ID + gtag('config','G-...') | View Source | GA4 property — strongest single signal |
/g/collect hits to google-analytics.com | Network tab (filter collect) | GA4 actively collecting — concrete confirmation |
_ga + _ga_<suffix> cookies | Application > Cookies | GA4 cookies — strong, independent confirmation |
UA-XXXXXX-X ID + /collect (old) | View Source, Network tab | Legacy Universal Analytics — deprecated, not live |
gtm.js request present | Network tab | GA4 may be loaded through Google Tag Manager |
Any single GA4 row is a strong signal; the G- ID plus the /g/collect hits are conclusive.
Method 1: View Source (search "G-")
The fastest single check is View Source. Open the page, press Ctrl/Cmd + U, and search for G- and gtag. If you find a gtag('config', 'G-XXXXXXX') call or a gtag/js?id=G- script URL, GA4 is installed and you have the measurement ID. Searching for UA- at the same time tells you whether any legacy Universal Analytics snippet lingers. This works because the GA4 snippet is typically placed in the HTML head, so it is present in the server-rendered source — though note that when GA4 is loaded through GTM, the G- ID may live inside the GTM container rather than the page source, in which case the Network tab is the better tool.
Method 2: the Network tab (filter "collect")
For a live, definitive view, use the Network tab. Open DevTools (F12), go to Network, type collect into the filter, and reload. The /g/collect requests to google-analytics.com are GA4's data hits; clicking one reveals the measurement ID (tid=G-...) and the event payload. While you are there, clear the filter and look for the gtag/js?id=G- script load and any googletagmanager.com/gtm.js request. This method is the most reliable because it shows GA4 actually firing — including when it is loaded dynamically through GTM — and it cross-references neatly with the wider analytics detection workflow.
Method 3: cookies, Console and Tag Assistant
Three quick confirmations round things out. In Application > Cookies, find _ga and the _ga_<suffix> cookie to confirm GA4's storage. In the Console, GA4 exposes a dataLayer and a gtag function, so typeof gtag returning "function" is a supporting signal (shared with GTM, so pair it with the G- ID). And for an official, detailed breakdown, Google Tag Assistant (tagassistant.google.com) connects to the site and shows the GA4 tag firing, the measurement ID, and the events being sent — the right tool when you need to verify exactly what GA4 is recording rather than simply confirm it exists.
GA4 loaded directly versus through GTM
An important nuance: GA4 can be hardcoded (the gtag.js snippet placed straight in the page) or loaded through Google Tag Manager (configured as a GA4 tag inside a GTM container). Both fire the same /g/collect hits and use the same G- ID, so detection of GA4 itself is unaffected — but knowing how it is loaded matters for an accurate stack read. If you also see a googletagmanager.com/gtm.js request, GTM is likely orchestrating GA4 (and probably other tags too). If there is a direct gtag/js?id=G- snippet in the source and no GTM, GA4 is hardcoded. Many sites do both for different tags. The practical method: confirm GA4 via the G- ID and /g/collect, then check for GTM to understand whether a tag manager is in the picture — exactly the container/tag relationship explained in how to check if a website uses Google Tag Manager.
A worked example
You want to know how a site measures traffic. You open View Source and search for G- — there it is: gtag('config', 'G-ABC123DEF4'), and a googletagmanager.com/gtag/js?id=G-ABC123DEF4 script. GA4 confirmed, measurement ID captured. To verify it is live, you open the Network tab, filter for collect, and reload — a /g/collect request fires with tid=G-ABC123DEF4 and a page_view event. Application > Cookies shows _ga and _ga_ABC123DEF4. You also spot a googletagmanager.com/gtm.js request and a connect.facebook.net call, so GTM is loading GA4 alongside a Meta Pixel. No UA- ID is present, so the GA4 migration is clean. The read: current GA4, loaded through GTM, with at least one ad pixel firing too — a standard, well-maintained measurement setup. A minute's work yields the platform, the ID and the surrounding stack.
Why detecting GA4 matters
Confirming GA4 is baseline technographic intelligence, and the details refine it. The simple fact that a site runs current GA4 (a G- ID with live /g/collect hits) tells you measurement is active and maintained; a lingering UA- ID with no G- suggests analytics that was never migrated and may not be collecting at all — a genuine gap. The breadth of what fires alongside GA4 is itself a signal: GA4 plus several ad pixels and a tag manager indicates a sophisticated, multi-channel measurement operation, while GA4 alone is a simpler setup. For competitive research this shows how a rival tracks performance; for sales it qualifies a prospect's data maturity; and for a privacy review it identifies one of the main data flows on the page. Analytics is one layer of a fuller stack picture, so pair this with how to find out what technology a website uses.
How accurate is GA4 detection?
Very accurate. The G- measurement ID, the gtag/js script and the /g/collect endpoint are intrinsic to how GA4 installs and are not used by unrelated tools, so confirming GA4 is reliable. The _ga_<suffix> cookie is a strong, GA4-specific corroboration. The nuances are consent and loading method: if a consent banner blocks analytics until you accept, the /g/collect hits and cookies may not fire until you do — so interact with the consent prompt before concluding GA4 is absent. And when GA4 loads through GTM, the G- ID may not appear in the static source, so use the Network tab. Finally, distinguish a live G- install from a deprecated UA- leftover, since they mean very different things. So "does this site run GA4?" is answerable with confidence; just confirm the ID, watch the collect hits fire, and note how it is loaded.
The workflow
- View Source and search
G-for thegtag('config','G-...')call and measurement ID. - Filter the Network tab for
collectto watch/g/collecthits fire and confirm GA4 is live. - Check Application > Cookies for
_gaand a_ga_<suffix>cookie. - Distinguish G- (current GA4) from UA- (deprecated Universal Analytics).
- Check for
gtm.jsto see whether GTM is loading GA4 and what else fires alongside it.
Go deeper
- The wider measurement picture: how to find out what analytics a website uses.
- The tag hub that often loads it: how to check if a website uses Google Tag Manager.
- The ad pixel that often rides alongside: how to tell if a website uses the Meta (Facebook) Pixel.
- The whole stack: how to find out what technology a website uses.
Want GA4, the tags around it and the full stack identified automatically? Analyse any site with StackOptic — free, no sign-up.
Frequently asked questions
How do I tell if a website uses Google Analytics 4?
View the page source and search for G- — GA4 properties have a measurement ID in the form G-XXXXXXX, loaded via googletagmanager.com/gtag/js?id=G-. In DevTools, filter the Network tab for collect and you will see hits to google-analytics.com/g/collect as the page tracks. You can also check Application > Cookies for a _ga cookie and a _ga_<suffix> cookie. Any of these confirms GA4 quickly.
What is a GA4 measurement ID?
A GA4 measurement ID is the identifier for a Google Analytics 4 data stream, written as G- followed by an alphanumeric code (for example G-ABC123DEF4). The site loads GA4 by that ID through the gtag.js script, so the ID appears in the script URL and in the gtag('config', 'G-...') call in the source. Finding a G- ID is the definitive sign of GA4, and the specific ID identifies that particular data stream.
How is GA4 different from Universal Analytics when detecting a site?
The identifier format is the giveaway. Universal Analytics (the older, now-retired version) used IDs in the form UA-XXXXXX-X, while GA4 uses G-XXXXXXX. Google stopped processing Universal Analytics data in mid-2023, so a UA- ID indicates a legacy or leftover install rather than active tracking, whereas a G- ID is current GA4. GA4 also sends hits to a /g/collect endpoint and sets a _ga_<suffix> cookie, which Universal Analytics did not.
Why is GA4 often loaded through Google Tag Manager?
Many sites manage their tags centrally with Google Tag Manager rather than hardcoding each one, and GA4 is a common tag to load that way. So when you detect GA4, it may be firing from within GTM rather than from a snippet placed directly in the page. The practical check is the same — look for the G- ID and the /g/collect hits — but also note whether a gtm.js request is present, which tells you GTM is orchestrating GA4 alongside any other tags.
Why would I want to know if a site uses GA4?
Analytics is a core part of a site's stack, and GA4 is the most widely used web analytics platform, so confirming it is baseline technographic intelligence. For competitive research it shows how a rival measures traffic and conversions; for sales it qualifies a prospect's measurement maturity; and combined with other detected tags — ad pixels, a tag manager, a CRM — it helps build a picture of how data-driven a company is and which channels it invests in.
Analyse any website with StackOptic
Get the full technology stack, performance, security and SEO report in seconds — free.
Analyse a websiteRelated articles
How to Tell If a Website Uses Crisp
Crisp is a developer-friendly, affordable live-chat and messaging tool. Detect it via the client.crisp.chat/l.js script, the window.$crisp object and the CRISP_WEBSITE_ID value.
How to Tell If a Website Uses Tidio
Tidio is an affordable live-chat and chatbot tool for SMBs and ecommerce. Detect it via the code.tidio.co/<publicKey>.js script, the window.tidioChatApi object and tidioChatCode.
How to Tell If a Website Uses Bugsnag
Bugsnag (SmartBear) is an error-monitoring and stability platform. Detect it via the @bugsnag/js SDK, the window.Bugsnag object, the API key in Bugsnag.start() and notify.bugsnag.com beacons.