EC ‑ GDPR Cookie Banner

By Entangle Commerce

0+ active installationsVersion 1.0.2

A cookie consent banner with script blocking, regional rules, consent records and a cookie scanner. Free, no account needed.

Description

EC ‑ GDPR Cookie Banner shows your visitors a cookie banner and remembers their choice. Scripts are held back only when you mark them, until the visitor accepts that category.

Try it in WordPress Playground: https://playground.wordpress.net/?plugin=entangle-cookie-consent

Main features

  • A cookie banner with Accept, Reject and Preferences, shown as a banner, dialog or box.
  • Cookie categories: Necessary (always on), Statistics, Marketing and Preferences.
  • Regional rules: opt-in, opt-out or notice per country, including Do Not Sell or Share and Global Privacy Control.
  • Scripts you mark are held back until the visitor accepts that category. Works with the WP Consent API.
  • A cookie scanner that lists the cookies and browser storage your site sets.
  • Consent records you can search and export to CSV, plus daily analytics by country and device.
  • The visitor’s choice is stored in their browser for 90 days.
  • Admin screens and default banner texts follow the WordPress site language and the admin user’s profile language. Bundled translations cover the most-used locales (Japanese, Spanish, German, French, Brazilian Portuguese, English UK, Italian, Dutch and Polish). English (US) is the source language.
  • No account and no third-party services. Country detection stays on your own server.

Records and analytics

  • Views, accepts, rejects and custom choices per day, by country and device.
  • A cookie scanner that lists the cookies and browser storage your site uses and sorts them into categories.

Important

A cookie banner is one part of handling privacy. This plugin does not make a website compliant with any law, and it does not provide legal advice. Check your own obligations, your cookie policy and your other tools with a qualified advisor.

External services

This plugin does not connect to any third-party or external service. It does not load fonts, scripts, images or styles from other websites, and it does not send visitor data to any company.

The only outside contact it can make is this:

  • The cookie scanner, run by an administrator from Cookie Consent > Analytics > Cookies, requests the pages of your own site.
  • The optional “Powered by” credit links to entanglecommerce.com only when a visitor clicks it.
  • If you add a MaxMind-format .mmdb file, the plugin reads it from your own server. It never downloads a database.
  • Plugin updates are delivered by WordPress.org through WordPress itself. Language packs may also be updated from translate.wordpress.org; the plugin also ships bundled translations in its languages folder.

Source code

Third-party libraries bundled in compiled files:

  • Chart.js (MIT) – https://www.chartjs.org/
  • react-simple-maps (MIT) – https://www.react-simple-maps.io/
  • world-atlas 110m topojson (ISC) – https://github.com/topojson/world-atlas

Installation

  1. Upload the entangle-cookie-consent folder to /wp-content/plugins/, or install the plugin from the Plugins screen in WordPress.
  2. Activate the plugin.
  3. Open Cookie Consent > Cookie Banner, adjust the banner and switch it on. Activating the plugin leaves the banner off.
  4. If you use a page cache or CDN, purge the cache after saving settings.

FAQ

Does this plugin make my site compliant with GDPR, CCPA or any other law?

No. It gives you the tools to ask for consent and to hold back scripts, but compliance depends on how your whole site is set up and on your legal situation. The plugin does not provide legal advice.

How is the visitor’s country detected?

Only on your own server, in this order: (1) headers set by your host or CDN (Cloudflare CF-IPCountry, CloudFront, Vercel and similar), (2) WooCommerce geolocation, if WooCommerce is active and has its own local database, (3) a local MaxMind-format .mmdb file that you provide. No lookup is sent to an outside service. If no country can be found, the strictest rules for your selected regions are used.

You can change the trusted headers with the entangle_cookie_consent_trusted_country_headers filter. These headers are trusted by default, so if your site is not behind one of these hosts or CDNs, remove them with that filter: otherwise a visitor could send the header themselves. If the site sits behind a proxy and you want to trust a header for the visitor IP, return it from the entangle_cookie_consent_trusted_ip_headers filter, for example array( 'HTTP_CF_CONNECTING_IP' ).

What do visitors outside my selected regions see?

No banner. Their scripts run as if no consent were needed. A visitor whose country cannot be detected is treated as inside your regions and gets the strict rules. With Smart Geo turned on, every visitor sees a banner and the model is chosen per country.

How do I add a .mmdb file?

Download a country or city database in the MaxMind DB format yourself, for example GeoLite2 Country (free with a MaxMind account and subject to MaxMind’s licence) or DB-IP Lite. Upload it to your server in a folder that is not publicly downloadable, then enter its absolute path under Cookie Banner > Regions > Visitor location. The plugin never downloads or ships a database.

How do I add a link that re-opens the cookie settings?

Use the shortcode [entangle_cookie_consent_cookie_settings label="Cookie settings"], or add this HTML anywhere: <a href="#cookie-settings" data-fcc-open>Cookie settings</a>. Any link to #cookie-settings also works. The shortcode prints nothing while the banner is switched off.

How are scripts blocked?

The plugin does not block any script on its own. A script that WordPress loads through its script system (wp_enqueue_script) is printed with type="text/plain" and re-activated by the banner after consent only when its handle is listed in the entangle_cookie_consent_script_gate_handles filter. The page HTML does not depend on the visitor’s choice, so page caches keep working.

To block other scripts, either print them by hand as <script type="text/plain" data-fcc-category="marketing">...</script> (use statistics, marketing or preferences), or map a script handle to a category with the entangle_cookie_consent_script_gate_handles filter. Scripts that are hard-coded in a theme template are not changed automatically. A script that depends on a blocked script is not blocked with it, so block both or neither.

Does it work with the WP Consent API?

Yes. The plugin registers itself with the WP Consent API and keeps the consent categories (functional, preferences, statistics, marketing) up to date.

Does it support right-to-left languages?

Yes. The banner switches to a right-to-left layout for Arabic and Hebrew, or when the page direction is right-to-left.

Can I translate the banner? Does it follow my site language?

Yes. Default banner and admin texts use WordPress translations. When a language pack is available (bundled with the plugin or from translate.wordpress.org), the banner follows the site language (Settings → General → Site Language), and the admin screens follow the user’s profile language. You can still override any banner text on the Content tab; customised text is kept as you wrote it and is not replaced by the language pack.

Bundled locales: Japanese (ja), Spanish Spain (es_ES), German (de_DE), French France (fr_FR), Portuguese Brazil (pt_BR), English UK (en_GB), Italian (it_IT), Dutch (nl_NL) and Polish (pl_PL). English (US) is the source language. Further locales can be added via WordPress.org language packs when available.

What data does the plugin store?

The visitor’s choice is stored in their own browser for 90 days. When a visitor makes a choice, the site stores a consent record (random consent ID, choices, page address, date, country, device, language, policy version and a partly masked IP address) and anonymous daily counters. Consent records are deleted after 12 months; change this with the entangle_cookie_consent_consent_retention_months filter. The daily counters are kept for about 25 months (761 days); change this with the entangle_cookie_consent_analytics_retention_days filter. The full IP address is never stored. Settings are stored in WordPress options and the records in four database tables. Deleting the plugin removes all of it.

How are saved preferences counted in the analytics?

By what the visitor allowed: as accepted when every category was allowed, as rejected when none was, and as a custom choice otherwise.

Can I see which cookies my site sets?

Yes. Open Cookie Consent > Analytics > Cookies and run a scan. The scanner loads a few pages of your own site (home page, latest post, privacy policy and, with WooCommerce, the shop, cart and account pages), reads the cookies and storage keys it finds and sorts them into categories. You can change a category or add a cookie by hand.

Where can I get help?

Email support@entanglecommerce.com. The address is also shown at the top of Cookie Consent > Help Center, above the frequently asked questions.

Screenshots

Changelog

1.0.2

  • Added bundled translations for the top WordPress locales: Japanese, Spanish (Spain), German, French (France), Portuguese (Brazil), English (UK), Italian, Dutch and Polish. The UI follows the WordPress site language and the admin user’s profile language; custom Content-tab text is left unchanged.

1.0.1

  • Renamed the plugin to EC ‑ GDPR Cookie Banner.
  • Fixed the Analytics error “Unable to load analytics data.” that appeared after the site cookies were cleared. The screen now refreshes the security token and, if the admin session has expired, sends you to the login page and back to Analytics.
  • Clarified the Consent Records export ranges (today, yesterday, the last 7, 14 or 30 days, or all records kept).
  • Set the consent storage duration to 90 days.

1.0.0

  • Initial release.