Smart Cookie Kit


!!! Version 2 of plugin is GDPR compliant – Cookie name for user preferences is now “CookiePreferences-[wp_install_dir]” !!!

Like others plugin, Smart Cookie Kit blocks cookies until the visitor accepts them, but it unlocks them asyncronously (without refreshing the current page): this logic increases server performance, improve user experience, and, more important, makes the plugin compatible with cache plugins!!
Thinked for marketing-oriented sites, this plugin blocks standard scripts and conversion/remarketing scripts (including the “noscript” tag too).

Why I decided to create this plugin?
There are a lot of plugins for cookies management… But:

  • Many work on the server, modifying some code portions directly in the output: if is there a cache system, it will cache the page in the version for the user that “fired” the cache creation (with modified scripts if the user has not accepted cookies, or with the original scripts if the cookies were accepted), and that version will be served to ALL visitors, regardless of their acceptance.
    The problem: it is not possible use cache systems.

  • When user accepts cookies, it is necessary to open another page to have original scripts working. A lot of plugin have done a step forward, making an automatic refresh of the visited page, but web servers have to work again to serve the “correct” page and this may be a serious problem with slow connections (think to mobile devices), heavy pages (without cached pages!!), pages with external resources (Youtube videos, Ads, Social Plugins, …). Has it ever appened that you start reading some content or jump below to search content of interest and the page scrolls back on the top because of a refresh?!
    The problem: worst server performance and user experience.

  • Many lets specify a page that contains cookie policy (to link that in the banner), but often they show the cookie banner in that page too.
    This is not a big problem, I know, but it is a detail! 😉

I searched for a plugins that would not unblock cookies directly in the output from the server, to permit the use of cache systems; more over, I would like “things” faster and smoother without page refreshes and heavy loads.
My research had not satisfactory results (for me), so I decided to write my own plugin!

The main functionality are the following:

  • It recognises and modify automatically scripts, iframes and images to block them (the block happens directly in the output from the server).

  • It permits you to tag code to block.

  • It shows the cookie banner only if it is necessary.

  • It includes in the banner the link to your cookie policy page, and it does not show the banner in that page!

  • Once the user accepts the policy (or when policy is already accepted), it unblocks and run scripts via javascript, without a page refresh. Being via javascript, the unblock happens even if there are active cache systems!


Please write on the WordPress official support area:
For questions, support or suggestions, you could write to: info[-at-]nicolamodugno[-dot-]it


  • Opened banner example, with default settings
  • Closed banner example, with default settings
  • Backend graphic option page (content section)
  • Backend graphic option page (mobile style section)
  • Backend graphic option page (desktop style section)
  • Backend logic option page


To install the plugin and get it working..

  1. Decompress the file ‘’ and upload the dir ‘smart-cookie-kit’ to the dir ‘wp-content/plugins/’ of your WordPress site.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. The plugin is working now with default settings. You can configure it from “Settings” > “Smart Cookie Kit” menù.


Installation Instructions

To install the plugin and get it working..

  1. Decompress the file ‘’ and upload the dir ‘smart-cookie-kit’ to the dir ‘wp-content/plugins/’ of your WordPress site.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. The plugin is working now with default settings. You can configure it from “Settings” > “Smart Cookie Kit” menù.
Does the plugin stores visitors policy acceptance?

Yes, optionally. The plugin can save a log into the server every time a visitor updates his preferences.
The logs are stored and protected from public access in the “/wp-content/cookie-preferences-log/” directory.

IS the plugin compatible with WPML?

To be honest, you could translate the plugin with WPML String Translations addon, but after some tests I think that it provides a really bad user experience.
For this reason I am working to create a better way to manage translations… Please, be patient.

Parse error: syntax error, unexpected ‘[‘ in smart-cookie-kit/plugin_options.php

This problem is caused by the PHP version used on the web server. Please, change your web server configuration (or aks to your system administrator) to use a PHP version >= 5.4 (checking if others components raise errors).

The banner is not responsive / On mobile the banner is not centered

Depending on the theme, the default CSS rules may not be enough to view correctly the banner.
It may help modify the field “CSS for banner content” adding this rule: “box-sizing:border-box;”

Is it possible to remove the minimized button when banner is hided?

Yes, optionally. Update the plugin to the v.2.0.4 🙂


Just Great

A really great plugin! The best cookie tool I use and a real time saver!

Top notch

The dev is very communicative and helpful. Regarding the plugin – this is the only thing that actually works and meet my needs. Other plugins have various problems or miss the crucial functionality.


I tried EVERY famous cookie plugin, but this is the only one which works perfectly with caching plugins. And it offers many customization options. Congrats to developers.

Read all 8 reviews

Contributors & Developers

“Smart Cookie Kit” is open source software. The following people have contributed to this plugin.


“Smart Cookie Kit” has been translated into 2 locales. Thank you to the translators for their contributions.

Translate “Smart Cookie Kit” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Solved a minor bug related to the minimized banner.


  • Added an option to show a “Content not available” placeholder where elements have been blocked in the page.
  • Added an option to choose whether or not to show the minimized button to open the banner.
  • Added a shortcode to get a link that opens the banner.
  • Smart Cookie Kit is now compatibile with Autoptimize.
  • Restored the backlayer option.


  • The log directory has been moved from “/wp-content/plugins/smart-cookie-kit/logs/” to “/wp-content/cookie-preferences-log/”.
  • The log directory has been protected to avoid browser access to its content.
  • Log files has been converted to a csv format.
  • Minor compatibility issues has been fixed.
  • Solved minor translations related bugs.
  • Javascript code has been improved.


  • Solved minor bugs.


  • Solved warning: “The first argument should be either a string or an integer” in plugin_options.php on line 42
  • Sometimes Google Tag Manager was not blocked.
  • Sometimes Google Analytics was blocked even if anonymized.
  • Solved minor bugs.


  • Plugin was modified to be full GDPR compliant!
  • Cookie name to save user preference is changed in “CookiePreferences-[wp_install_dir]”
  • Scroll and click consent deprecated.
  • Added in cookie and in server log informations about first cookie acceptance and following updates.
  • It is possible now to handle Google Tag Manager.
  • Client side code rewrited in pure Javascript: plugin now does NOT require jQuery.
  • Solved minor bugs.


  • Solves an error of the previous update.


  • Yoast SEO compatibility. Solved a compatibility bug with Yoast on “application/ld+json” scripts.


  • W3 Total Cache compatibility. SCK replaces known js scripts with its empty.js but W3TC minification minifies the empty script removing the reference to the original script, so SCK can’t run the original script. Now SCK integrates a filter to exlude it’s empty.js from the W3TC minification.


  • Minor bug fix.


  • Minor bug fix.


  • Smart Cookie Kit blocks now scripts from chat system.


  • Smart Cookie Kit blocks now pixels from PixelYourSite plugin too.


  • Made optional (even if it is active by default) the policy when user scrolls the page (thanks to Angelo for the suggestion).
  • Added an offset to permit to the user to make a little scroll before trigger the implicit consent (thanks to @diegocanal for the suggestion –
  • Added (optionally) option to implicit accept the policy when the user clicks on some elements of the page (it is possible to exclude some).
  • It is now possible to save on the server (as well as on the user browser) a log of users that accept the policy (included the way of acceptance) – thanks to @woodypad for the suggestion,
  • Added a debug mode


  • Solved a bug: some themes don’t print scripts in the footer. Added an option to insert scripts in the header of the page.


The previous version of the plugin was adding a layer to the page content to avoid clicks on any element in the page, so the user had to accept the cookie policy to get the content “available”.
On this version I made that layer optional and disabled for default, thinking that this is a better choice for the search engine spiders.
Also added others options to customize the layout of the banner.


  • Minor bug fix.


  • Minor bug fix.


  • IT Cookie law tutorial added.
  • Minor bug fix (translations related).
  • English translation added.


  • Minor bug fix.


  • Option page added.
  • Plugin is ready for translations.


  • Test version.