Skip to documentation content

What the scanner finds

How the scanner detects cookies, scripts, and outbound connections on your site, classifies them into consent categories, and tracks changes between scans.

Last updated:

The scanner loads your pages in a headless browser, records every cookie, script, and outbound connection the page produces, and classifies each one into a consent category. You review the results in the inventory, decide which items belong to which category, and publish. After that, the banner's blocking engine enforces those decisions for every visitor.

When the scanner runs

You can start a scan from the dashboard at any time. Each scan visits the pages you've configured and records what it finds. Scheduled scans run automatically at the interval you set under scanner settings; their results feed the triage digest your team receives by email.

The scanner runs in a cloud environment, not in a visitor's browser. It sees the page as a new, cookieless visitor would: no stored consent, no logged-in session, no cached state. That means it captures what happens on a first visit before the banner has shown.

Cookies

The scanner records every cookie the page sets during the load, including cookies set by third-party scripts.

For each cookie it captures:

  • Name and value (truncated for large values)
  • Domain and path
  • First-party or third-party: a cookie whose domain matches the page's host is first-party; everything else is third-party
  • Expiry: session cookies vs persistent, and how long persistent ones last
  • Secure, HttpOnly, and SameSite flags

The scanner runs in two phases. First it records what loads before any consent choice (the pre-consent phase). Then it locates and clicks an accept control on the banner, and records the cookies, scripts, and connections that appear afterward (the post-consent phase). Each detected item carries a phase marker so you can see what runs before versus after consent.

Scripts

The scanner records external scripts (loaded by URL) and inline scripts (written directly in the HTML or injected by other scripts at runtime).

External scripts are identified by their URL. The classifier matches the domain and path against known patterns: googletagmanager.com/gtm.js is Google Tag Manager, connect.facebook.net/en_US/fbevents.js is Meta Pixel, and so on.

Inline scripts have no URL to match on. Instead, the classifier examines their content against a library of vendor patterns. It recognizes patterns for services like Google Tag Manager, Meta Pixel, Hotjar, Google Analytics, and dozens more. Framework artifacts (Next.js hydration data, JSON-LD structured data, Nuxt/Vue/Gatsby SSR payloads) are filtered out before they reach the inventory, since they're part of your application, not tracking scripts.

Inline scripts that load on the same domain as the page are recorded with that domain as their source, which lets the classifier flag same-site scripts as necessary when appropriate.

Connections

The scanner captures every outbound HTTP request the page makes: API calls, pixel fires, beacon requests, font and image loads from external domains. These show where your page sends data, even when no cookie is involved.

Connections are classified with the same pipeline as scripts: domain matching, path heuristics, and database lookup. A page that fires https://www.google-analytics.com/collect on load is sending analytics data before consent, regardless of whether a cookie was set.

How items are classified

Every detected item goes through a multi-layer classification pipeline:

  1. URL and domain matching. Exact domain matches and regex patterns map known hosts to categories. Path-based heuristics handle services that serve different functions from the same domain.

  2. Inline content matching. For scripts the URL classifier can't identify (or identifies as necessary with no vendor), content pattern matching checks the script body against known vendor signatures.

  3. Database lookup. Items that survive the first two layers are checked against an external database that combines the Open Cookie Database, AI-assisted classifications, and manual overrides you've added. Manual overrides have the highest priority.

  4. Source grouping. A presentation layer groups classified items by their source for the inventory UI: WordPress plugins and themes are detected and labeled, vendors are named, and a known-sources dictionary maps domains to human-readable names.

The pipeline assigns one of your banner's categories to each item: necessary, analytics, marketing, preferences, or unknown if it can't determine the right bucket. Items classified as unknown appear in your inventory for manual review.

Classification is a starting point, not a verdict. You should review the results, especially anything marked unknown, and reclassify items that the automated pipeline got wrong. Your manual overrides persist across future scans.

Drift detection

The scanner captures a snapshot at a point in time. Your site changes between scans: new scripts get added, vendors update their tags, marketing tools rotate their pixels. Drift detection fills the gap.

The CookieBeam runtime, running in every visitor's browser, wraps the browser's network APIs (fetch(), XMLHttpRequest.open(), and navigator.sendBeacon()) and watches for scripts and connections that weren't in the last scan. When it finds one, it sends a drift report back to CookieBeam.

After 5 reports of the same item from at least 3 distinct networks, the item is auto-promoted into your inventory as a new detection. This catches changes that happen between scheduled scans without waiting for the next full scan to run.

Drift detection covers scripts, connections, and cookies.

What to do with the results

After a scan completes, open the inventory in the dashboard. You'll see three tabs: cookies, scripts, and connections.

Review unknown items first. These are items the classifier couldn't categorize. Assign them to the right category based on what they do: an analytics pixel goes in analytics, a retargeting tag goes in marketing, your own application scripts go in necessary.

Check the necessary items. The classifier is conservative with necessary (it only assigns it to items it's confident about) but verify that nothing slipped through that should require consent.

Look at connections alongside scripts. A script classified as analytics might make connections to advertising endpoints. The connection tab shows you the full picture of where data flows.

Update your blocking rules. Items in non-necessary categories should be blocked until the visitor consents. See Blocking for how automatic and manual blocking work. If you add a new category, make sure scanner items are classified into it; see Categories and purposes.

Scan after changes. Run a new scan whenever you add scripts to your site, update a tag manager container, or change your page structure. The sooner you scan, the sooner new items show up in your inventory for review, and the sooner drift detection has a fresh baseline.