Martech Zone AppsMartech Zone Query Tools

Cookie Consent Scanner: Find Pre-Consent Cookies, Trackers, and CMP Gaps

A cookie banner that appears after the page has already set advertising and analytics cookies is not consent. Privacy regulators, browser makers, and advertising platforms now expect non-essential cookies and tags to wait until the visitor makes a choice. The first HTTP response and the initial HTML are where those leaks usually start: Set-Cookie headers on the landing request, scripts and pixels in the first document, and missing CMP or Consent Mode defaults.

This free scanner fetches a public URL, reads every Set-Cookie header (including redirect hops), and inspects the first HTML response for consent platforms, Google Consent Mode v2, and well-known marketing tags. You get a Cookie Consent Readiness Score from 0 to 100 (grades A through F), categorized findings, and plain-language fixes you can hand to your developers or CMP owner.

Cookie Consent Scanner v1.0.2Last Update: Nov 29, 2026

Enter a website, then click Scan. We fetch the first HTTP response, read every Set-Cookie header (including redirect hops), and inspect the HTML for consent platforms, Consent Mode signals, and trackers that appear to load before a choice is made.

Required — A full URL such as https://example.com or a hostname such as example.com. Private, loopback, and link-local addresses are blocked.

This is a fast HTTP and HTML pre-consent scan. It detects HTTP Set-Cookie headers, CMP scripts, Consent Mode signals, and static or inline tracker loaders. Cookies or tags injected later by JavaScript need a headless-browser audit.

Was this helpful?

Enter a public website such as example.com (the field defaults to HTTPS). The scanner follows up to five redirects, classifies each cookie, and flags trackers that appear to load immediately versus those gated behind CMP attributes. If the site blocks the direct request, it automatically retries through Bright Data Web Unlocker and notes that fallback in the report. This is a fast HTTP and HTML pre-consent scan: cookies or tags injected later by JavaScript still need a headless-browser audit.

A pre-consent cookie is any Set-Cookie header sent before the visitor has accepted the relevant category. Session and security cookies (a PHP session, a CSRF token, a Cloudflare challenge cookie, or the CMP’s own consent cookie) are typically essential or strictly necessary. Analytics identifiers such as _ga and _clck, and advertising identifiers such as _fbp, _ttp, or _gcl_au, are not. Those belong behind consent in most GDPR, CCPA, and ePrivacy implementations.

The same rule applies to tags in the first HTML. A GTM container, a GA4 snippet, a Meta Pixel, or a LinkedIn, TikTok, or Microsoft tag that loads with a normal script src will execute as soon as the browser parses the document. A tag marked type="text/plain" or annotated with data-cookieconsent, data-category, or an equivalent CMP attribute does not run until the CMP upgrades it after a choice. This scanner treats that distinction as gated versus ungated.

Under the GDPR and the ePrivacy rules that sit beside it, storing or reading non-essential cookies generally requires a prior, informed choice. CCPA and similar US state laws add sale, share, and opt-out expectations, including honor for Global Privacy Control. A banner that only paints a notice while pixels fire in the background does not meet those duties, and it also breaks the measurement contracts platforms now enforce.

Google Consent Mode v2 is the signal that tells Google tags whether ad_storage, analytics_storage, ad_user_data, and ad_personalization are granted or denied. Those defaults must be set to denied in a snippet that runs before GTM or gtag load, then updated when the visitor chooses. Meta, TikTok, and Microsoft have their own consent commands. A consent management platform is the usual place to collect the choice, block tags, and fire those updates. For a broader view of how this sits in your stack, see how to build a privacy-conscious marketing data stack.

How to Interpret the Scan Report

The Cookie Consent Readiness Score starts at 100 and deducts for pre-consent advertising and analytics cookies, ungated marketing tags, a missing CMP when a leak is present, Google tags without denied Consent Mode defaults, and missing policy or privacy-header signals. Grades run from A (90 or above) to F (below 60). Use the findings list first; the tables underneath explain each cookie, tag, and header in more detail.

  • Pre-consent cookies. Each Set-Cookie value is classified as essential, analytics, advertising, or unknown, with Secure, HttpOnly, SameSite, and session versus persistent flags. Unknown cookies are a warning to document or block, not automatic proof of a leak.
  • CMP and Consent Mode. The scanner looks for major platforms (including OneTrust, Cookiebot, CookieYes, Complianz, Borlabs, Termly, iubenda, Osano, TrustArc, Didomi, Quantcast Choice, Usercentrics, Ketch, Consentmanager, Klaro, and Cookie Notice) and for gtag consent defaults plus Meta, TikTok, and Microsoft consent signals.
  • Trackers in the initial HTML. Scripts, inline loaders, pixels, iframes, and preconnect hints are matched against known analytics, advertising, and marketing hosts. Gated tags pass; ungated tags fail.
  • Privacy and compliance signals. The report checks for Privacy Policy and Cookie Policy links, Referrer-Policy, Permissions-Policy, and a /.well-known/gpc.json advertisement of GPC support.

Most failing scans come down to the same handful of implementation mistakes. Fix them in this order and rerun the scan to confirm the first response is clean.

  • Stop setting marketing cookies on the first response. Advertising and analytics identifiers should not appear in Set-Cookie on the landing request or its redirects. Let the CMP or tag manager write them only after the matching category is accepted.
  • Gate marketing tags in the initial HTML. Load non-essential scripts with type="text/plain" and the CMP’s category attribute (data-cookieconsent, data-category, optanon-category, or the equivalent). Do not drop a live GTM, GA4, or ad pixel into the document head unconditionally.
  • Set Google Consent Mode v2 defaults to denied first. Place the default command ahead of gtag or GTM, including ad_storage, analytics_storage, ad_user_data, and ad_personalization. Update those values when the visitor accepts. Add the matching consent commands if you also load Meta, TikTok, or Microsoft tags.
  • Install and actually enforce a CMP. A banner that only displays a message is not enough. Confirm the platform is blocking cookies and tags on first load, not merely recording a later click. Keep crawlable Privacy Policy and Cookie Policy links in the footer and in the banner.
  • Send privacy headers and honor GPC. Add Referrer-Policy (for example strict-origin-when-cross-origin) and a Permissions-Policy that disables unused browser features. Publish /.well-known/gpc.json and respect the Sec-GPC request header where sale or sharing opt-out laws apply.

Key Takeaways

  • Non-essential cookies and marketing tags should not fire in the first HTTP response or the initial HTML, before the visitor has made a choice.
  • A CMP plus Google Consent Mode v2 defaults set to denied are the standard way to collect consent and keep GA4, GTM, and ads tags from running early.
  • Use the Cookie Consent Scanner to score the first response, then fix ungated tags, pre-consent advertising or analytics cookies, and missing policy or privacy-header signals.
  • This scan is a fast HTTP and HTML check. Dynamically injected JavaScript cookies still require a headless-browser audit after you clean the first response.

Frequently Asked Questions

What Does This Scanner Actually Check?

It reads every Set-Cookie header on the first request and its redirects, classifies those cookies, detects well-known consent management platforms and Google Consent Mode v2 defaults, and flags marketing, analytics, and advertising tags in the initial HTML as gated or ungated. It also looks for Privacy Policy and Cookie Policy links, Referrer-Policy, Permissions-Policy, and a /.well-known/gpc.json file.

Why Don’t Dynamically Injected Cookies Appear in the Report?

This is a fast HTTP and HTML pre-consent scan. Cookies or tags injected later by JavaScript, after the first document has loaded, are not executed here and need a headless-browser audit. Cleaning the first response is still the right first step, because that is where most pre-consent leaks start.

What Should I Do If Advertising Cookies Are Set Before Consent?

Stop writing those cookies on the landing response or its redirects. Hold advertising and analytics identifiers until the visitor accepts the matching category in your CMP, and gate the tags that would otherwise set them. Then rerun the scanner to confirm the first response is clean.

How Does Google Consent Mode v2 Fit In?

If the page loads Google Analytics, Google Tag Manager, or Google Ads, the first response should include a gtag consent default command that sets ad_storage, analytics_storage, ad_user_data, and ad_personalization to denied before those tags run. The CMP should update those signals when the visitor chooses. Missing or pre-granted defaults lower the readiness score.

What Happens If a Site Blocks the Scan?

If the origin returns an HTTP 403, 429, or a bot-challenge page, the scanner automatically retries through Bright Data Web Unlocker after confirming the URL is a public website. A successful fallback is labeled in the report. If the fallback is not configured or also fails, you see a plain notice rather than an application error, because that is the site’s security setting.

Related Articles