WP Pure Consent
WP Pure Consent is a lightweight, high-performance WordPress plugin designed to handle GDPR compliance and Google Consent Mode v2. Built with a modern developer stack, it ensures your website remains compliant without sacrificing Core Web Vitals (CWV) or user experience.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/joniilmanfahmi00-collab/wp-pure-consent/archive/refs/heads/main.zipWP Pure Consent is a lightweight, high-performance WordPress plugin designed to handle GDPR compliance and Google Consent Mode v2. Built with a modern developer stack, it ensures your website remains compliant without sacrificing Core Web Vitals (CWV) or user experience.
🚀 Features
- Google Consent Mode v2 Ready: Default "denied" state for all parameters, updating seamlessly upon user interaction.
- Core Web Vitals Optimized: Lightweight assets bundled with Vite, ensuring minimal impact on LCP and CLS.
- Modern Tech Stack: Powered by Alpine.js for reactivity and Tailwind CSS for styling.
- Fully Customizable: Modify banner titles, descriptions, button labels, and accent colors via a sleek AJAX-powered admin interface.
- Consent Logging: Optional database logging to track user consent status (hashed IP for privacy).
- Delayed Appearance: Configurable delay (in milliseconds) before the banner appears to improve UX.
- Responsive Design: Multiple positions supported (Bottom Right, Bottom Left, Bottom Bar).
- No Login & Payment Needed: Completely free and open-source, with no hidden costs or premium tiers.
- Simple Useage: Just install and activate. The plugin handles the rest, including GTM script injection and consent management.
🛠 Tech Stack
- Backend: PHP 8.1+
- Frontend Logic: Alpine.js
- Styling: Tailwind CSS
- CSR: HTMX
- Build Tool: Vite
📦 Installation
- Download the repository as a
.zipfile or clone it into your WordPress plugins directory:git clone https://github.com/joniilmanfahmi00-collab/wp-pure-consent.git - Navigate to the plugin folder and install dependencies (if you wish to modify the source):
npm install npm run build - Activate the plugin through the 'Plugins' menu in WordPress.
- Go to Settings > Pure Consent to configure your GTM ID and customize the banner appearance.
⚙️ Configuration
The plugin injects the GTM script and Consent Mode defaults automatically. Ensure your theme supports wp_body_open() for the GTM noscript fallback.
Available Settings:
- GTM ID: Your Google Tag Manager container ID (e.g., GTM-XXXXXXX).
- Banner Customization: Edit title, description, and button text.
- Accent Color: Pick a hex color to match your brand identity.
- Positioning: Choose where the banner appears on the screen.
- Privacy Log: Toggle database logging for compliance auditing.
🧑💻 For Developers
Directory Structure
assets/: Contains raw Tailwind and Alpine.js source files.assets/dist/: Contains the compiled, production-ready CSS and JS.includes/: Internal logic and views.wp-pure-consent.php: Main plugin entry point and Google Consent Mode implementation.
Build Commands
If you want to modify the UI/UX:
# Start development mode
npm run dev
# Build production assets
npm run build
📄 License
This project is licensed under the GPL-2.0-or-later License.
Developed with ❤️ by Joni Ilman Pahmi Plugin URI: https://preneur.space/