---
title: "What is CookieBeam"
description: "A technical overview of CookieBeam's architecture, from the browser runtime and script blocking to the scanner, dashboard, and compliance integrations."
url: "https://cookiebeam.com/docs/concepts/overview"
lang: "en"
last_updated: "2026-11-25"
---

# What is CookieBeam

A technical overview of CookieBeam's architecture, from the browser runtime and script blocking to the scanner, dashboard, and compliance integrations.

CookieBeam is a consent management platform (CMP). It shows a consent banner on your website, blocks scripts and cookies until the visitor makes a choice, records that choice, and feeds it to the integrations your analytics and ad stack expect. The entire runtime runs in the browser. Your server never needs to talk to CookieBeam's servers for the banner to work.

## The runtime

The banner is a JavaScript bundle hosted on CookieBeam's CDN. You load it with a single script tag:

```html
<script src="https://cdn.cookiebeam.com/banner/PUBLIC_BANNER_ID/default/loader.js" data-cfasync="false" data-no-optimize="1" data-no-defer="1" data-no-minify="1" data-noptimize="1" nowprocket="1" data-pagespeed-no-defer="1"></script>
```

The loader fetches the banner configuration (your categories, translations, regional rules, and appearance settings) and the core runtime. Together they render the consent modal, enforce blocking, and persist the visitor's choice in a cookie.

The tag must be synchronous and first in `<head>`. It needs to run before any script it might block. See [Install the script tag](https://cookiebeam.com/docs/install/script-tag) for the details.

## What it does on a page

On a page load, the runtime:

1. Reads the consent cookie, if one exists from a previous visit.
2. Checks the visitor's location against your [regional rules](https://cookiebeam.com/docs/concepts/regions-and-regimes) and picks the consent model (opt-in, opt-out, or notice).
3. Shows or hides the banner based on the model and the visitor's existing choice.
4. Blocks scripts and iframes that belong to non-consented [categories](https://cookiebeam.com/docs/concepts/categories-services-purposes) by rewriting their `type` or `src` attributes. When the visitor consents, it restores them.
5. Writes the [consent record](https://cookiebeam.com/docs/concepts/consent-record) to a first-party cookie on your domain.
6. Fires [Google Consent Mode v2](https://cookiebeam.com/docs/concepts/consent-mode-v2) signals so Google tags respect the choice without extra code.
7. If IAB frameworks are enabled, builds and exposes the [TC string](https://cookiebeam.com/docs/integrations/iab-tcf) and [GPP string](https://cookiebeam.com/docs/integrations/gpp) through the standard APIs that ad-tech vendors call.

None of this requires your server to participate. Your server can read the consent cookie if it needs to gate server-rendered content (see [Read consent on your server](https://cookiebeam.com/docs/install/server-side)), but the banner itself is self-contained.

## Consent models

CookieBeam supports three consent models. You pick one globally and override it per region with regional rules.

| Model | Behavior | Typical use |
| --- | --- | --- |
| **Opt-in** | Optional categories start blocked. The visitor must actively accept before scripts in those categories run. | GDPR, UK GDPR, LGPD, PIPEDA |
| **Opt-out** | Categories marked `enabled` start granted and their scripts run immediately. The visitor can opt out to revoke them. | US state privacy laws (CCPA, CPA, CTDPA, etc.) |
| **Notice** | All categories are active. The banner informs the visitor but doesn't gate anything. | Jurisdictions with no blocking requirement |

Each model changes the banner's buttons, the default state of categories, and what the runtime writes to the consent cookie. See [Consent model](https://cookiebeam.com/docs/concepts/consent-model) for the full picture.

## Categories

Every script, cookie, and connection on your site belongs to a category. The defaults are `necessary`, `analytics`, `marketing`, and `preferences`. You can rename them, add your own, or remove the ones you don't use.

A category can be:

- **Read-only** (`readOnly: true`): always on, the visitor can't toggle it. `necessary` is read-only by default.
- **Enabled by default** (`enabled: true`): pre-checked in opt-out mode. Ignored in opt-in mode, where everything starts unchecked.

Categories can contain **services**, named toggles within a category for individual vendors (for example, Google Analytics inside the `analytics` category). The visitor can accept or reject services independently if you enable per-service consent.

Categories are also the unit of [script blocking](https://cookiebeam.com/docs/configure/blocking). To gate a script by category, mark it with `type="text/plain"` and `data-src` so the browser doesn't fetch it before the runtime can intercept. See [Categories, services, and purposes](https://cookiebeam.com/docs/concepts/categories-services-purposes) and the [blocking guide](https://cookiebeam.com/docs/configure/blocking) for the full pattern.

## Regional rules

A regional rule matches visitors by country or country subdivision and overrides the consent model, default categories, consent lifetime, button layout, privacy signal behavior, and banner text for that region.

CookieBeam ships framework presets for GDPR, CCPA/CPRA, US opt-out states, LGPD, PIPEDA, and UK GDPR. Each preset sets the consent model, the required buttons, and the recommended defaults. You can customize any preset or write your own rules from scratch.

A rule that names the visitor's subdivision always wins over a country-only rule. Priority (higher number wins, then list order) only breaks ties within each group. A separate fallback applies when no rule matches. See [Regions and regimes](https://cookiebeam.com/docs/concepts/regions-and-regimes).

## The scanner

CookieBeam's scanner visits your site in a headless browser and records every cookie, script, and network connection the page makes. It classifies each one by vendor and category using URL patterns, inline content matching, and a database of known trackers.

The scanner runs on demand or on a schedule. Its results populate the [blocking inventory](https://cookiebeam.com/docs/configure/blocking) in the dashboard, where you can review, reclassify, or approve each item. After a scan, you can auto-generate blocking rules for everything the scanner found.

The scanner also powers **drift detection**: the CDN script monitors the live site for new scripts and connections that weren't in the last scan and reports them back for triage.

## The dashboard

The dashboard is the web application at cookiebeam.com where you:

- Create and configure banners (categories, appearance, translations, regional rules, integrations).
- Run and review scans.
- Publish banners to the CDN. Publishing generates the script bundle visitors load.
- View consent analytics: opt-in rates, category breakdowns, regional trends.
- Manage team members and their [permissions](https://cookiebeam.com/docs/account/team-and-roles) (viewer, editor, publisher, admin, owner).
- Configure [environments](https://cookiebeam.com/docs/operations/environments-and-publishing) (dev, staging, production) so you can test changes before they go live.

Every banner has a public ID. That ID appears in the loader URL and identifies which configuration the CDN serves.

## Integrations

### Google Consent Mode v2

CookieBeam maps your categories to Google's seven consent signals (`ad_storage`, `ad_user_data`, `ad_personalization`, `analytics_storage`, `functionality_storage`, `personalization_storage`, `security_storage`). It fires `gtag('consent', 'default', ...)` at page load and `gtag('consent', 'update', ...)` when the visitor chooses. Google tags and GTM templates read these signals natively. See [Consent Mode v2](https://cookiebeam.com/docs/concepts/consent-mode-v2).

### Google Tag Manager

CookieBeam pushes consent events to the GTM `dataLayer` so your triggers and tags can react to consent changes without custom code.

### IAB TCF 2.3

CookieBeam is a registered CMP (ID 526) for the IAB Transparency and Consent Framework. When TCF is enabled, the banner loads the Global Vendor List, builds a TC string encoding purpose and vendor consent, and exposes the `__tcfapi` stub that ad-tech vendors call. See [IAB TCF](https://cookiebeam.com/docs/integrations/iab-tcf).

### IAB GPP

The Global Privacy Platform encodes multi-jurisdiction signals in a single string. CookieBeam supports the US national section, US state sections (California, Virginia, Colorado, Connecticut, Utah, and others), and the TCF EU v2 section. See [IAB GPP](https://cookiebeam.com/docs/integrations/gpp).

### Privacy signals

The runtime reads `navigator.globalPrivacyControl` (Global Privacy Control) and, optionally, `navigator.doNotTrack`. When a signal is detected, CookieBeam can hard-opt-out categories, pre-deselect them, or show a status notice confirming the signal was processed. See [Privacy signals](https://cookiebeam.com/docs/configure/privacy-signals).

## Hosting and delivery

Published banners are served from `cdn.cookiebeam.com`. The CDN path is:

```
cdn.cookiebeam.com/banner/{BANNER_ID}/default/loader.js
```

If you use [environments](https://cookiebeam.com/docs/operations/environments-and-publishing), each environment has its own path:

```
cdn.cookiebeam.com/banner/{BANNER_ID}/env/{slug}/loader.js
```

The `default/` path always points to the production environment. The loader is a small script that fetches the full banner bundle, which includes your configuration, translations, and the core runtime.

Translations that aren't inlined in the bundle are fetched on demand from the CDN when the visitor's detected language needs them.

## The consent record

The visitor's choice is stored in a first-party cookie on your domain (default name: `cb_cookie`). The cookie holds a JSON object with the accepted categories, timestamps, the banner revision, a [consent identifier](https://cookiebeam.com/docs/configure/consent-id) and metadata about how the choice was collected.

Your server, your client-side code, and CookieBeam's own runtime all read the same cookie. The [Browser API](https://cookiebeam.com/docs/api-reference/browser-api) provides methods like `acceptedCategory('analytics')` and events like `cookiebeam:consentUpdate` for client-side checks. For server-side reading, see [Read consent on your server](https://cookiebeam.com/docs/install/server-side).

The consent record's schema is stable. See [Consent record](https://cookiebeam.com/docs/concepts/consent-record) for the field-by-field reference.

## What's next

If you're setting up CookieBeam for the first time, start with [Getting started](https://cookiebeam.com/docs/getting-started/quickstart). If you're here to understand a specific concept before configuring it, the rest of this section covers each one:

- [Consent model](https://cookiebeam.com/docs/concepts/consent-model): opt-in, opt-out, and notice in detail
- [Categories, services, and purposes](https://cookiebeam.com/docs/concepts/categories-services-purposes): the building blocks of consent
- [What the scanner finds](https://cookiebeam.com/docs/concepts/what-the-scanner-finds): cookies, scripts, and connections
- [Regions and regimes](https://cookiebeam.com/docs/concepts/regions-and-regimes): adapting the banner per jurisdiction
- [Consent record](https://cookiebeam.com/docs/concepts/consent-record): what the cookie stores and how to read it
- [Privacy signals](https://cookiebeam.com/docs/configure/privacy-signals): GPC and DNT
- [Consent Mode v2](https://cookiebeam.com/docs/concepts/consent-mode-v2): Google's consent signal protocol
- [IAB TCF](https://cookiebeam.com/docs/integrations/iab-tcf): the Transparency and Consent Framework
- [IAB GPP](https://cookiebeam.com/docs/integrations/gpp): the Global Privacy Platform
