← All tools
🛡️ 100% Vanilla JS & Consent Mode v2
View on GitHub

Vanilla RGPD Consent

Lightweight, standalone, and zero-dependency cookie consent manager. Features native Google Consent Mode v2, a consent choice modal, and a granular preference center.

🎮 Interactive Sandbox

Interact with the module below to test the banner, preference modal, and real-time consent persistence.

1-Line Quick Installation:

<script defer src="rgpd-consent.js"></script>

📊 Live Consent Status

Current state dispatched to gtag('consent', 'update', ...):

analytics_storage (GA4):Not set
ad_storage (Google Ads):Not set
ad_user_data (Consent v2):Not set
ad_personalization:Not set
Consent validity:6 months (180 days)

✨ Why Choose This Module?

🚀

Zero Dependencies

Under 35 KB of pure Vanilla JS. No frameworks, build tools, or external libraries required.

🌐

Native Bilingual (EN / FR)

Automatically supports English and French based on the visitor's browser language or your configuration.

🔒

Native Consent Mode v2

Built from the ground up for Google Analytics 4, Google Ads, and Tag Manager compliance.

⚖️

GDPR & CNIL Compliant

"Decline all" option equally prominent as "Accept all". Automatic 6-month retention in LocalStorage.

🎨

High-Definition UI

Smooth animations, glassmorphism backdrop, and automatic dark & light theme support.

⚙️

Floating Action Button (FAB)

Visitors can revoke or update their preferences anytime via a discreet icon in the bottom-left corner.