iubenda Cookie Solution for GDPR


This plugin is an All-in-One approach developed by iubenda that helps to make your website GDPR compliant by generating the privacy policy text, the cookie banner and the blocking management of cookies.

This plugin works with the iubenda Cookie Law Solution and allows to block the most common widgets and third party cookies to comply with Cookie Laws, particularly with the Italian cookie law implementation in mind.

  • The plugin automatically inserts the iubenda code in the head of every page of the site
  • It allows to manually block all the remaining resources, without the need of direct intervention on the code
  • It handles the display of cookie banners and cookie policy, saving user preferences about the use of cookies
  • It displays a clean page (without banner) to users who have already provided their consent
  • It detects bots/spiders and serves them a clean page

The plugin is currently capable of automatically detecting and blocking the following scripts:

  • Google Analytics
  • Google Maps
  • Google AdSense
  • Google ReCaptcha
  • Google Site Search
  • Google Tag Manager
  • Google oAuth
  • Google+ widgets
  • Twitter widgets
  • Facebook widgets
  • Facebook Comments
  • YouTube
  • Vimeo
  • Linkedin widgets
  • ShareThis widgets
  • Instagram widgets
  • AddThis widgets
  • Pinterest widgets
  • PayPal widgets
  • Disqus
  • Optimizely
  • Neodata
  • Criteo
  • Outbrain
  • Headway
  • Codepen
  • Freshchat
  • Uservoice
  • AdRoll
  • Olark
  • Segment
  • Kissmetrics
  • Mixpanel
  • Pingdom
  • Bing
  • Elevio

Some background information

If you have European users you will know the problem: you need to obtain consent for the usage of many types of cookies and you need to manage that consent somehow. Now even Google forces cookie consent onto users of Google AdSense, DoubleClick for Publishers, and DoubleClick Ad Exchange (and even Google Analytics in some cases). Time to get started with a cookie banner.

iubenda and the Cookie Law Solution extension for WordPress help remove these complex tasks with a couple of clicks. This extension works with the iubenda Cookie Law Solution, displays a cookie banner in 8 languages and saves consent for returning users.

Which languages does iubenda work in currently?

  • Englisch
  • Italienisch
  • Französisch
  • Spanisch
  • Portuguese (Brazilian)
  • Deutsch
  • Dänisch
  • Russisch

Manual Usage

How to make the plugin manually work for a Facebook button?

(function(d, s, id) {
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return;
 js = d.createElement(s); js.id = id;
 js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=808061959224601";
 fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

If there are HTML / IMG / IFRAME elements, you need to proceed in this way:

      <iframe src="...
      <img src="...

Inside a post/page content there’s a shortcode available:


In case of continued browsing, the preferences of your users for the use of cookies will be set on „OK“ to clear the banner and unlock the cookies. Moreover, banners and the blocking codes will not be delivered to subsequent visits by users who have already given their consent (and such preference will be updated at each subsequent visit for the future).


  • This screen shot shows the default banner on top of our test site testkada4.altervista.org/cookie-test/example2.html
  • When clicking on the cookie policy link, the user gets a view of the entire cookie policy, where they ultimately can give their consent
  • It's as simple as copy-pasting the code from iubenda into the plugin form.


  • Search in your WordPress plugins admin panel for „iubenda Cookie Solution“, install it;
  • Once the plugin is installed and activated, go to the Admin Panel -> iubenda menu where you will be asked to paste the code into tht field that gets generated from your Iubenda account dashboard when you activate the cookie law kit for your privacy policy. For more information on how to activate the cookie law kit, see this article: https://www.iubenda.com/it/help/posts/680;
  • At this point the plugin will begin to show the banner on which displays your cookie policy (link) to users who visit the site for the first time. No need for other configurations;
  • Furthermore, the plugin automatically recognizes and blocks cookies that get installed via the YouTube video player and social widgets – such as the Facebook Like Box – on your site. Important note the scripts for Facebook, Twitter, G+, and YouTube iframe only get blocked automatically when generated from the server side (therefore processed by PHP via WordPress). Scripts that are added to the page via Javascript after page load cannot be blocked automatically;
  • If you’d like to manually block a specific script „wrap“ it eith the following HTML comments:

  • In case you’re querying WordPress via API, you can disable our plugin by using the iub_no_parse=true URL parameter, like this: www.example.com/api/get_recent_posts?iub_no_parse=true.


Where can I find help?

You can find a dedicated support forum thread here Uservoice forum or we’re happy to answer at info@iubenda.com.

Do you have more guidance, or a demo?

Yes, right here: https://www.iubenda.com/en/help/posts/1177

Bug reports

The best way you can help us is by providing as much information as possible, including the use of wp_debug https://codex.wordpress.org/Debugging_in_WordPress.
We will be very happy to receive feedback here: Uservoice forum


14. Oktober 2019
Sono assolutamente una certezza per quanto riguarda la compliance alle normative sulla privacy. La loro piattaforma permette di generare la privacy policy molto facilmente e lo strumento di sca del sito (anche se da migliorare un po') facilita di certo il tutto. Sto testando anche il plugin sulla consent solution che si collega in automatico a contact form 7 ed è una vera bomba. Per me che faccio siti ma non sono un back-end developer mi ha davvero permesso di rendere i siti totalmente in linea con la GDPR in maniera facile e veloce. È un servizio a pagamento che non costa poco, ma fatto da professionisti dedicati e ogni singolo centesimo è ben speso.
21. September 2018
Pay for this and you're good ... and then it's not true .. you have to pay again
22. Mai 2018
The plugin works just as expected! Even better: the plugin devs are listening to the customers. The plugin claimed a top level position in the WP dash when I installed it the first times. Upon suggesting that this might not be the best way to go the dev team included a new feature in the next release, giving website admins the option to move the plugin options page to the "Settings" menu. Great work guys, cheers!
3. September 2016
Il plugin funziona perfettamente, l'unica piccola pecca, peraltro rilevata dall'analisi di Google è la dimensione delle parti cliccabili, che dovrebbero avere una simesione maggiore per essere fruibili in maniera più semplice. A presto prr le 5 stelle
Lies alle 17 Rezensionen

Mitwirkende & Entwickler

„iubenda Cookie Solution for GDPR“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:




  • New: Introducing a way to skip specific script parsing
  • Fix: Google ReCaptcha with Contact Form 7 initialization issue
  • Fix: Improved handling of iubenda script HTML
  • Tweak: Support links update


  • Fix: Google ReCaptcha loading issue with Contact Form 7
  • Tweak: Improved Youtube and Google Maps script blocking


  • Fix: iubenda script tags removed when Jetpack is active


  • Fix: Skip parsing engine when scripts blocking is disabled
  • Tweak: Update iubenda logo


  • New: Option to block custom scripts and iframes
  • Tweak: Update and extend the list of blocked scripts including Google Site Search, Google oAuth, Linkedin widgets, PayPal widgets, Freshchat, Uservoice
    , AdRoll, Olark, Segment, Kissmetrics, Mixpanel, Pingdom, Bing and Elevio


  • Tweak: Update and extend the list of blocked scripts including Pinterest, AddThis, Disqus, Optimizely, Neodata, Criteo, Outbrain, Headway and Codepen


  • Tweak: Update and unify iubenda parsing engine
  • Tweak: Polylang Pro support


  • Fix: iubenda code field removing HTML tags on save
  • Tweak: Adjusted the script blocking regex in shortcode


  • New: Option to select iubenda menu position
  • Tweak: iubenda faster class regex update
  • Tweak: Enable style tag in iubenda code field
  • Tweak: Changed default parser method


  • New: iubenda_initial_output filter hook


  • Fix: repository issues breaking the update


  • New: Option to delete all plugin data upon deactivation
  • Fix: Code script attributes stripped from default code block
  • Fix: Updated plugin help links
  • Fix: Italian language files not loading properly


  • New: i18 support
  • New: Polylang support
  • Fix: Multiple classes no longer being added to script tags
  • Fix: Buffering action hooks adjustments
  • General rewrite using WordPress coding standards
  • Turned into OOP


  • New: Created a new option that disables the plugin on RSS feeds
  • New: Improved the control that checks if the request content type is HTML
  • Fixed an issue with the banner script
  • Fixed a series of conflicts with UTF-8 special characters caused by the experimental parsing engine


  • New: Introduced a MUCH FASTER experimental parsing engine (visit the plugin options and select the experimental parsing engine)
  • New: Created a new option that allow users to enable/disable the parsing engine and to select the parsing engine between stable and experimental
  • New: Created a new option that filters the output buffer level to get only the first level ()
  • Fixed a series of conflicts with AJAX requests, which were conflicting with Contact Form 7, BackWPUp and other plugins
  • Added filter that only activates the plugin when the Content Type is text/html, enabled by default
  • Loads of bug fixes and speed improvements


  • Rolling back to 1.10.11


  • Hotfix: moved „is_user_logged_in“ method control after the “template_redirect” hook.


  • Fixed a series of conflicts with AJAX requests, which were conflicting with Contact Form 7 and other plugins


  • More bugs fixed
  • The content-type restriction option is now on by default


  • Added filter that only activates the plugin when the Content Type is text/html
  • Loads of bug fixes and speed improvements


  • iub_no_parse parameter reintroduced
  • added XMLRPC control


  • French and Portuguese languages fixed when used with WPML


  • Further bugfixing


  • Further bugfixing


  • Fixed problems with WPML and with using the shortcode


  • Further work on resolving any conflicts with other plugins
  • Fixed a problem with the Media library


  • Reverting the parsing method to 1.9.19, slower but more stable


  • Fixed compatibility with the Yoast SEO plugin (and possibly others)
  • Fixed preference saving after update from 1.9.19


  • Fixed the WPML activation, which now detects the language of the embedding code and places it in the right tab
  • The first tab when WPML is activated is now activated automatically
  • The iubenda shortcode has been improved to be more flexible


  • Fixed an encoding issue


  • Fixed a bug that forced users to re-insert their cookie law code


  • New: Multi-language support with WPML integration
  • New: AdSense auto-matching/blocking has been redone and now works properly
  • New: Addthis and Sharethis are now also automatically blocked
  • Loads of small fixes and improvements


  • Fixed some bugs about i18n, created .pot files for translations. Now is true i18n friendly. Tested.


  • i18n friendly


  • Associate cookie policy for installation before/after WPML


  • Hiding E_NOTICE messages


  • skip parsing if XML-RPC request
  • skip parsing if is admin page
  • added multilanguage


  • new iframe src according to the new doc


  • bug on all iframe, suppressedsrc is not null anymore


  • added another url of google maps embed


  • skip parsing page if bot/crawler + added checkbox to autoparse (or not) the page if the user have already given the consent


  • include bug + google maps


  • Autoconvert iframe vimeo + facebook likebox


  • Now the plugin use iubenda.class.php + fix bug on it.


  • Add iub__no_parse get parameter to skip parsing page


  • Add iub__no_parse get parameter to skip parsing page


  • Another adsense script blocked, another fix on simple html dom


  • Bugs page 60000 chars


  • Added Google Maps & Google Adsense + better shortcode handling


  • minor bugfix


  • bugfix: custom banner now allowed


  • no refresh page needed to activate scripts inside IUB tags.


  • wp-admin blank page bug fix


  • G+ platform bug, typo: _iub_cs_activate_inline vs _iub_cs_activate-inline


  • G+ platform bug


  • Minor improvements


  • Improved parsing without regex
  • No parsing if the user have already given the consent


  • First plugin version.