Documentation

Cookie Solution – WordPress Plugin Installation Guide

The WordPress plugin by iubenda allows you to automate the implementation of Cookie Law regulations, thus drastically reducing the need for direct interventions in the code of the site.

Requirements
  • jQuery 1.4.4 or higher
  • WordPress 4.0 or higher
  • PHP 5.2.4 or higher (5.3+ is recommended)
iubenda Cookie Solution Plugin for WordPress

Functionality

  • The plugin automatically adds the iubenda code to all the pages of a site (to the HEAD section)
  • Allows the manual blocking of all other resources without direct intervention on the actual scripts
  • Manages the visualization of the banner and of the cookie policy, as well as the saving of the consent preferences by the users regarding the installation of cookies
  • Allows the management of the iubenda Cookie Solution for multilingual sites using WPML. More information regarding this can be found in this article
  • 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
  • AdRoll
  • AddThis widgets
  • Bing
  • CodePen
  • Criteo
  • Disqus
  • Elevio
  • Facebook Comments
  • Facebook widgets
  • Freshchat
  • Google AdSense
  • Google Analytics
  • Google Maps
  • Google ReCaptcha
  • Google Site Search
  • Google Tag Manager
  • Google oAuth
  • Google+ widgets
  • Headway
  • Instagram widgets
  • Kissmetrics
  • LinkedIn widgets
  • Mixpanel
  • Neodata
  • Olark
  • Optimizely
  • Outbrain
  • PayPal widgets
  • Pingdom
  • Pinterest widgets
  • Segment
  • ShareThis widgets
  • Twitter widgets
  • UserVoice
  • Vimeo
  • YouTube

Instructions

  1. Download the plugin from the WordPress plugin repository. Access the administration panel within WordPress and click on Plugin > Add New Plugin > iubenda Cookie Solution. Then install and activate it.

  2. Once it’s been installed, access the Settings panel where you’ll be asked to fill in the script that was generated in your iubenda account when you activated the cookie policy and the iubenda Cookie Solution (if you haven’t please do so now). For more information on how to activate the iubenda Cookie Solution, consult this guide

  3. At this point the plugin will start to show the banner that your cookie policy will link to users who visit for the first time without the need for further configuration

  4. In addition, the plugin automatically recognizes and blocks cookies from third parties as listed above

  5. The other scripts for which there isn’t an automatic block yet – and that install cookies that require blocking prior to user consent – should be “wrapped” using these comments:

    <!--IUB-COOKIE-BLOCK-START-->
    <!--IUB-COOKIE-BLOCK-END-->
    

    For example a conversion pixel for Google Ads would be handled this way:

    <!--IUB-COOKIE-BLOCK-START-->
    <script type="text/javascript">
        /* <![CDATA[ */
        var google_conversion_id =CONVERSION_ID;
        var google_conversion_label = "CONVERSION-LABEL";
        var google_custom_params = window.google_tag_params;
        var google_remarketing_only = true;
        /* ]]> */
    </script>
    <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
        <div style="display:inline;">
            <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/1030205862/?value=0&amp;guid=ON&amp;script=0"/>
        </div>
    </noscript>
    <!--IUB-COOKIE-BLOCK-END-->
    

    If however there are parts of HTML/IMG/IFRAME, you’ll need to take these steps:

    <!--IUB-COOKIE-BLOCK-START-->
    <iframe src="...
    <img src=" width="300" height="150">
    <!--IUB-COOKIE-BLOCK-END-->
    

  6. For WordPress posts (as opposed to the above template level as for example footer.php) there are shortcodes available:

    [iub-cookie-policy]
    [/iub-cookie-policy]
    

  7. In the event of continued browsing by the user, the latter’s cookie use preference will be set to “yes” thereby removing the banner and releasing the cookies. Moreover, banners and blocking codes will not be delivered on the user’s subsequent visits since consent is registered as granted (these preferences will update at each visit).

Further information

For API calls and xmlrpc we suggest the following parameter ?iub_no_parse=1: this will place the iubenda script in a disactivated state and therefore avoids all parsing/replacing operations.

1.15.4

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

1.15.3

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

1.15.2

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

1.15.1

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

1.15.0

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

1.14.2

New: iubenda_initial_output filter hook

1.14.2-beta1

Fix: repository issues breaking the update

1.14.1

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

1.14.0

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

1.11.1

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

1.11.0

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

1.10.21

Rolling back to 1.10.11

1.10.20

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

1.10.19

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

1.10.18

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

1.10.17

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

1.10.11

iub_no_parse parameter reintroduced
Added XMLRPC control

1.10.10

French and Portuguese languages fixed when used with WPML

1.10.9

Further bugfixing

1.10.9

Further bugfixing

1.10.8

Fixed problems with WPML and with using the shortcode

1.10.7

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

1.10.5

Reverting the parsing method to 1.9.19, slower but more stable

1.10.4

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

1.10.3

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

1.10.2

Fixed an encoding issue

1.10.1

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

1.10.0

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

1.9.28

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

1.9.27

i18n friendly

1.9.26

Associate cookie policy for installation before/after WPML

1.9.25

Hiding E_NOTICE messages

1.9.24

Skip parsing if XML-RPC request
skip parsing if is admin page
Added multilanguage

1.9.19

New iframe src according to the new doc

1.9.18

Bug on all iframe, suppressedsrc is not null anymore

1.9.17

Added another url of google maps embed

1.9.16

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

1.9.15

Include bug + google maps

1.9.14

Autoconvert iframe vimeo + facebook likebox

1.9.13

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

1.9.12

Add iub__no_parse get parameter to skip parsing page

1.9.11

Add iub__no_parse get parameter to skip parsing page

1.9.10

Another adsense script blocked, another fix on simple html dom

1.9.9

Bugs page 60000 chars

1.9.8

Added Google Maps & Google Adsense + better shortcode handling

1.9.7

Minor bugfix

1.9.6

Bugfix: custom banner now allowed

1.9.5

No refresh page needed to activate scripts inside IUB tags.

1.9.4

wp-admin blank page bug fix

1.9.3

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

1.9.2

G+ platform bug

1.9.1

Minor improvements

1.9

No parsing if the user have already given the consent

1.0

First plugin version

Note: we’re happy to receive feedback, the best option at the moment is this forum by Uservoice.

What are the compliance obligations for different cookie typologies?

We’ve prepared a table (Italian only) to better understand which categories of cookies require the banner, preemptive consent, notification to the appropriate regulatory body and so on.

How to install a Beta version of the Plugin

We often provide updated versions of our plugin which are unstable during the testing phase as Beta versions are.

To install a Beta version of the plugin, the first thing to do is install an external plugin called “WP Rollback”, which allows you to select an unofficial version of our plugin.

WP Rollback installation

Please note: WP Rollback requires a WordPress version above 4.0.

As for other plugins, you can install WP Rollback by accessing the Plugin area in your WordPress admin panel and clicking on “Add new”; from here you can search for “WP Rollback” and install it.

After the installation and activation, it will be necessary to go back to the page in which all the installed plugins are listed. Here you’ll notice that “Rollback” will have appeared next to every entry.

All that needs to be done now is to look for the “iubenda Cookie Solution” plugin and click on the “Rollback” entry. Here you’ll find all the different versions of the plugin; the version currently in use will be labelled “installed version”, while the Beta versions will be labeled as such.

To install and test the Beta version of the plugin, simply click on the Beta entry you wish to use. This will cause the current version of the Plugin to be overwritten by the Beta version; to revert the process, the same process will have to be undertaken, the difference being the selecting of the previous stable version and not the Beta one.

How to signal a bug or request support

To signal a bug please visit this link and provide a clear and detailed description of the problem.

It’s always useful to attach the debug information provided by WordPress along with your request for support. To access the debug information, you must open the WordPress installation folder and look for the file named wp-config.php.

Once inside, please look for the following line:

define('WP_DEBUG', false);

Modify it to:

define('WP_DEBUG', true);

Once the file saved, open a page on your WordPress and the debug information will start to appear. Keep our plugin active and send us any errors or messages shown by WordPress.

See also

Still have questions?

Visit our support forum Email us