Cookie Choices (for EU Cookie Law & GDPR)

By overclokk

★ 4.5/5 (35 ratings)9,000+ active installationsVersion 3.2.0

Ask the cookie consent by category and block third party scripts, videos and maps until the consent. With a consent log and Google Consent Mode v2.

Description

Cookie Choices, formerly Italy Cookie Choices, helps you comply with the EU cookie rules: the ePrivacy Directive, art. 122 of the Italian Codice Privacy with the 2021 guidelines of the Garante, and the GDPR consent requirements.

The banner asks the consent by category, with three buttons of the same importance: accept all, reject all and preferences. The scripts, the videos and the maps of the third parties wait for the consent to their category. The consent is read in the browser, so the plugin works with the cached pages.

What you can do

  • Show a banner at the top, at the bottom, in a modal window or in a box in a corner, with your logo, text, colors and CSS
  • Let the visitors choose the categories: necessary, preferences, statistics and marketing
  • Share the consent with the subdomains of the site, with the cookie domain
  • Choose after how many months the banner asks the consent again, 6 by default
  • Respect the Global Privacy Control of the browser: accept all leaves out the marketing cookies
  • Block Google Analytics, Google Tag Manager, Google Ads, AdSense, Microsoft Clarity and Advertising, YouTube, Vimeo, Google Maps, Facebook, Instagram, X, LinkedIn, TikTok, Pinterest, Snapchat, Reddit, HubSpot, Spotify, SoundCloud, Hotjar and Matomo Cloud until the consent, and add your own vendors
  • Show a placeholder with a button to accept the category of the blocked videos and maps
  • Let the visitors change or withdraw the consent with a block, a shortcode, a link or a floating button
  • List the cookies of the site in a table for the cookie policy, with the Cookie table block or the [cookie_table] shortcode
  • Delete the cookies of a category when the visitor refuses or withdraws it
  • Log the consents to demonstrate them, without IP addresses, and export the log as CSV
  • See how the visitors answer the banner, month by month, from the consent log
  • Send the Google Consent Mode v2 signals, in the basic or advanced mode
  • Send the consent to Microsoft Advertising (UET) and Microsoft Clarity
  • Write the consent to the WP Consent API, for WooCommerce, Site Kit and the other plugins that read it
  • Let the AI tools read the settings and turn the vendors on or off, with the Abilities API of WordPress 6.9
  • Print Google Analytics, Google Tag Manager and the Facebook pixel from their ids
  • Preview the banner while you change the settings
  • Translate the texts with WPML, Polylang, TranslatePress and Weglot, the plugin is translated in Italian
  • Import the settings of the 2.x versions
  • Manage the settings and the consent log with the wp cookie-choices commands of WP-CLI
  • Share the settings of the main site with every site of a multisite network, each site with its own texts

Documentation

Please report the issues on GitHub.

This plugin provides technical tools, not legal advice. Check with your consultant what your site needs.

Developers

Translators

Translations

  • English: default, always included.
  • Italian: Italiano, sempre incluso.
  • Romanian: Română, inclus.

Note: This plugins is localized/ translateable by default. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful. For translating I recommend the awesome “Codestyling Localization” plugin and for validating the “Poedit Editor”.

Additional Info

Idea Behind / Philosophy: Italy Cookie Choices allows you to easily comply with the european cookie law, showing
a notice to the user only the very first time that visits your website without degrading website performance..

Credits

Installation

  1. Install the plugin from Plugins > Add New, or upload the italy-cookie-choices folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Configure it in Cookie Choices in the admin menu and turn on Show the banner

FAQ

I updated from 2.x, what changes?

Your settings are migrated, but the visitors give the consent again, because the 2.x consent had no categories. Read Upgrading from 2.x before you update, and test the update on a staging site first.

Why am I not seeing the banner?

Check that Show the banner is on, then open the site in a private window: you probably already gave your consent. The banner does not open by itself on the policy page and on the excluded pages.

How can the visitors change their choice?

Turn on Show a floating button to change the consent in the Banner tab, or add the Cookie preferences button block, the [cookie_preferences] shortcode or a link to #icc-preferences to the footer or to the cookie policy page. It opens the preferences, where the visitor can change or withdraw the consent.

A script of my theme is not blocked

The plugin blocks the vendors in the content, in the widgets, in the embeds and in the scripts added with wp_enqueue_script(). Add the vendor in Blocking > Custom vendors, or turn on Block the vendors in the whole page for the scripts printed directly in the page.

Does it work with the cache plugins?

Yes. The banner and the blocked content are the same for every visitor, the consent is read in the browser.

Is the consent log personal data?

The log has a random id created by the browser, the accepted categories, the policy version and the date, without IP addresses. The plugin suggests a text for your privacy policy in Settings > Privacy.

How do I check the consent in my code?

In JavaScript use window.italyCookieChoices.hasConsent( 'statistics' ), in PHP apply_filters( 'italy_cookie_choices_has_consent', false, 'statistics' ). Read Integrations for the events, the vendors and the Consent Mode.

Screenshots

Changelog

3.2.0

  • A cookie table for the cookie policy, with the Cookie table block or the [cookie_table] shortcode, and the cookies of the refused categories are deleted
  • More common vendors to block: Google Ads, AdSense, Microsoft Clarity and Advertising, Pinterest, Snapchat, Reddit, HubSpot, Matomo Cloud and Google reCAPTCHA, off by default
  • The consent is sent to Microsoft Advertising (UET) and Microsoft Clarity, on by default
  • A floating button to change or withdraw the consent
  • The banner in a box in the bottom left or right corner, with a logo from the media library
  • The statistics of the consent log, month by month
  • The Global Privacy Control of the browser is respected: accept all leaves out the marketing cookies, on by default
  • The consent lasts 1, 3, 6 or 12 months, and it can be shared with the subdomains with the cookie domain
  • On a multisite network every site can use the settings of the main site, with its own texts
  • The wp cookie-choices commands of WP-CLI and the abilities of the Abilities API of WordPress 6.9, for the AI tools
  • TranslatePress and Weglot translate the banner, documented
  • Only http and https addresses load in the blocked frames

3.1.0

  • The consent is written to the WP Consent API: WooCommerce, Site Kit and the other plugins that read it no longer see a full consent before the choice
  • The Google tags served from the site domain by the Google tag gateway wait for the consent, by their id or by the new Google tag gateway path setting
  • The consent lasts six months in Safari too, the server sets the consent cookie again after each choice

3.0.1

  • The scripts selected in the 2.x lists, saved without a text, are migrated too
  • The text of the 2.x button that closed the banner, like “Close”, is no longer used for the button that accepts every category: it shows “Accept all”, translated
  • The bundled translations win over an older language pack of WordPress.org, the 2.x Italian pack showed the new texts in English

3.0.0

A rewrite of the plugin for the current consent rules. Read Upgrading from 2.x before you update.

  • Requires PHP 8.2 and WordPress 6.5
  • New banner with accept all, reject all and preferences buttons of the same importance, accessible from the keyboard and the screen readers
  • Consent by category: necessary, preferences, statistics and marketing, stored for six months in the new icc_consent cookie
  • Removed the consent on scroll and on the second page view, they are not a valid consent
  • The common vendors are always blocked until the consent, without buffering the page, with a placeholder for the blocked videos and maps
  • Custom vendors with their category, and the addresses never blocked
  • The visitors change or withdraw the consent with the Cookie preferences button block, the [cookie_preferences] shortcode or a link to #icc-preferences, the [delete_cookie] shortcode works again
  • Consent log, without IP addresses, with a retention period and the CSV export
  • Google Consent Mode v2, basic or advanced, and the Google Analytics, Google Tag Manager and Facebook pixel tags from their ids
  • New settings page with a live preview, the import and the export of the settings, in its own admin menu
  • Renamed to Cookie Choices, the plugin works in every EU country
  • WPML and Polylang translate the texts again, Italian translation included
  • Removed the icc_js_array and icc_output_html filters and the Ceceppa Multilingua support, deprecated the icc_bots filter
  • New PluginLoaded event, the icc_plugin_loaded action still fires

2.6.0

Release Date: Oct 21st, 2026

  • Requires PHP 7.4 and WordPress 6.1, tested up to WordPress 7.1
  • Updated all the dependencies, now prefixed to avoid conflicts with other plugins and themes that use the same packages
  • Added integration and end to end tests, static analysis and continuous integration to prepare the refactor

2.5.3

Release Date: Sep 29th, 2021

Dev time: 2h

LATEST VERSION FOR PHP 5.3

  • This fixes issue #212
  • And it’s time to start a refactoring for this plugin, too much legacy code and too much shitty code

2.5.2

Release Date: November 13rd, 2018

Dev time: 30m

  • This is only an update for the upcoming WordPress 5.0
    No changes are made.

2.5.1

Release Date: Dicember 4th, 2016

Dev time: 4h

  • Fixed server error 500 on php7 if advanced-cache.php doesn’t exist.

2.5.0

Release Date: November 13th, 2016

Dev time: 4h

  • Code refactoring for psr-4

2.4.5

Release Date: October 9th, 2016

Dev time: 1h

2.4.4

Release Date: January 6th, 2016

Dev time: 10m

2.4.3

Release Date: January 5th, 2016

Dev time: 10h

  • Fixed Ceceppa Multilingua string translations bug #152 and

2.4.2

Release Date: December 29th, 2015

Dev time: 1h

  • Fixed PHP7 Fatal error #149
  • Walking to WPCS

2.4.1

Release Date: November 6th, 2015

Dev time: 50h

2.4.0

Release Date: August 31th, 2015

Dev time: 11h

  • Added import/export functionality
  • Maybe fixed #133
  • Fixed PHP check for lang functions #128

2.3.5

Release Date: July 25th, 2015

Dev time: 3h

2.3.4

Release Date: July 22th, 2015

Dev time: 10min

2.3.3

Release Date: July 21th, 2015

Dev time: 2h

  • Fixed #126 and #103 for Sitemap and feed page

2.3.2

Release Date: July 17th, 2015

Dev time: 1h

2.3.1

Release Date: July 13th, 2015

Dev time: 3h

  • Added link to setting page and docs in plugins panel
  • Fixed issue #118

2.3.0

Release Date: July 11th, 2015

Dev time: 50h

2.2.2

Release Date: July 1st, 2015

Dev time: 3h

2.2.1

Release Date: July 1st, 2015

Dev time: 10h

2.2.0

Release Date: June 24th, 2015

Dev time: 100h

2.1.0

Release Date: June 5th, 2015

Dev time: 100h

2.0.0

Release Date: June 5th, 2015

Dev time: 60h

  • Merged Third part cookie eraser and Italy Cookie Choices
  • Added new input for banner background color and text color
  • Added input for text and button in embed block content and widget
  • Added shortcode button for policy page [accept_button]

1.2.3

Release Date: May 31th, 2015

Dev time: 3h

  • Added slug input for your cookie policy page to display only topbar
  • Added option for target _blank

1.2.2

Release Date: May 29th, 2015

Dev time: 1h

1.2.1

Release Date: May 28th, 2015

Dev time: 2h

1.2.0

Release Date: May 27th, 2015

Dev time: 20h

1.1.3

Release Date: May 26th, 2015

Dev time: 5h

  • Fixed admin UX https://github.com/overclokk/italy-cookie-choices/issues/14
  • Fixed Typo in lang
  • Changed WP compatibility to 4.1
  • Added noscript in case browser has JavaScript disabled https://github.com/overclokk/italy-cookie-choices/issues/8
  • Fixed click event https://github.com/overclokk/italy-cookie-choices/issues/15

1.1.2

Release Date: May 22st, 2015

Dev time: 10min

  • Fix z-index issue

1.1.1

Release Date: May 22st, 2015

Dev time: 1h

  • Add scroll event

1.1.0

Release Date: May 22st, 2015

Dev time: 10h

  • Fix special char visualization
  • Add italian translations
  • Removed default text

1.0.0

Release Date: May 21st, 2015

Dev time: 50h

  • First release.