Detector registry

Tracking Before Consent: Do Your Tags Wait for a Yes?

Do your analytics or ad tags run before visitors agree? How LaunchTrust spots tracking cookies and tags with no consent tool, and how to gate them.

Updated 11 Nov 2026tracking before consent gdprSignals, not a verdict

In the EU, analytics and advertising cookies are not essential, so they need a visitor's consent before they are set. The UK's rules are the same for advertising; since 5 February 2026 they exempt some cookies used only for statistics to improve a service, if visitors are told and can opt out easily. A cookie banner alone does not settle it: what matters is whether the tags wait for the answer. This check looks for tracking that clearly starts before anyone could have said yes.

What LaunchTrust checks

LaunchTrust reads the response and the HTML of your public page.

  • Detected (medium): the page response itself sets a known analytics or advertising cookie, such as _ga, _gid, _gcl_au, _fbp, _ttp, a Hotjar _hj… cookie, Microsoft Clarity's _clck or Microsoft Advertising's _uetsid. These are set before any choice is possible. Cookie values are never stored.
  • Detected (medium): a <script src> tag loads an analytics or advertising tag when the page opens (the Google tag, Meta Pixel, TikTok Pixel, Hotjar, Microsoft Clarity, Microsoft Advertising, LinkedIn Insight, the X pixel, Pinterest, Snap, Reddit, Mixpanel or Segment), and no consent tool was found. For Google's own tags, a Google Consent Mode default that denies analytics and ad storage counts too, when it is set before the Google tag.
  • Detected (low): set-up code for such a tag appears only inline, where it may run inside a consent callback that LaunchTrust cannot evaluate, or only Google Tag Manager loads and no consent tool appears in the page. Consent tools are often loaded through Tag Manager, so check that your tags wait for consent.
  • Not detected: no analytics or advertising tags were found, or they appear together with a consent tool's script, or the only tags are Google tags behind a Consent Mode default that denies both analytics and ad storage.
  • Unable to determine: tags load, but the page builds itself with JavaScript, is larger than the 2 MB LaunchTrust reads, has more hiding style rules than LaunchTrust evaluates, or has inline scripts that cannot be read reliably, so a consent tool added by its scripts cannot be seen in the fetched HTML. The other cases are listed below.

Medium results count as gaps.

What clears tags: the page loads a known consent tool's script (unless the page's Content-Security-Policy blocks it), or, for Google tags only, it sets Google Consent Mode in the form described below.

What gives unable to determine, because LaunchTrust can't tell whether it runs or what it does:

  • inline code that uses a consent tool's API (such as Cookiebot.renew() or window["Cookiebot"].renew()) or loads its script;
  • a known consent banner element;
  • a consent tool's name anywhere in an inline script that also contains a regular expression, a division or a template literal, even in a comment or a string, because a misread could hide a call;
  • Google consent code in any form other than the one below (an optional call such as gtag?.(…) or window["gtag"](…) included), and a default that something else on the page could change: any gtag('consent', 'update', …), a let or const dataLayer, a later reset of dataLayer, or gtag used other than as a call (assigned, aliased, apply or call);
  • a page Content-Security-Policy too complex for LaunchTrust to evaluate;
  • a response that sets more than 1,000 cookies, when the result would otherwise be not detected (LaunchTrust reads only the first 1,000).

What does not count:

  • a mention in a comment or a plain string, in a script that has no regular expression, division or template literal;
  • an empty object with the tool's name;
  • a resource hint such as preconnect;
  • code in a nomodule script or one the page's CSP blocks, which never runs;
  • banner wording such as "We use cookies", because a <script src> tag loads whatever the banner says.

A Google Consent Mode default clears Google tags only, and only in the form Google's setup guide gives:

  • the page assigns dataLayer and defines function gtag(){dataLayer.push(arguments);};
  • gtag('consent', 'default', {…}) (or window.gtag(…), self.gtag(…) or globalThis.gtag(…)) is a statement of its own at the top level of an inline script the page's Content-Security-Policy lets run, not inside a function or condition, and not in a module;
  • its object holds only literal values, with no region, and sets both analytics_storage and ad_storage to denied (spreads of literal objects are merged, and a later key wins);
  • it comes before the Google tag and its config command, as Google's setup guide requires.

A readable default that does not deny both, or that comes after the Google tag, gates nothing, so the tags count. A method of another object named gtag, such as logger.gtag(…), does not reach Google.

A tag the page's own Content-Security-Policy blocks never loads, so it is not counted. A cookie that browsers refuse to store, such as one with SameSite=None but no Secure, is never set, so it is not counted either. A tracking cookie for a parent domain may or may not be stored (Public Suffix List), so it gives unable to determine instead of a result.

LaunchTrust does not click your banner, so a consent tool on the page means no flag, not proof that every tag waits for consent.

Why it matters

  • Consent comes first. The EU's ePrivacy rules require consent before non-essential information is stored on or read from a device. The UK's PECR does too, with narrow exemptions since 5 February 2026, for example for cookies used only for statistics to improve a service.
  • Regulators check this. Data protection authorities treat analytics and advertising cookies as non-essential, and cookies set before consent are a common finding.
  • It is fixable without losing measurement. Consent Mode and cookieless analytics let you keep basic statistics while respecting a "no".

A concrete example

Reported as detected (medium): the Google tag loads with the page, and nothing on the page asks first.

<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>
<script>gtag('config', 'G-XXXX');</script>

Adding a consent tool that blocks the tag until consent, or a Consent Mode default of denied placed above the Google tag, changes the result to not detected.

How to address it

  1. Add a consent tool that blocks tags until consent, and load it before your analytics and advertising tags.
  2. Set Google Consent Mode defaults to denied if you use Google tags, in a script above the Google tag: gtag('consent', 'default', { ad_storage: 'denied', analytics_storage: 'denied' }). Consent Mode does not gate other vendors' tags, such as the Meta Pixel.
  3. Stop server-side tracking cookies in the first response; set them only after consent.
  4. Test in a private window: open the page, do not touch the banner, and confirm no tracking cookies appear in developer tools.

Monthly check and monitoring scope

List your app for free and LaunchTrust runs all 38 website detectors on its public website once a month, then emails you how many gaps it found. Which gaps they are, the evidence and how to close them come with paid monitoring or a one-time Launch Audit.

Paid monitoring runs all 40 detectors (38 for websites and 2 for App Store and Google Play listings) and shows each finding with its evidence. Each monitored web app is re-scanned about every 24 hours (with ±6 hours of jitter); email alerts and an optional JSON webhook POST report new gaps.

FAQ

I load my consent tool through Google Tag Manager. Why is that flagged as low? LaunchTrust cannot see inside a Tag Manager container. The low note is a prompt to confirm that your tags have consent triggers.

Does this apply to visitors outside the EU and UK? The consent-first rule comes from EU and UK law, and the UK now exempts some analytics-only cookies. US state laws mostly use opt-outs instead; see the Do Not Sell or Share check.

Does a consent banner on the page mean I am fine? Not necessarily. The banner must actually stop tags until consent. LaunchTrust reports what it can observe, not a verdict.

Compliance aid, not legal advice. LaunchTrust reports signals, not a verdict or certification.