TLDlive

Analytics and Tag Managers Explained, and How to Detect Them

Analytics tools count visits; tag managers load other tools on the owner's behalf. Together they are among the most commonly detected technologies on any site, and the least well understood. This guide separates the layers and shows how to identify each one.

Three layers that people mix up

When someone says "the site has Google on it", they may mean any of three different things.

  1. A measurement library. A script that records page views and events and sends them to an analytics service. Google Analytics, Matomo, Plausible, Fathom and Adobe Analytics are examples.
  2. A tag manager. A container script that loads other scripts according to rules configured in a web interface, so that marketers can add or change measurement without a code release. Google Tag Manager is the best known; others include Tealium, Adobe Launch and Segment's browser library.
  3. An advertising or conversion pixel. A small script that tells an ad platform that a visit or purchase happened, such as the Meta pixel or the TikTok pixel.

The layers stack (the same pattern appears in the CMS detection routine). A typical marketing site loads Google Tag Manager, which in turn loads Google Analytics and two ad pixels. A detector looking at the first HTML response sees only the container; the rest appear after the container runs in a browser. That difference between "in the HTML" and "after JavaScript" explains most disagreements between detection tools.

Google Analytics and the G- identifier

Google Analytics 4 is installed with a global site tag, gtag.js, loaded from googletagmanager.com/gtag/js?id=G-ABC123DEF4, where the identifier beginning with G- is the measurement ID. A page that loads this URL, or defines a gtag function with a config call that mentions a G- ID, uses GA4. The older Universal Analytics generation used analytics.js from google-analytics.com and identifiers beginning with UA-; Google ended processing for standard Universal Analytics properties in 2023, so a UA- ID on a page usually means the code was not touched for years. That is itself an informative signal when evaluating an old site.

The googletagmanager.com host name serves both GA4's gtag.js and Tag Manager containers, which is a classic source of mistaken detections. The path tells them apart: /gtag/js is the global site tag, while /gtm.js is a container.

Google Tag Manager and the GTM- identifier

Tag Manager installs two snippets: a script in the head that loads googletagmanager.com/gtm.js?id=GTM-ABC1234, and a noscript iframe in the body for users without JavaScript. The container ID begins with GTM-. Presence of either is a reliable sign. You can also check the global dataLayer array in the console, which tag managers and many sites use to pass events.

What a container loads is not visible in the source. In DevTools, the Network tab after a page load lists every request the container triggered, and Google's Tag Assistant tool shows what fires. If you want to know whether a site runs Meta or LinkedIn pixels, you often have to look at the network requests, not the HTML.

Privacy-focused and self-hosted analytics

ToolTelltale signNotes
Matomomatomo.js or piwik.js, a global _paq array, a matomo.php or piwik.php tracking endpointUsually self-hosted, so the host name is the site's own; cloud versions use a vendor domain
PlausibleA script tag with data-domain pointing to plausible.io or a first-party proxy pathSmall script; cookieless by design
FathomA script from cdn.usefathom.com with a data-site attributeAlso offers custom domains
UmamiA script with data-website-id; often self-hostedOpen source
Cloudflare Web AnalyticsA beacon from static.cloudflareinsights.comAutomatically injected on some proxied sites
Hotjar and session-replay toolsScript from static.hotjar.com and a hj globalHeavier on privacy; consent rules matter

First-party proxies complicate this. An owner can serve a vendor's script from their own domain, for example under a path such as /stats/script.js, to avoid ad blockers. Then the vendor host name vanishes and only the script's content or a global variable remains. Content-based patterns and JavaScript globals are what detectors lean on in that case.

Conversion pixels

The Meta pixel loads connect.facebook.net/en_US/fbevents.js and defines fbq. The LinkedIn Insight tag loads from snap.licdn.com. TikTok's pixel loads from analytics.tiktok.com and defines ttq. Google Ads conversion uses the same gtag.js library with an AW- identifier. These are strong indicators that a business buys advertising, which is a useful sales and research signal because ad spend implies a working commercial site.

Why this matters for research

  • Maturity signal. A tag manager plus ad pixels suggests marketing staff and a budget. No analytics at all on a ten-year-old shop suggests neglect.
  • Migration risk. When you buy an existing site, identify every property that sends data so that you can transfer ownership of the accounts and not leave the previous owner with access to your visitor data.
  • Compliance. Trackers that set identifiers need consent in many jurisdictions. A site that loads them unconditionally for visitors in the European Union is a compliance question for its owner.
  • Performance. Third-party scripts, a point also made in the Next.js detection guide, are often the largest part of a page's JavaScript.

How Lens treats analytics detection

TLDlive Lens includes analytics and tag manager categories in its catalogue and detects them from script and link URLs, JavaScript globals and DOM elements in the page you are viewing. Because it runs in the browser after the page loads, it can see tags that only appear post-JavaScript, which a plain HTTP fetch cannot. It records technology names, not the identifiers: the G-, GTM- and UA- IDs are not part of what is sent to TLDlive. This matters because a measurement ID is a unique account identifier; the data model in the privacy policy deliberately leaves such strings out.

In aggregate, the analytics category on /technologies shows which measurement tools are common on observed sites. Because Lens users skew technical, interpret privacy-focused tools' shares with caution, as explained in the methodology page.

Manual checklist

  1. Search the source for googletagmanager, gtag(, _paq, fbq( and plausible.
  2. In the console, type dataLayer and see whether an array exists.
  3. Reload with the Network tab open, filter on "collect", "analytics" and "pixel", and note the hosts contacted.
  4. Inspect cookies by name: _ga names suggest Google Analytics, _fbp suggests the Meta pixel. Read the names only; values are identifiers you do not need.
  5. Compare with and without an ad blocker to see what is third-party.

Sources

Frequently asked questions

What is the difference between Google Analytics and Google Tag Manager?

Analytics measures and reports traffic. Tag Manager is a container that loads other scripts, including Analytics, based on rules. A site can have either, both or neither.

How can I tell if a site uses Google Analytics 4?

Look for a request to googletagmanager.com/gtag/js with an id starting with G-, or a gtag function with a G- config call. Cookie names beginning with _ga support the conclusion.

Why does my detector miss tags that I can see in the Network tab?

Tag managers inject scripts after the page loads. A detector that only reads the initial HTML cannot see them, while one running in the browser after load can.

Does Lens send my analytics IDs to TLDlive?

No. Only detected technology names from the catalogue are sent, and only if you opted in. Identifiers such as G- or GTM- IDs are not part of the data.