flexext / craft-cookie-consent
Native GDPR Cookie Banner, Google Consent Mode v2, Prior Script Blocker, and SHA-256 Consent Audit Ledger for Craft CMS 4 & 5 - zero jQuery, zero SaaS fees.
Package info
github.com/flexext-dev/craft-cookie-consent
Type:craft-plugin
pkg:composer/flexext/craft-cookie-consent
1.0.2
2026-12-01 16:00 UTC
Requires
- php: ^8.1
- craftcms/cms: ^4.5.0 || ^5.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Native GDPR Cookie Banner, Google Consent Mode v2, Automatic Prior Script Blocker, and SHA-256 Consent Audit Ledger for Craft CMS 4.5+ & 5.x — zero jQuery, zero external SaaS fees.
Included Features (Single Standard Edition)
- WCAG 2.2 AA Cookie Banner: Full-Width Bottom Bar, Floating Corner Card, or Centered Modal in Dark Slate or Crisp Light themes.
- Google Consent Mode v2: Automatic default-denied
<head>signals (ad_storage,analytics_storage,ad_user_data,ad_personalization) + live consent updates. - 4 Granular Categories & Policy Versioning: Strictly Necessary, Preferences, Analytics, and Marketing + automatic re-prompt when you bump Policy Version.
- Automatic Prior Script Blocker: Rewrites matching
<script src="...">tags (analytics|googletagmanager.com,marketing|connect.facebook.net) totype="text/plain"until consent is granted. - SHA-256 GDPR Consent Audit Ledger & CSV Export: Stores anonymized cryptographic proof in your Craft DB with 1-click CSV export for DPO audits.
Installation
composer require flexext/craft-cookie-consent php craft plugin/install cookie-consent-gcm
Requirements
- Craft CMS 4.5+ or 5.0+
- PHP 8.1 - 8.4