The Cookie Consent Platform
You Actually Own
Maintained for GDPR/UK-GDPR, CCPA/CPRA + US state laws, and LGPD — plus DPDPA and more, supported and in active development.
Admin dashboard, an append-only audit log, and every consent record stays on your own infrastructure. Open source, no monthly fee.
Building it yourself? Jump to the developer docs → or guides →
Just the widget? You still get the full widget.
Most open-source cookie consent tools are frontend-only by design — a script, a banner, done. Run @consenti/ui the same way, with zero backend, and you still get the parts most banner-only tools leave you to hand-roll.
A documented API, not a black box
Every method is typed and documented — open(), close(), getConsent(type?), and friends — so you're never reverse-engineering a minified bundle to find the behavior you need.
Framework-native, not a wrapped script tag
Real React hooks, Vue composables, and Angular services ship as subpath exports — idiomatic in your framework from the first line, not a <script> tag you build a wrapper around.
Your UI reacts, it doesn't poll
A full DOM event lifecycle (consenti:consentSubmitted and friends) fires on every consent change, so custom banners, gates, and analytics stay in sync without checking state on a timer.
Analytics mapped for you
Built-in mappers for Google Consent Mode v2, Meta, Adobe, and Segment translate a consent decision into the right vendor call — no hand-rolled dataLayer plumbing to keep in sync.
Everything you need. Nothing you don't.
Start with just the UI widget — no backend required. Add the backend module only if you need server-side records or an admin dashboard. Both ship zero runtime dependencies.
Framework Agnostic
Any StackBackend Powered
@consenti/apiAdmin Dashboard
IncludedFully Customisable
ThemeableAccessibility-Focused
A11YPrivacy by Design
SecurePlugin System
ExtensibleZero Runtime Dependencies
@consenti/uiMaintained Compliance Coverage
ComplianceAuto-wired — not just a mapping helper
Consenti fires gtag('consent', 'default', …) before any tag loads and gtag('consent', 'update', …) on every consent change — correct GCM keys, configurable dataLayer name, no manual wiring.
Required for Google Ads/Analytics tags to keep working under GDPR once Consent Mode v2 is in effect.
How Consenti implements Consent Mode v2 →Page loads — before any tag fires
gtag('consent', 'default', …)
Visitor chooses (example: analytics only)
gtag('consent', 'update', …)
By default functionality_storage and security_storage are granted and personalization_storage is denied.
Gate your own scripts and SDKs the same way
ConsentScript loads a script only while a parameter is granted and removes it on revoke. ConsentAction calls an SDK's own opt-in / opt-out. Both check consent immediately and re-check on every change.
import { ConsentScript, ConsentAction } from '@consenti/ui'
// Load a script only while analytics_storage is granted
new ConsentScript({
cookieId: 'analytics_storage',
widget,
src: 'https://cdn.example.com/analytics.js',
})
// Or call an SDK's own opt-in / opt-out
new ConsentAction({
id: 'analytics_storage',
widget,
onGrant: () => analyticsSdk.optIn(),
onDeny: () => analyticsSdk.optOut(),
})Built different from every other CMP
Most hosted SaaS CMPs own your consent data and charge monthly. Most open-source alternatives are UI-only — no backend, no audit log. Consenti ships the full stack instead.
What is Consenti, and why is it built this way? →No SaaS fees — ever
Your data, your servers
Privacy by design, not by checkbox
190+ countries mapped to 8 consent UX groups
Extend it without forking it
The browser-only category's ceiling
| SaaS / Hosted | Open Source | ||||||
|---|---|---|---|---|---|---|---|
| Feature | ConsentiOpen Source | Cookiebot | OneTrust | Cassie | Klaro | orestbida | ConsentStack |
| Open source | |||||||
| Self-hosted | paid | paid | |||||
| Zero runtime deps | |||||||
| Built-in backend + audit log | paid | ||||||
| Admin dashboard | |||||||
| GDPR + CCPA + TCF v2.3 | TCF partial | partial | partial | partial | |||
| GPC auto-honour | paid | unclear | unclear | ||||
| TypeScript strict | partial | ||||||
| Framework hooks (React / Vue / Ng) | |||||||
| WCAG 2.x AA accessible | unclear | unclear | unclear | partial | unclear | unclear | |
| No cross-origin script | frontend only | frontend only | frontend only | ||||
| Data sovereignty | paid | paid | frontend only | frontend only | frontend only | ||
| Free to use | limited | frontend only | frontend only | frontend only | |||
Quick Start
npm install @consenti/ui
import { ConsentiSetup } from '@consenti/ui'
// Auto-detects compliance from browser locale — GDPR, CCPA, etc.
new ConsentiSetup({})const widget = new ConsentiSetup({})
widget.onReady(() => {
if (widget.isCookieGranted('analytics')) initAnalytics()
})Compliance Coverage
Compliance groups routed automatically — see what's actively maintained vs. still evolving below.
"Do Not Sell" link, GPC auto-honour, CPRA corrections, opt-out records
Auto-detects navigator.globalPrivacyControl with three honour modes
Only relevant if you monetize via programmatic/RTB ads — self-registration with IAB Europe/MSPA fully supported. Real binary encoding available via optional peer dependencies; simplified format otherwise
Opt-in, fiduciary disclosure, grievance officer in notice, Inline with India's phased 2025–2027 rules/compliance rollout
Opt-in for sensitive data and foreign transfers; opt-out for general third-party sharing
Full = actively maintained, tracked as the law changes. Partial = infrastructure provided; your legal team (or, for TCF, your own config + an optional dependency) finishes the specifics. In development = supported today, rollout still being finished — see each regulation's guide for current status.
Works with your stack
No migration required. Consenti adapts to whatever you're already running.
Find what your site actually fires — not just what you declared
Profiles declare trackers; real sites drift — tag managers, forgotten pixels, new third-party scripts. The scanner is a local, offline CLI that crawls your site in a real browser and reports every cookie, request and script it saw, and in which consent state it fired.
- Three passes per page: no consent, reject-all and accept-all
- Flags anything that fires before consent, and trackers missing from your profile
- Exits non-zero on findings, so it works as a CI/CD gate
- No account, no hosted service — everything runs on your machine
# crawl under no-consent, reject-all and accept-all
node apps/scanner/dist/cli.js \
scan https://example.com --depth 2 --output-dir ./scan-results
# writes, per scan:
# ./scan-results/<scan-id>/scan-results.json
# ./scan-results/<scan-id>/scan-results.html
# ./scan-results/<scan-id>/screenshots/<page>/{state}.png