Welcome to CookiEzu
The lightweight, GDPR-compliant cookie consent plugin for WordPress. Open source, free forever, and beautiful by default. Now at v1.3.0 with consent analytics, live design preview, and full WCAG 2.1 AA accessibility.
CookiEzu gives your WordPress site a fully compliant cookie consent experience. When a visitor lands on your site, a customisable banner appears asking for their consent before any non-essential cookies are loaded. Their choice is remembered, logged, and respected on every future visit.
What CookiEzu Does
Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| WordPress | 5.5 | 6.4+ |
| PHP | 7.4 | 8.2+ |
| MySQL | 5.6 | 8.0+ |
| Browser | Any modern browser | Chrome, Firefox, Safari, Edge |
mb_chr() used in flag emoji rendering for the country analytics. PHP 8.x strongly recommended.Installing CookiEzu
Get the plugin installed on your WordPress site in under 2 minutes.
Method 1 β Upload via WordPress Admin
cookiezu-v1.3.0.zip.country_code column) automatically.Upgrading from any older version
country_code column is added to your existing consent table if it doesn't exist.Method 2 β FTP / Manual
cookiezu-v1.3.0.zip β you'll get a cookiezu_v121/ folder./wp-content/plugins/ as cookiezu/.Configure your banner
A 5-minute walkthrough of the most important settings to get your banner live and compliant.
Step 1 β Set your banner text
Go to CookiEzu β Settings β Content tab. Update the Banner Title and Banner Message to reflect your site's brand and what you actually do with cookies.
Step 2 β Add your Privacy Policy link
Still on the Content tab, paste your Privacy Policy page URL into the Privacy Policy URL field. This is required under GDPR β visitors must be able to read your full policy from the banner.
Step 3 β Choose your layout with live preview
Go to the Design tab. On the right side of the screen you'll see a sticky Live Preview panel β a scaled browser mockup that updates in real time as you change any setting. Pick your Layout (Bar, Box, or Modal), Position, and Theme. The preview reflects your changes instantly without saving.
Step 4 β Enable the categories you use
Go to the Categories tab. Only enable the categories that match cookies your site actually loads. If you don't use Facebook Pixel, don't show a Marketing toggle.
Step 5 β Enable consent recording
Go to the Advanced tab and tick Record Consent. This builds your GDPR audit trail in CookiEzu β Consent Log β and now automatically captures visitor country (2-letter code only) for the analytics dashboard.
Step 6 β Save and test
Click Save Settings. Then open your website in a private/incognito window to see the banner as a first-time visitor would. Try accepting all, then clearing the cookiezu_consent cookie and trying the Customize flow too.
v1.3.0 β GCC & Brunei Compliance Pack
Released March 2026. Arabic + RTL layout, Bahasa Melayu, Policy Version re-consent trigger, Extended Disclosure, Data Processing Location, compliance tier badges, and smart admin notices for Brunei PDPO 2025 and GCC PDPL.
Changes in v1.3.0
.cookiezu-rtl class is added to the banner root via PHP; CSS handles everything else. No JS logic change required. Covers Saudi Arabia, UAE, Qatar, Bahrain, Oman, and Kuwait.languages/ms.php. Covers Brunei Darussalam and Malaysia. Latin script, LTR, no layout changes. The plugin was built in Brunei β Malay support is a natural first-party addition.1). The value is stored in the consent cookie as policyVersion and recorded in the consent log. On page load, if the saved cookie's policyVersion doesn't match the current setting, the old cookie is cleared and the banner is shown again β forcing re-consent. Directly satisfies GDPR Article 7, Saudi PDPL, and Brunei PDPO 2025 requirements when data processing purpose or policy changes.CookiEzu::$compliance_tiers.policy_version VARCHAR(20) NOT NULL DEFAULT '1' column on first load after upgrade, via ALTER TABLE in the installer. Existing records default to 1. No manual SQL required.Changes in v1.2.1 β Metrics & UX Polish
--cz-cookie-pale (#FDF3E3 β warm cream) but the text remained near-white (#FEFCF8). The fix adds --cz-cookie-pale: rgba(193,123,47,0.18) to the dark theme token override so checked categories use a dark amber tint instead of the light cream.country_code VARCHAR(2) column is added to the consent log. Detection: Cloudflare CF-IPCountry header β geoplugin.net API (24h cache) β empty string fallback. Only the 2-letter ISO code is stored β GDPR minimal data principle.Changes in v1.2.0 β Polish & Accessibility
Previous Releases
| Version | Date | Summary |
|---|---|---|
| 1.3.0 | Mar 2026 | Arabic RTL, Malay, Policy Version, Extended Disclosure, Data Location, compliance badges, admin notices |
| 1.2.1 | Feb 2026 | Consent analytics dashboard, country tracking, live preview, dark mode fix |
| 1.2.0 | Feb 2026 | WCAG 2.1 AA accessibility, focus trap, Escape key, test mode, no-flicker init |
| 1.1.0 | Feb 2026 | Modal dismiss fix, JS engine rewrite |
| 1.0.0 | Jan 2026 | Initial release β Bar/Box/Modal, GA4, GTM, consent log, 3 themes |
Banner Layouts
Three layouts, four positions β every combination produces a polished, accessible result. Use the Live Preview in the Design tab to see your exact configuration before saving.
Layouts
| Layout | Best For | Description | Status |
|---|---|---|---|
| Bar | Most sites | Slim strip across full page width. Least intrusive, highest consent conversion rate. | β Working |
| Box | Modern / minimal sites | Floating card in the corner. Stylish and unobtrusive. | β Working |
| Modal | Strict compliance | Centred popup with dark overlay. Blocks interaction until a choice is made. | β Working |
Positions
| Position | Works With | Notes |
|---|---|---|
| Bottom | Bar, Box | Default. Most familiar to visitors. |
| Top | Bar | Good if you have a fixed footer. |
| Bottom-Left | Box, Bar | Unobtrusive corner placement. |
| Bottom-Right | Box, Bar | Popular for chat-widget style. |
Re-open Button
After consent is given, a small πͺ floating button appears so visitors can update preferences at any time β a GDPR requirement. Its position (bottom-left or bottom-right) is configurable in Advanced β Re-open Button Position (new in v1.2.0).
Cookie Categories
Let visitors choose exactly which cookies they consent to. Granular control is a core GDPR requirement.
| Category | Always On? | Examples | Use When |
|---|---|---|---|
| Necessary | β Yes | Login session, shopping cart, CSRF token | Always β cannot be disabled |
| Analytics | No | Google Analytics, Matomo, Plausible | You track page views or user behaviour |
| Marketing | No | Facebook Pixel, Google Ads, TikTok Pixel | You run paid ads or remarketing |
| Functional | No | Intercom, Google Maps, YouTube embeds | You use live chat, maps, or embedded media |
Cookie Details Table
Enable Show Cookie Table in Categories settings to display the specific cookies, their provider, and expiry inside each category. This provides the detailed disclosure required by stricter GDPR interpretations.
Themes & Colours
Make your banner match your brand β from built-in presets to full custom colour control. Dark mode fully fixed in v1.3.0.
| Theme | Background | Best For |
|---|---|---|
| Light | Warm white / cream (#FEFCF8) | Light-coloured websites, blogs, editorial sites |
| Dark | Deep ink (#1A1208) | Dark-mode websites, tech sites, portfolios |
| Custom | You choose | Any site where you want exact brand colour matching |
--cz-cookie-pale to rgba(193,123,47,0.18) within the dark theme token set, and adding a specific dark-mode override rule for checked category cards.Custom Colour Settings
When you select the Custom theme, three colour pickers appear:
| Setting | Affects |
|---|---|
| Primary Color | Accept All button, toggle switch active state, links |
| Text Color | All text inside the banner and preference panel |
| Background Color | Banner background, category cards |
Border Radius
The Border Radius setting (0β50px) applies to buttons and the Box/Modal layout container. Set to 0 for sharp corners, or 50 for fully rounded pill-shaped buttons. The Live Preview updates this in real time.
Live Design Preview
See exactly how your banner will look β before saving β with a real-time preview that updates as you change settings.
How It Works
The Design tab is now a two-column layout. On the left: your settings (Layout, Position, Theme, colours, border radius). On the right: a sticky preview panel showing a scaled browser window mockup containing a fake page and your live banner. No page reload, no saving β every change is reflected immediately.
What the Preview Shows
| Setting | Reflected in Preview |
|---|---|
| Layout (Bar / Box / Modal) | Full layout change with correct positioning |
| Position | Box snaps to bottom-left/right; Bar snaps to top/bottom |
| Theme (Light / Dark / Custom) | Background, text, and button colours |
| Custom colours | Updates as you pick colours (50ms delay for smooth UX) |
| Border radius | Buttons and container shape update live |
| Banner title | Pulled from Content tab β Banner Title field |
| Button labels | Pulled from Content tab β Accept All / Necessary / Customize fields |
Responsive Behaviour
On screens narrower than 1100px, the two-column design collapses to a single column with the settings on top and the preview below. The preview panel is still sticky on wider viewports to keep it visible as you scroll through the settings.
Consent Log
Your GDPR audit trail. Every consent decision recorded, stored, and ready if you're ever asked to prove compliance. Now with a full analytics dashboard above the raw records.
When Record Consent is enabled in Advanced settings, CookiEzu logs every consent event to wp_cookiezu_consent_log.
What Gets Recorded
| Field | Description | Since |
|---|---|---|
| id | Unique auto-increment record ID | v1.0.0 |
| ip_address | Visitor IP β last 4 characters masked (e.g. 192.168.1.****) | v1.0.0 |
| user_agent | Browser user agent string (stored but not displayed) | v1.0.0 |
| country_code | 2-letter ISO country code only (e.g. MY, SG, BN). Never city or region. | v1.3.0 |
| necessary | Always 1 (true) β cannot be declined | v1.0.0 |
| analytics | 1 = accepted, 0 = declined | v1.0.0 |
| marketing | 1 = accepted, 0 = declined | v1.0.0 |
| functional | 1 = accepted, 0 = declined | v1.0.0 |
| consent_date | Exact datetime of the consent event (server time) | v1.0.0 |
country_code column is added automatically on first load after upgrading to v1.3.0. No manual SQL is needed. Existing records will show an empty string for country until new consents are received.Consent Expiry
The Consent Expiry setting (Advanced tab) controls how long the visitor's browser cookie lasts. Default is 365 days. After expiry the banner re-appears and a new record is created. GDPR recommends re-obtaining consent at least annually.
Consent Analytics
A visual metrics dashboard at the top of your Consent Log page β no external tools required.
What's in the Dashboard
| Widget | Shows |
|---|---|
| Stat cards (Γ4) | Total Consents all-time; Accept All %, Necessary Only %, Custom Choices % β each with a mini SVG donut chart and visitor count |
| Category bars | Horizontal acceptance rate bar for Analytics, Marketing, Functional, Necessary |
| 30-day trend | Bar chart of daily consent volume over the last 30 days with hover tooltips |
| Top Countries | Flag emoji + ISO code + proportional bar + count + % for the top 10 countries |
| Raw records | Latest 200 consent records, now including Country column with flag emojis |
Country Detection
Country codes are resolved at the time consent is saved using a three-tier detection chain:
HTTP_CF_IPCOUNTRY server header is present on every request. This is zero-latency, perfectly reliable, and the preferred method.geoplugin.net/json.gp?ip=β¦ is made. No API key required. Results are cached in WordPress transients for 24 hours per IP address to avoid repeated calls. Timeout is 3 seconds β if it fails, an empty string is stored gracefully.MY, SG, BN) is stored β never city, region, postal code, or precise location. This keeps the additional data collected proportionate and within GDPR's data minimisation principle (Art. 5(1)(c)).WCAG 2.1 Accessibility
CookiEzu v1.2.0 reached full WCAG 2.1 AA compliance. Here's what was implemented and why it matters.
| Feature | WCAG Criterion | How it Works |
|---|---|---|
| Focus trap | 2.1.1 Keyboard | Tab/Shift+Tab wraps within visible banner elements only. Page content behind the modal is unreachable by keyboard while the banner is open. |
| Escape key dismiss | 2.1 Keyboard accessible | Pressing Esc accepts Necessary Only and closes the banner β the standard keyboard dialog dismissal pattern. Configurable in Advanced. |
| Focus return | 2.4.3 Focus Order | After accepting/declining, keyboard focus moves to the πͺ re-open button via requestAnimationFrame(). Focus is never lost or sent to the top of the page. |
| Proper ARIA | 1.3.1 Info and Relationships | Banner uses role="dialog" with aria-labelledby and aria-describedby pointing at the actual title and message text. Screen readers announce meaningful content. |
| Keyboard focus rings | 2.4.7 Focus Visible | 3px amber outline on buttons (:focus-visible) and 3px outline on toggle switches (:focus-within) make keyboard navigation clearly visible. |
| Screen reader announcement | 4.1.3 Status Messages | When "Customize" is clicked, the preferences panel gets aria-live="polite" and focus moves to the section heading so screen reader users know new content appeared. |
Configuring Accessibility Features
All accessibility features are on by default. Some can be toggled in CookiEzu β Settings β Advanced β Keyboard Settings:
| Setting | Default | Recommendation |
|---|---|---|
| Allow Esc key to dismiss the banner | β On | Keep enabled β required for WCAG 2.1 keyboard compliance |
| Re-open Button Position | Bottom Left | Choose Bottom Right if you have a chat widget on the left |
Test Mode
Preview your banner design and functionality without clearing your consent cookie every time.
What It Does
When Test Mode is enabled in Advanced settings, the banner always shows for logged-in WordPress administrators β even if they already have a valid consent cookie. This lets you preview design changes, test category toggles, and verify the Customize flow without clearing browser cookies each time.
Important Notes
| Behaviour | In Test Mode |
|---|---|
| Banner shows to | Logged-in admins only (always) |
| Consent recorded | No β test mode clicks are not recorded to the consent log |
| Visitors see | Normal behaviour β unaffected by test mode |
| Badge visible to visitors | No β badge is CSS-hidden for non-admins via PHP |
Arabic & Malay Languages
Native language support for GCC countries (Arabic, RTL) and Brunei Darussalam / Malaysia (Bahasa Melayu, LTR). Select your language in Content settings β everything else applies automatically.
How to Set the Banner Language
Go to CookiEzu β Settings β Content β Language & Localisation. Select from the dropdown:
| Option | Script | Direction | Covers |
|---|---|---|---|
| π¬π§ English (default) | Latin | LTR | Global default |
| πΈπ¦ Arabic β Ψ§ΩΨΉΨ±Ψ¨ΩΨ© | Arabic | RTL (auto) | Saudi Arabia, UAE, Qatar, Bahrain, Oman, Kuwait |
| π§π³ Malay β Bahasa Melayu | Latin | LTR | Brunei Darussalam, Malaysia |
Arabic RTL β What Happens Automatically
When Arabic is selected, a cookiezu-rtl class and dir="rtl" attribute are added to the banner root element by PHP β before the browser renders it. The following are applied by CSS with no JavaScript logic required:
| Element | RTL Change |
|---|---|
| Banner text | direction: rtl; text-align: right |
| Bar layout | Flex row reversed so buttons appear on the left |
| Category headers | Flex row reversed β toggle appears on the left |
| Preference action buttons | Flex row reversed |
| Extended Disclosure border | Moved from left to right |
| Cookie table cells | text-align: right |
| Re-open button | Moved to bottom-right (JS override) |
| Font fallback | Segoe UI, Tahoma, Arial β better Arabic rendering |
Language Files
Translations live in the languages/ folder as simple PHP arrays:
| File | Language | Notes |
|---|---|---|
languages/en.php | English | Baseline β all keys defined here |
languages/ar.php | Arabic | RTL, GCC coverage |
languages/ms.php | Bahasa Melayu | Brunei PDPO 2025 & Malaysia PDPA |
Missing keys fall back to English automatically. To contribute a new language, copy en.php, translate the values, and submit a pull request on GitHub.
Policy Version Re-consent Trigger
Force all existing visitors to re-consent when your Privacy Policy or data processing changes β a legal requirement under GDPR, Saudi PDPL, and Brunei PDPO 2025.
How It Works
The Policy Version field (in Advanced settings, default: 1) is stored in each visitor's consent cookie as policyVersion and recorded in the consent log. On every page load, CookiEzu compares the cookie's stored version with the current setting. If they don't match, the old cookie is cleared and the banner is shown again.
1 to 2) and save settings. Every visitor β including those who already consented β will see the banner again on their next page load. Consent is not recorded until they make a new choice.When to Bump the Version
| Scenario | Action | Required by |
|---|---|---|
| Added a new cookie category (e.g. marketing was off, now on) | Bump version | GDPR, PDPL, PDPO |
| Changed your Privacy Policy's data processing purpose | Bump version | GDPR Art. 7, PDPO Β§12 |
| Added a new third-party data processor | Bump version | GDPR, PDPL |
| Changed your data retention period | Bump version | GDPR |
| Minor wording change with no impact on processing | No change needed | β |
Consent Log
Each consent record stores the policy_version value at the time of consent. This gives you a full audit trail β you can see exactly which version of the policy each visitor consented to. The column was added in v1.3.0 via automatic DB migration; records from before the upgrade default to 1.
1 to 2 and later revert to 1, visitors who previously consented to version 1 will not see the banner again. Always increment forward.GCC & Brunei Compliance
CookiEzu v1.3.0 adds native support for Saudi PDPL, Brunei PDPO 2025, and related GCC data protection laws β the first free WordPress consent plugin to do so.
Applicable Laws
| Country | Law | In Force | CookiEzu Coverage |
|---|---|---|---|
| π§π³ Brunei | PDPO 2025 | Jan 2026 (enforcement) | Malay language, Policy Version, Extended Disclosure, Data Location, admin notice |
| πΈπ¦ Saudi Arabia | PDPL | Sept 2024 | Arabic + RTL, Extended Disclosure, Data Location, compliance badge, admin notice |
| π¦πͺ UAE | Federal DPL No.45/2021 | Jan 2022 | Arabic + RTL, compliance badge |
| πΆπ¦ Qatar | Personal Data Privacy Law | 2016 | Arabic + RTL, compliance badge |
| π§π Bahrain | PDPL No.30/2018 | Aug 2019 | Arabic + RTL, compliance badge |
| π΄π² Oman | Personal Data Protection Law | Feb 2026 | Arabic + RTL, Data Location, compliance badge |
| π°πΌ Kuwait | Data Privacy Regulation No.26/2024 | 2024 | Arabic + RTL, compliance badge |
What CookiEzu Handles vs. What It Cannot
| Requirement | CookiEzu handles? | Notes |
|---|---|---|
| Informed consent before processing | β Yes | Banner shown before any cookie set |
| Granular category consent | β Yes | Necessary / Analytics / Marketing / Functional |
| Right to withdraw consent | β Yes | πͺ re-open button always accessible |
| Re-consent on policy change | β Yes | Policy Version field (v1.3.0) |
| Audit trail of consent | β Yes | Consent Log with policy_version column |
| Language in user's language | β Yes | Arabic + Malay (v1.3.0) |
| Data processing purpose disclosure | β Partial | Extended Disclosure field β you fill the text |
| Data localisation disclosure | β Partial | Data Processing Location field β you fill the text |
| Data localisation (storing data locally) | β Out of scope | Depends on your server/hosting location |
| Cross-border transfer approvals | β Out of scope | Requires legal counsel |
| Data breach notification (PDPO Part 7) | β Out of scope | Requires process/tooling outside WordPress |
| DPO appointment | β Out of scope | Organisational, not technical |
Smart Admin Compliance Notices
CookiEzu checks your consent log for BN and GCC country codes. If visitors from those regions are detected and the Data Processing Location field is empty, yellow admin notices appear automatically on CookiEzu pages in the WordPress admin β linking directly to the settings tab that needs attention.
Google Analytics 4
Auto-load GA4 with full Consent Mode v2 support β no additional plugins or code needed.
How It Works
When you enter a GA4 Measurement ID, CookiEzu injects the gtag.js script and sets up Consent Mode v2. By default all consent signals are denied. When a visitor accepts analytics cookies, CookiEzu updates the signals to granted and GA4 begins full tracking.
Setup
G-XXXXXXXXXX).Google Tag Manager
CookiEzu pushes consent events to GTM's dataLayer, letting you control any tag based on visitor consent β without touching code.
Setup
GTM-XXXXXXX).cookiezu_consent_updated. Use it to fire Facebook Pixel, Hotjar, or any other tag only when the relevant consent is granted.dataLayer Event Structure
JavaScript{ event: "cookiezu_consent_updated", cookiezu: { necessary: true, analytics: true, // or false marketing: false, functional: true, version: "1.2.1", date: "2026-02-28T10:22:00.000Z" } }
Access these in GTM as {{dlv - cookiezu.analytics}} etc. to conditionally fire tags.
JavaScript API
Load any third-party script conditionally based on what the visitor consented to β no GTM required.
The Consent Event
Every time a visitor saves their preferences, CookiEzu fires a custom DOM event called cookiezuConsentUpdated.
JavaScriptdocument.addEventListener('cookiezuConsentUpdated', function(e) { const consent = e.detail; // consent.necessary β always true // consent.analytics β true or false // consent.marketing β true or false // consent.functional β true or false if (consent.analytics) { loadHotjar(); // load any analytics tool } if (consent.marketing) { loadFBPixel(); // load Facebook Pixel } if (consent.functional) { loadIntercom(); // load chat widget } });
Reading Consent Without the Event
JavaScriptfunction getCookieZuConsent() { const match = document.cookie.match(/cookiezu_consent=([^;]*)/); if (!match) return null; try { return JSON.parse(decodeURIComponent(match[1])); } catch(e) { return null; } } const consent = getCookieZuConsent(); if (consent?.analytics) { // already consented β load scripts immediately }
GDPR Guide
Everything you need to configure CookiEzu to meet EU General Data Protection Regulation requirements.
GDPR Checklist
| Requirement | CookiEzu Setting | Status |
|---|---|---|
| Consent before non-essential cookies | Enabled by default | β Built-in |
| Granular category choices | Enable categories in Categories tab | β Built-in |
| Easy to withdraw consent | Re-open πͺ button always visible | β Built-in |
| Keyboard accessible dialog | Focus trap + Escape key β on by default | β v1.2.0 |
| Link to Privacy Policy | Content tab β Privacy Policy URL | |
| Audit trail / record of consent | Enable Record Consent in Advanced tab | |
| Re-obtain consent periodically | Set Consent Expiry to 365 days max | |
| No pre-ticked marketing boxes | Marketing toggle is off by default | β Built-in |
| Data minimisation (country tracking) | Country code only β no city/region stored | β v1.3.0 |
PDPA Guide
Personal Data Protection Act requirements for Malaysia, Thailand, Singapore, and Brunei.
Southeast Asian PDPA laws share the same core principle as GDPR β you must obtain informed consent before collecting and processing personal data, including via cookies and tracking scripts.
Country Coverage
| Country | Law | Key Notes |
|---|---|---|
| π²πΎ Malaysia | PDPA 2010 | Consent must be informed and voluntary. Data subjects can withdraw consent at any time. |
| πΉπ Thailand | PDPA 2019 | Similar to GDPR. Requires explicit consent for sensitive data. Effective since 2022. |
| πΈπ¬ Singapore | PDPA 2012 (amended 2021) | Deemed consent rules apply. Must provide opt-out mechanisms. |
| π§π³ Brunei | No dedicated PDPA yet | Best practice: follow GDPR/Malaysian PDPA standards. Legislation likely incoming. |
Custom CSS
Override any part of the banner using CookiEzu's CSS variable system or direct selectors.
Paste your CSS into CookiEzu β Settings β Advanced β Custom CSS. It is output in a <style> tag in your page footer, after the plugin's main stylesheet, so it takes full precedence.
display: none !important on the banner itself. Visibility is controlled by inline JavaScript styles. CSS display: none !important can permanently hide the banner for all visitors.CSS Variables Reference
CSS Variables:root { /* Colours (all overrideable) */ --cz-cookie: #C17B2F; /* buttons, toggles, links */ --cz-cookie-pale: #FDF3E3; /* light checked bg β auto-overridden in dark mode */ --cz-text: #1A1208; /* all text */ --cz-text-muted: rgba(26,18,8,0.55); --cz-bg: #FEFCF8; /* banner background */ --cz-surface: #FBF7F0; /* unchecked category card */ --cz-border: rgba(26,18,8,0.10); /* Shape */ --cz-radius: 10px; --cz-radius-lg: 16px; }
Example β Dark Mode Override
CSS/* Deepen the dark background further */ .cookiezu-theme-dark { --cz-bg: #0D0904; --cz-surface: #150F08; }
Example β Custom Font
CSS.cookiezu-banner { font-family: 'Georgia', serif; }
WordPress Hooks
Extend and customise CookiEzu behaviour using WordPress actions and filters.
| Hook | Type | Description |
|---|---|---|
| cookiezu_options | Filter | Modify the options array before it's used. Useful for dynamic overrides based on user role or page. |
| cookiezu_banner_html | Filter | Override the entire banner HTML output. |
| cookiezu_before_banner | Action | Output content before the banner renders in the footer. |
| cookiezu_after_banner | Action | Output content after the banner renders in the footer. |
Example β Override layout per page
PHPadd_filter( 'cookiezu_options', function( $options ) { // Use modal on checkout, bar everywhere else if ( is_checkout() ) { $options['layout'] = 'modal'; $options['position'] = 'bottom'; } return $options; } );
Troubleshooting
Diagnosing and fixing the most common issues with CookiEzu.
Dark mode text unreadable on category cards
Banner doesn't appear at all
Most common cause: you already have a consent cookie. Open DevTools β Application β Cookies, find cookiezu_consent, delete it, and refresh. Always test in an incognito window. Alternatively, turn on Test Mode in Advanced to force the banner to show for admins without clearing cookies.
Country shows "β" in the log
The country_code column was added in v1.3.0. If records show "β" for country, these were created before the upgrade. All new consents after upgrading will have the country code populated. You can also check if your server is behind Cloudflare (fastest method) or confirm that outbound HTTP requests to geoplugin.net are not blocked by your firewall.
Live preview doesn't update
The live preview relies on jQuery being loaded on the admin page (it always is in WordPress admin). If the preview doesn't update, open DevTools Console and look for JavaScript errors. A common cause is a third-party admin plugin that breaks the global jQuery object. Try disabling other plugins temporarily.
After upgrading, old behaviour persists
A caching plugin is serving the old JS/CSS. Clear WP Super Cache, W3 Total Cache, LiteSpeed Cache, Cloudflare cache, and any server-level cache your host provides (Kinsta, WP Engine, Flywheel all have these). Then hard-refresh with Ctrl+Shift+R.
fetch('/wp-content/plugins/cookiezu/public/js/cookiezu-public.js').then(r=>r.text()).then(t=>console.log(t.slice(0,300))). If the output contains trapFocus and testMode you have v1.2.x. If it only contains style.display without those, you have v1.1.0.Consent log is empty
Make sure Record Consent is enabled in Advanced. Also run console.log(cookiezuSettings.ajaxUrl) in the browser console to verify the AJAX URL is correct.
Frequently Asked Questions
Quick answers to the most common questions about CookiEzu.
Will CookiEzu slow my site down?
No. The front-end JavaScript is under 4KB with zero dependencies. The CSS is ~6KB. Both load in the footer and have no impact on Core Web Vitals or page speed.
Does country tracking slow consent recording?
For Cloudflare users: no β the country comes from a header with zero latency. For everyone else, the geoplugin.net lookup has a 3-second timeout and results are cached per IP for 24 hours (WordPress transients), so repeat visitors from the same IP have instant resolution. If the lookup fails or times out, an empty string is stored gracefully β consent recording never fails because of country detection.
Is the live preview exactly what visitors see?
The preview is a proportional approximation. Layout, theme, colours, and shapes are accurate. Exact pixel-level spacing and font rendering will differ slightly because the preview is scaled down inside an admin panel. Always verify in incognito on your real site before going live.
Can I use CookiEzu with WooCommerce?
Yes. WooCommerce's session and cart cookies are Necessary and don't require consent. Show Marketing only if you run WooCommerce Ads or remarketing. The plugin is fully compatible with WooCommerce.
Is this plugin free forever?
Yes. CookiEzu is GPL v2 licensed. Use it on unlimited sites, modify it, redistribute it. No paid tiers, no usage limits, no subscriptions.
Does CookiEzu block scripts automatically?
Not yet. v1.3.0 fires the cookiezuConsentUpdated JS event which you use to load scripts conditionally. Automatic script blocking (rewriting type="text/javascript" β type="text/plain") is planned for v2.
How do I report a bug?
Open an issue at github.com/flyzal/CookiEzu/issues. Include your WP version, PHP version, active theme, layout, and exact reproduction steps.
What's coming next
Planned features for CookiEzu v2 and beyond. All community suggestions welcome on GitHub.
β Completed β v1.0 through v1.3.0
Version 2.0 β Smarter Consent
Version 3.0 β Power Features
Current v1.3.0 Integrations
Legal Disclaimer
Important information about the limits of CookiEzu and your responsibilities as a website owner under applicable privacy law.
1. Not Legal Advice
Nothing in this documentation, on the CookiEzu website, or within the plugin's code constitutes legal advice, legal opinion, or a legal recommendation. The information provided is for general technical guidance only. For advice specific to your business, jurisdiction, and data practices, consult a qualified legal professional or a certified Data Protection Officer (DPO).
2. Software Provided "As Is" β GPL v2 Warranty Disclaimer
CookiEzu is distributed under the GNU General Public License v2 (GPL v2). As stated in Sections 11 and 12 of that license:
GPL v2 β Sections 11 & 12THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ANY COPYRIGHT HOLDER BE LIABLE FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM.
3. No Liability for Fines or Legal Actions
The author of CookiEzu shall not be held liable for any fines, penalties, legal proceedings, regulatory enforcement actions, or damages of any kind β including but not limited to GDPR fines (up to β¬20M or 4% of global turnover), CCPA penalties, PDPA enforcement, or civil claims β arising from the use or misconfiguration of this plugin.
4. Compliance Is Your Responsibility
| Your Responsibility | Why CookiEzu Can't Do It for You |
|---|---|
| Accurate Privacy Policy | You must disclose which cookies you use, their purpose, provider, and expiry β specific to your site. |
| Correct Cookie Categorisation | Wrong categories or missing cookies can constitute a violation even with a banner present. |
| Keeping the Plugin Updated | Outdated versions may have bugs affecting consent capture. |
| Verifying the Banner Appears | Caching plugins can silently prevent the banner from loading. Always test in incognito. |
| Knowing Your Applicable Law | GDPR, CCPA/CPRA, PDPA, PIPEDA, LGPD have materially different requirements. |
Contributing
CookiEzu is built by the community, for the community. Every bug report, pull request, translation, and star makes it better for everyone.
How Contributions Work
CookiEzu uses the standard open source fork-and-pull model. Anyone can fork, improve, and submit a pull request β no invitation needed.
The Fork-and-Pull Workflow
git checkout -b fix/dark-mode or git checkout -b feature/csv-export. Never commit to main directly.flyzal/CookiEzu:main. Write a clear title and description. Link related Issues.What We Welcome
.po file for your language to /languages/. Non-English support is a v2 priority.