Skip to content

About

EU cookie law extension for Winter CMS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EU Law Cookie

EU law requires sites to let the user know if cookies are stored on their devices. Depending on the 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 script offers Winter 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.

Configuration

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 and then it automatically runs on the frontend. Please see how to prevent cookies section as well. Remember that you are solely responsible for any law and regulation compliance.

Compliance types

  • info (always serve cookies)
  • opt-in (don't serve cookies unless explicit permission)
  • opt-out (serve cookies unless visitor declines serving)

Prevent cookies

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

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.

About

EU cookie law extension for Winter CMS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages