CookieWoo
πͺ GDPR cookie consent for WordPress + WooCommerce with Google Consent Mode v2 and GTM integration
by Gonzalo Bellido Β· github.com/gonbellido/cookiewoo Β· website
β
0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/gonbellido/cookiewoo/archive/refs/heads/main.zipGDPR-compliant cookie consent banner for WordPress + WooCommerce with Google Consent Mode v2 and GTM integration.
β¨ Features
- π― Google Consent Mode v2 β Updates
gtag('consent', 'update', {...})in real-time - π·οΈ GTM Compatible β Pushes consent to dataLayer for Google Tag Manager
- π Auto-scan β Detects cookies set by plugins and scripts on your site
- π Audit log β Tracks every consent action (accept, reject, customize)
- π¨ Customizable β Colors, position, text, categories β all from WP Admin
- π Multi-language β Ready for translation via standard WP i18n
- β‘ Vanilla JS β No jQuery, under 10KB gzipped
π Quick Start
- Install the plugin via WordPress Admin β Plugins β Add New β Upload
- Go to Settings β CookieWoo
- Configure your GTM container ID (optional)
- Customize the banner text and colors
- Done! The banner appears automatically
π Tech Stack
- PHP 7.4+ with OOP architecture
- Vanilla JavaScript (ES6+), no framework dependencies
- WordPress Settings API for admin configuration
- Google Consent Mode v2 via
gtag.jsand dataLayer - GPL v2 licensed
π Structure
cookiewoo/
βββ cookiewoo.php # Plugin bootstrap
βββ includes/
β βββ class-cookiewoo.php # Core consent logic
β βββ class-cookiewoo-admin.php # Settings page
β βββ class-cookiewoo-logger.php # Audit logging
βββ admin/ # Admin panel CSS/JS
βββ public/ # Frontend banner CSS/JS
βββ languages/ # i18n .po/.mo files
π€ Author
Gonzalo Bellido β Fullstack Developer & WordPress Specialist