Features

Everything you need — and nothing beyond that.

SimpleCMP consists of four clearly separated components: engine, recorder, service DB client, CMS bridge. You use only what you need — and replace any part with your own implementation when necessary.

Engine

UI-free state machine.

The engine tracks consent state per service, the event bus, storage in localStorage / cookie, language resolution, and click-to-enable logic. Completely without DOM assumptions.

If you only need the state machine — for example, to render your own banner in a Vue, React, or Svelte SPA — import directly from simplecmp/engine. The bundle is significantly smaller than the full package with Lit UI.

// Vue 3 SFC
import { getManager, addEventListener }
  from 'simplecmp/engine';

const manager = getManager({
  storageName: 'simplecmp-app',
  services: [...]
});

addEventListener('saveConsents',
  (consents) => console.log(consents)
);

manager.updateConsent('ga', true);
manager.saveConsents();

Recorder

Auto-detection instead of manual cataloging.

The recorder watches three sources simultaneously: cookies being set via document.cookie, insertion of <script>, <iframe>, <img>, and <link> tags (MutationObserver), and outgoing connections via the PerformanceObserver API.

  1. Enable in the dev build

    A one-time startRecorder() call at your app's init point.

  2. Click through the site normally

    Every new tracker is classified automatically (local + service DB lookup).

  3. Export config

    recorder.exportConfig() returns a ready-to-use service configuration for production.

  4. Guard CI

    assertNoUnknown() fails the build if an uncataloged tracker appears.

$ pnpm dev
[recorder] watching cookies, scripts, requests…
[recorder] known: _ga         (Google Analytics)
[recorder] known: _gid        (Google Analytics)
[recorder] UNKNOWN: _fbp     .example.com
[recorder] UNKNOWN: req      connect.facebook.net
[recorder] classified via service-db: meta-pixel
[recorder] ✓ no unclassified detections

// recorder.exportConfig() →
{
  services: [
    { name: 'google-analytics', cookies: [/^_ga/, '_gid'] },
    { name: 'meta-pixel', cookies: ['_fbp'], hosts: ['connect.facebook.net'] }
  ]
}

Service DB

An open registry — no vendor lock-in.

The service DB speaks a simple HTTP/JSON protocol. For every unknown identifier (cookie, host, script URL), the client sends a query and receives — if known — the classification: service name, purpose tags, standard texts in 26 languages, default privacy policy.

Stale-while-revalidate caching keeps the UX fast; a local classifier fallback kicks in on network errors. CMS plugins (such as the TYPO3 extension) ship their own implementation of the protocol, so classifications can be curated even without an external dependency.

360+ Services PHP+SQLite reference Community PRs
// GET https://library.simplecmp.eu/v1/lookup
//     ?kind=cookie&identifier=_ga

{
  "hit": true,
  "service": {
    "name": "google-analytics",
    "title": "Google Analytics",
    "purposes": ["analytics"],
    "cookies": ["/^_ga/", "_gid"],
    "hosts": [
      "www.google-analytics.com",
      "analytics.google.com"
    ],
    "privacyPolicy":
      "https://policies.google.com/privacy",
    "translations": { /* 26 languages */ }
  },
  "cache_until": "2026-05-26T00:00:00Z"
}

CMS Bridge

Detect production drift before it gets expensive.

An A/B test turns on Hotjar. A marketing pixel lands on the landing page via tag manager. An old plugin suddenly sets a new cookie. The CMS bridge reports every one of these drifts.

  • Schema v2: batched detections, status field, bandwidth controls
  • HMAC nonce auth prevents replay attacks
  • Per-identifier dedup with configurable TTL (default 1 h)
  • Sampling rate configurable if traffic is huge
  • Webhook receiver as a Node example in the repo
Browser Recorder erkennt unbekannten Tracker POST /webhook HMAC-signed CMS verifies signature deduplicates DB detections table status: unknown Backend-Modul Redakteur reviewt kategorisiert approve → Service-Library

Region Engine

EU opt-in. California opt-out. One codebase.

GDPR (DSGVO) requires opt-in. CCPA/CPRA requires opt-out plus a “Do Not Sell or Share My Personal Information” link. SimpleCMP detects the visitor's region and automatically switches between both regimes — no custom code, no geo-IP API.

  • Region→regime resolution via resolveRegime (e.g. DE → optIn, US-CA → optOut)
  • Opt-out banner with Do Not Sell trigger instead of accept/decline modal
  • Public API: region, regimeDefault, regimes for custom UI
  • Configurable — region override via config, no vendor geo lock-in
// Region is detected automatically
init({
  region: 'auto', // 'DE' | 'US-CA' | …
  regimes: {
    optIn:  { services: [...] },
    optOut: { services: [...] }
  }
});

// Public API for your own UI:
manager.region;          // 'US-CA'
manager.regimeDefault;   // 'optOut'

// CCPA banner automatically shows:
"Do Not Sell or Share
 My Personal Information"

Audit Engine

Compliance check right in the browser.

Append ?simplecmp_audit=1 to your URL and SimpleCMP runs live in compliance mode: a panel lists every violation against §4 of the legal compliance doc with severity, selector, and fix hint.

The checks are not just static config checks — auditDom() reads the rendered banner and reports weak decline buttons, marketing nudges, missing accessible names, and targets under 44px. This is the engine we use to test our own banner — it is part of the bundle.

$ open https://example.com/?simplecmp_audit=1

[audit] AUDIT-MODE aktiviert
[audit] critical equal-button-styling
   Decline-Button hat geringeren Kontrast als Accept
   selector: button.cn-decline
[audit] warning  weak-decline-copy
   "Ablehnen"-Text zu schwach (heuristisch erkannt)
[audit] warning  marketing-nudge
   Description enthält Werbe-Sprache
[audit] warning  accessible-name-missing
   Floating-Trigger ohne aria-label
[audit] ok       imprint-link-present
[audit] ok       reject-all-equal-prominence
[audit] ok       target-size-44px

More Features

The fine print that matters in practice.

26 Language Packs

Including German, English, French, Italian, Spanish, Dutch, Polish, Turkish, Czech, Swedish, and more. Auto-detection via <html lang>.

Click-to-Enable Embeds

Blocked YouTube, Vimeo, or Maps embeds automatically get a themed inline notice. Granting happens per service without the whole modal popping up again.

Pre-Consent Blocking

Universal blocking via data-name and data-src markers. Scripts and iframes are not loaded at all before consent is given — no race condition risk.

GDPR Default

“Reject all” has equal prominence to “Accept all” — default, not opt-in (BGH Cookie II ruling, DSK 2022). Legal notice link separate from the privacy policy.

Lit-based Web Components

Custom elements (<simplecmp-banner>, <simplecmp-modal>) with Shadow DOM. Optionally Light DOM for deep CSS customization.

Browser Consent Signals

Respects Sec-GPC (Global Privacy Control) and the DNT header signal. Configurable behavior: auto-decline, hide banner, or explicit confirmation.

Theme Adapter

Out-of-the-box CSS for Bootstrap 5, Tailwind v4, Bulma, and Pico. Token-based remaps to the respective framework variables — no override mess.

Consent Mode v2 (Multi-Vendor)

Vendor-aware signals on init and on every save: gtag('consent', …) for Google (GA4/GTM), fbq('consent', …) for Meta Pixel, and uetq.push('consent', …) for Microsoft UET — plus a CSP policy contribution. For Google Tag Manager, the dataLayer event carries status per service and per purpose — exactly one update per saved decision.

Stylesheet Blocking

Optional opt-in (universalBlocking.blockStylesheets): third-party <link rel="stylesheet"> such as Google Fonts is blocked pre-consent with block-and-reinject. Mitigation for the LG Munich I case.

Banner Layout Templates

Token-driven placement: all four corners, bottom bar, or centered modal — one config value is enough. Equal button styling is hard-coded into the template (otherwise the compliance check would turn red).

Informal/Formal Overlay

Per-language tone pack: per locale, an informal.json can override the formal strings — DE, FR, IT, ES, NL started. Marketing sites get “Allow cookies?” without forking the bundled pack.

WCAG 2.2 AA / BFSG

Region landmark, aria-live, focus trap, 44×44 px target size, visible keyboard focus rings. Walked through live on a Shopify dev store with a screen reader. BFSG-relevant for e-commerce starting 06/2025.

Provider Information Modal

GDPR (DSGVO)-compliant three-stage layered disclosure: banner → contextual notice → “More information ›” opens a modal with legal entity, address, privacy URL, opt-out URL, and transfer basis — from the service library.

Host-Qualified Cookie Matchers

Cookies are matched not only by name but also by setting host. Important when the same cookie name is used by different services (see ADR-0010).

Clean Withdrawal

When someone withdraws consent, the data goes too: cookies are deleted on the current and parent domain, along with associated localStorage entries.

Path-Accurate Origin Matchers

Two services can share a host — for example, Google Maps and reCAPTCHA on www.google.com. Path-aware matchers assign each request to the right service, and wildcards in sameOriginHosts are taken into account.

Try it live now.

The interactive demo shows banner, modal, and recorder together — no installation required.