← Run an audit
Home / Checks / 8 of 11
medium severity

Cookie consent banner present

A consent banner that fires before tags is the practical prerequisite for Consent Mode. Its absence usually means tags load before any choice is made.

Why this matters

A consent banner that fires before tags is the practical prerequisite for Consent Mode. Its absence usually means tags load before any choice is made.

How this tool detects it

The tool looks for the signature of known consent management platforms, covering OneTrust (including cdn.cookielaw.org and OptanonWrapper), Cookiebot, CookieConsent, Iubenda, Termly, Didomi, Usercentrics and Klaro.

It checks both brand-name strings and runtime variables, because some deployments load only a minified script where the original brand string never appears.

This check is read together with the Consent Mode rule. Finding consent signals with no CMP signature usually means the signals are hard-coded — which is a compliance risk, because you cannot demonstrate that they reflect a real user choice.

Where this check can mislead you

Static analysis has limits. These are the cases where this particular check will report a result that does not match reality — worth knowing before you act on it.

Examples

CorrectCorrect: OneTrust loads before every tag
<script src="https://cdn.cookielaw.org/scripttemplates/otBannerSdk.js"
        type="text/javascript" charset="UTF-8"></script>
<script async src="https://www.googletagmanager.com/gtm.js?id=GTM-ABC123"></script>

The CMP has to load first so it can intercept and set consent state before any tag fires.

WrongSubtle case: CMP loads after the tags it is supposed to gate
<script async src="https://www.googletagmanager.com/gtm.js?id=GTM-ABC"></script>
<!-- CMP queued after GTM — too late to matter -->
<script src="https://cdn.cookielaw.org/scripttemplates/otBannerSdk.js"></script>

GTM loads and fires tags early in the page lifecycle. When the CMP is queued behind it, data has already left before the visitor makes a choice.

How to fix it

  1. If you have no CMP, add one. Mainstream platforms (OneTrust, Cookiebot) handle the IAB TCF 2.3 framework requirements for you, which is far easier than hand-rolling.
  2. Make sure the CMP loads before every tracking tag. Get the order wrong and the consent state never takes effect in time.
  3. Configure the CMP's category mapping so advertising tags are bound to the right consent signals.
  4. Verify by clicking accept and then reject, and confirm the consent parameters in GA4 DebugView change accordingly.
  5. Check that the CMP genuinely blocks tags when consent is refused, rather than only reading the user's choice.

Verify it worked

After making changes, confirm delivery rather than assuming. These steps require your Google login, which is exactly why this tool stops short of them.

Related checks

One thing static analysis cannot tell you: this page reads published code, so it shows what is installed, never what actually fires. To confirm delivery, use GTM Preview and GA4 DebugView — both require your Google login.

Check whether your site has this problem — no login required.