Cookie Consent
Google Consent Mode v2. Actually enforced.
Free cookie consent that actually controls Google Analytics & Ads tracking — not just a dismissible banner. Proper Google Consent Mode v2 in under 10KB. GDPR and CCPA compliant.

Features
What Cookie Consent Does
Built for performance, designed for simplicity.
Overview
Why Cookie Consent?
Most WordPress consent plugins either don't actually control tracking (they just show a form) or they're so bloated they slow down your site significantly. MaxtDesign Cookie Consent is different: proper Google Consent Mode v2 implementation in under 10KB.
The plugin implements all four required GCM v2 consent types — analytics_storage, ad_storage, ad_user_data, and ad_personalization. When a visitor declines cookies, GA4 and Google Ads tracking actually stops. No delayed script injection, no race conditions, no compliance gaps. The default consent state is injected in the <head> before any tracking scripts load.
Choose from three style presets (Minimal, Modern, or Bold), three positions (Top banner, Bottom banner, Center modal), and customize colors to match your brand. Use the built-in popup or integrate your own Elementor popup. Two shortcodes — [mdcc_consent_status] and [mdcc_manage_consent] — let you display consent state and management interfaces anywhere on your site.
Zero database queries during page load. Zero external dependencies. Pure localStorage-based consent management. Fully translation-ready with WCAG 2.1 AA accessibility. This plugin is 100% free with no premium tier — comparable solutions like CookieYes start at $49/month.
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
FAQ
Frequently Asked Questions
Can't find what you're looking for? Check the documentation or ask on the support forum.
Changelog
What's New
- Changed: the plugin homepage and author links now point to the official plugin page at maxtdesign.com
- Changed: the in-plugin Documentation and FAQ links now point to the official plugin page
- Fixed: the consent popup no longer reappears on every page load after a visitor has accepted or declined. It now checks the stored choice in the browser before showing, so it stays hidden once a choice is made. This also covers sites using full-page caching, where the previous server-side check could not run for each visitor
- Fixed: "Re-prompt on Decline" now works from the popup's own Decline All button. Previously, declining directly in the popup did not re-show it the way the setting intends
- WordPress 7.0 "Armstrong" compatibility (Tested up to: 7.0)
- Privacy Policy generator integration — describes localStorage usage, the mdcc_popup_shown cookie, and GCM v2 signalling
- Admin notice when an Elementor popup ID is configured but Elementor is not active (previously the built-in popup silently suppressed, leaving the site with no consent UI)
- GCM v2 default state now also declares security_storage, functionality_storage, and personalization_storage for completeness
- inject_gcm_default() now uses wp_print_inline_script_tag() so the consent default composes with CSP nonce plugins
- mdccConsent.reset() now clears the mdcc_popup_shown cookie alongside the localStorage state — manage-consent reset now correctly re-prompts the user
- First-time visitors no longer get a redundant gtag consent update on page load; tracking remains fully blocked by the inline default
- Added complete translation template (.pot) with all 61 translatable strings
- Enables community translation via translate.wordpress.org
- Users can now translate with Loco Translate or Poedit without extra setup
- Fixed popup race condition where JavaScript initialized before popup HTML was rendered
- Changed initialization from DOMContentLoaded to window load event
- Resolves inconsistent popup display, particularly in Chrome
- Critical fix: Google Consent Mode v2 timing — GTM/GA4 now properly blocked until consent granted
- Added gtag('consent', 'default') injection in <head> before tracking scripts
- New admin setting to enable/disable default consent injection (Advanced Settings)
- Added wait_for_update parameter (500ms) for consent-runtime.js load time
- Minification build system (PostCSS + Terser) — WordPress loads .min assets by default
- Phase 4 testing suite: performance validation, functional tests, manual testing checklist
- Fixed popup re-appearing on initial load when Re-prompt on Decline is enabled
- Optimized consent-runtime.js — 40% size reduction with full functional parity
- Initial public release on WordPress.org
- Complete standalone consent popup with three style presets
- Google Consent Mode v2 implementation (all four consent types)
- localStorage-based consent, two shortcodes, Elementor integration
- WCAG 2.1 AA accessible, mobile responsive, translation-ready
Documentation & Support
Step-by-step guides, configuration help, and community support through WordPress.org.
Open Source on GitHub
View the source, report bugs, or contribute. This plugin is free and open source under the GPL.
Need Something Custom?
I build custom WordPress plugins to your exact spec.