Cookie Consent That Knows the Law

Stop guessing which regulations apply to your visitors. SmartConsent detects jurisdiction automatically, resolves conflicting requirements using "strictest wins" logic, and renders a compliant banner — all in a single script tag under 10KB.

Cookie consent is broken. Most banners are either non-compliant or require manual configuration for every jurisdiction.

Regulation Complexity

GDPR requires opt-in. CCPA allows opt-out. DPDP Act prohibits child tracking. PECR requires equal-prominence buttons. Getting it wrong means fines up to 4% of global revenue.

Manual Configuration

Traditional consent tools require you to manually configure compliance settings for each jurisdiction. When regulations change, you update code — or fall out of compliance.

Bundle Bloat & Dependencies

Popular consent platforms ship 50-200KB of JavaScript with third-party dependencies. They slow your site, introduce supply-chain risk, and often require a server-side component.

What SmartConsent Does

Regulatory intelligence meets lightweight engineering

Regulatory Intelligence

Built-in knowledge graph covering 11 regulations across 60+ countries. Auto-detects visitor jurisdiction via geo-IP and applies the correct compliance profile.

Strictest-Wins Resolution

When multiple regulations apply (e.g., a UK visitor on a site with EU operations), SmartConsent resolves conflicts by applying the strictest requirement for each setting.

Script Blocking Engine

Block-first approach: scripts tagged with data-consent-category are prevented from executing until consent is given. MutationObserver catches dynamically injected scripts.

Google Consent Mode v2

Fires gtag consent default and update signals automatically. Required for Google Ads, GA4, and DV360 in the EEA, UK, and Switzerland.

Global Privacy Control

Detects navigator.globalPrivacyControl and auto-applies opt-out preferences in jurisdictions that honour GPC (California, Colorado, Connecticut, and more).

Zero Dependencies

Single IIFE bundle under 10KB gzipped. No React, no framework, no server. Works with any website via a plain script tag.

How It Works

From script tag to compliant consent in six steps

1

Add Script Tag

Include SmartConsent in your HTML head — one line of configuration, one script tag.

2

Geo-Detection

SmartConsent detects the visitor's country via IP geolocation with sessionStorage caching and 2-second timeout.

3

Regulation Resolution

The Consent Reasoner matches jurisdiction to applicable regulations and resolves conflicts using strictest-wins logic.

4

Banner Rendered

A fully compliant banner appears with the correct buttons, prominence, and options for that jurisdiction.

5

Scripts Unblocked

On consent, tagged scripts execute. GTM Consent Mode fires. Webhook sends proof of consent to your endpoint.

6

Persistent Preferences

Consent stored in localStorage with automatic expiry per regulation (13 months UK, 12 months EU). Badge allows easy re-access.

Use Cases

Why SmartConsent

Built different from the ground up

Data-Driven, Not Code-Driven

Regulations are JSON files, not if-statements. Adding a 12th regulation means adding a JSON file — zero code changes, zero deployments to the core engine.

Genuinely Lightweight

Under 10KB gzipped with all 11 regulation data files included. No framework dependency. No server component. Loads faster than a single tracking pixel.

Built for Developers

npm package, React wrapper, TypeScript declarations, ES module, IIFE bundle, vanilla HTML template. Six integration methods for every stack.

Open Architecture

BSL 1.1 licensed — free for any use except competing consent services. Full source available. Converts to Apache 2.0 after four years.

Add compliant cookie consent in under 60 seconds