Easy Cookie Law

Description

Easy Cookie Law helps you to easily comply with the European cookie law. It shows a customizable notice to the user until he accepts the use of cookies in your website.
The message, position, and style of this notice can be easily modified through the plugin menu.

This plugin is good for your SEO since it will not add any CSS stylesheet or Javascript file. Everything is inline and kept to a minimum (<2KB).

It is also totally compatible with any cache plugin since only JavaScript code is responsible checking if the user already accepted the use of cookies, to show and to hide the banner, without any use of PHP, so your websites can be cached to HTML without a problem.

If you use Google Tag Manager, you can put the required scripts on your website directly with this plugin.

For detailed information see Easy Cookie Law WordPress Plugin.

Screenshots

  • Easy Cookie Law Options Menu

Installation

  1. Upload ‘easy-cookie-law’ folder to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Configure the plugin throught Settings -> Easy Cookie Law

FAQ

How does it work?

When a user visits your site, the plugin will check if this user has already accepted the use of cookies, (using a session cookie). If the user has not this cookie, a message will be shown (you can configure where, how and what will be shown). If the users keep surfing
in your web, now or within the next month, it means that he accepted the use of cookies in your website, so this message will not be shown again.

For detailed information see Easy Cookie Law WordPress Plugin.

Why am I not seeing the message?

Probably, you already have visited the site before, so you accepted the use of cookies and the plugin installed a cookie in your browser to know it. If you want to test if the plugin is working properly, try removing the cookies of your web browser or navigating in incognito mode.

For detailed information see Easy Cookie Law WordPress Plugin.

How do I block some scripts of loading or using cookies until cookes are accepted

If you are using Google Tag Manger, you just have to put the code on your website using our Plugin (go to Settings -> Easy Cookie Law).
If you are usiny any other scripts, you can wrap them within the JavaScript function ecl_is_cookie_accepted() like this:

<script>
    if(ecl_is_cookie_accepted()){
        .. your JS Code here ..
    }
</script>

Please, make sure you are calling this function somwhere after after the wp_head() WordPress function. For instance, you can use it within the <body></body> tags.

If this JavaScript code is not working or you prefer to use PHP code, you can also use this function within your theme:

<?php if(function_exists('ecl_is_cookie_accepted') && ecl_is_cookie_accepted()): ?>
    .. your JS Code here ..
<?php endif; ?>

Reviews

February 13, 2019
This plugin really helped us, not only with the cookies but also with the SEO of the site, since the load time of the website is not being influenced at all with this plugin.
Read all 4 reviews

Contributors & Developers

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

Contributors

Translate “Easy Cookie Law” into your language.

Interested in development?

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

Changelog

2.6

  • Added more styling options

2.5

  • Added textarea for custom styles

2.4

2.3

  • Fixed some small JavaScript bugs

2.2

  • Added support for Google Tag Manager
  • Added some translations

2.1

  • Bug fix on JavaScript
  • Refactoring of code
  • Link target option added

2.0

  • Minor JavaScript improvements

1.9

  • Bug fix on php version

1.8

  • Some minor bug fixes

1.7

  • Bugfix in output string (Thanks to Giomba)

1.6

  • Updated to WordPress v4.9

1.5

  • Updated to WordPress v4.6

1.4

  • Updated to WordPress v4.3

1.3

  • Updated to WordPress v4.2.1

1.0

  • First published version.