160

Product support

Get help in the plugin support forum.

Categories

EU laws require sites to let the user know if cookies are stored on their devices. Depending on EU country there are different types of compliance implementation. Usually scripts like this one only offer notifications and they don't implement real opt-in or opt-out compliance. This plugin offers October CMS implementation of Cookie Consent JS, additional Twig template function for easier checks whether or not to serve cookies and additional JS that cleans all cookies if user declines to accept cookies.

Attribution

The Cookie Consent JS we link to is developed by Insites and released under MIT. Icon made by Freepik from www.flaticon.com and released under CC 3.0.

This plugin integrates the popular Cookie Consent tool in your theme. It requires the theme to have the scripts and styles placeholder.

Simply configure the settings from the backend interface (Settings -> MISC -> EU Cookie Law Madness) and then it automatically runs on the frontend.

This is only Javascript frontend (as all other plugins)! It sets cookies based on user decision whether to allow or reject cookies. You will need to code your PHP to check upon users decision before setting any cookies.

There is a view helper allow_cookies that you can call from twig template.

Example:

{% if allow_cookies()  %}
// javascript for serving cookies like Google Analytics etc
{% endif %}  

If you need to access user decision, cookie is named cookieconsent_status unless you renamed it in configuration.

Cookie can have values:

  • dismiss
  • allow
  • deny
  • Found the plugin useful on 6 Feb, 2023

    Thank you for your work it all works in 2023 and looks like your plugin is the only 1 that is working on the newest CMS 3.+.+ versions

    Thank you

  • Found the plugin useful on 21 Jan, 2021

    I select that this plugin is useful just for the backend options.

    VM9315 cookieconsent.min.js:134 Uncaught TypeError: Cannot read property 'firstChild' of null at n.u (VM9315 cookieconsent.min.js:134) at n.initialise (VM9315 cookieconsent.min.js:284) at new n (VM9315 cookieconsent.min.js:74) at VM9315 cookieconsent.min.js:496 at Object.e.getCountryCode (VM9315 cookieconsent.min.js:508) at Object.e.initialise (VM9315 cookieconsent.min.js:495) at (index):85 n.initialise @ VM9315 cookieconsent.min.js:284 n @ VM9315 cookieconsent.min.js:74 (anonymous) @ VM9315 cookieconsent.min.js:496 e.getCountryCode @ VM9315 cookieconsent.min.js:508 e.initialise @ VM9315 cookieconsent.min.js:495 (anonymous) @ (index):85

    Something was wrong and I can't figure out what. I followed the instructions.

  • Found the plugin useful on 28 Apr, 2020

    This plugin is good and do the job.

    But the way it render the banner is kind of weird: the plugin request the settings with PHP, PHP generate a Javascript object from these settings then finally javascript create the DOM Elements.

    No partial is used so we can't override it to fully customize it from scratch, it's really a shame on a CMS where the partials is the law for override plugin's components.

  • Found the plugin useful on 22 Oct, 2019

    Really nice plug-in... multilinguage would be really sweet!

  • Found the plugin useful on 26 May, 2017

    Support this plugin multilanguage website? For example with https://octobercms.com/plugin/rainlab-translate

    THX

  • author

    Replied on 2 Jun, 2017

    Hey Petr

    Thanks for review. At the moment I dont support rainlab translate since I have build this extension for my own projects and didn't need multilingual support there. If I will need this functionality I will surely share the code for it.

    I would also gladly approve any pull requests ;)

1.0.2

CS locale added

Nov 09, 2016

1.0.1

Initialize plugin.

Oct 10, 2016