26 Language Packs
Including German, English, French, Italian, Spanish,
Dutch, Polish, Turkish, Czech, Swedish, and
more. Auto-detection via <html lang>.
Features
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
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
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.
A one-time startRecorder() call at your app's init point.
Every new tracker is classified automatically (local + service DB lookup).
recorder.exportConfig() returns a ready-to-use service configuration for production.
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
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.
// 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
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.
Region Engine
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.
resolveRegime (e.g. DE → optIn,
US-CA → optOut)region,
regimeDefault, regimes for custom UI// 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
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
Including German, English, French, Italian, Spanish,
Dutch, Polish, Turkish, Czech, Swedish, and
more. Auto-detection via <html lang>.
Blocked YouTube, Vimeo, or Maps embeds automatically get a themed inline notice. Granting happens per service without the whole modal popping up again.
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.
“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.
Custom elements (<simplecmp-banner>,
<simplecmp-modal>) with Shadow DOM. Optionally
Light DOM for deep CSS customization.
Respects Sec-GPC (Global Privacy Control) and the
DNT header signal. Configurable behavior: auto-decline,
hide banner, or explicit confirmation.
Out-of-the-box CSS for Bootstrap 5, Tailwind v4, Bulma, and Pico. Token-based remaps to the respective framework variables — no override mess.
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.
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.
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).
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.
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.
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.
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).
When someone withdraws consent, the data goes too: cookies
are deleted on the current and parent domain,
along with associated localStorage entries.
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.
The interactive demo shows banner, modal, and recorder together — no installation required.