The cookie bar

There is a lot of discussion about the European Cookie Law. Where each country has his own implementation it isn't that easy to find a way to handle them based on the country, because it doesn't only depend on the country per user, it depends on who you target.

Therefore in the upcoming 3.7-release we implemented the most strict cookie law, which should fullfill for all countries.

How it works

A cookie bar is available in the template (you should include it in your custom theme). The cookie bar is visible the first time a visitor enters the website, when he hasn't a functional cookie set to hide the bar.

When the visitor hasn't a cookie (cookie_bar_agree) set all tracking is disabled and the data send to Google Analytics is anonymised.

When a user clicks he disagrees a functional cookie is set to hide the cookie bar, and a cookie (cookie_bar_agree) is set to false. The cookie bar will not be visible from then on. When this happens no tracking is done, and the data for Google Analytics is anonymised.

When a user clicks he agrees the same the cookie for hiding the bar is also set, and the cookie_bar_agree-cookie is set to true. From then on the cookie bar will not be visible, the Fork-tracking is enabled and the data for Google Analytics isn't anonymised anymore.


  • The first visit of a user will always be anonymized.
  • If a visitor doesn't allow cookies, the visitor will be unique for each request.


This method returns if a visitor has allowed the usage of cookies. If you are using tracking-cookies in your own code, you should use this method to check if it is allowed.


Jacob wrote 8 years ago

Great improvement, so we dont have implement it ourselfs.

I saw this module on Github already. I was a bit curious but didn't test it.

When will version 3.7 released?


Tijs wrote 8 years ago

Will be released in the near future, feel free to check it on github:

Koen wrote 8 years ago

Thanks Tijs! I'll definitely use this in the future.


Solutis wrote 8 years ago

Thank you for your feedback Tijs.