This module provide a cookies banner using Orejime (https://github.com/empreinte-digitale/orejime).
The banner is visible on every page except the administrators section.
This banner allows to accept all cookies, or refuse all cookies, or choose the cookies wanted or not. Furthermore, a description is configurable to explain each cookies and the purpose.
Add this line to your application's Gemfile:
gem "decidim-cookies", git: "https://github.com/OpenSourcePolitics/decidim-module_cookies.git"
And then execute:
bundle install
By default, the decidim's required cookies are enabled (cf: Javascript configuration file)
decidim-cc
_decidim_session
An optional cookie is defined by default in the engine configuration file
matomo
You can add specific cookies to the banner using initializers. Cookies list is fetched from Rails.application.config.cookies
.
Example of cookie in initializer :
Rails.application.config.cookies = [
{
name: "matomo",
title: "Matomo",
cookies: %w(matomo_session pk_id pk_ses _pk_ref _pk_cvar),
purposes: %w(tracking analytics)
}
]
When you add new cookie, you have to provide translation for language activated on platform
- Add your translations in respective locales files
- Add those new translations to the Orejime banner configuration (Configuration has to be outside the JS file because of assets precompilation)
Repeat this process if you create new purpose
Cookies by default on Decidim application
Name | Description | Required |
---|---|---|
decidim-cc | Allows to check if the user has accepted the cookies | [x] |
_decidim_session | Allows to keep the user session active for a limited time | [x] |
Non exhaustive list of cookies you may encounter in a Decidim instance. Those cookies are not by default in Decidim applications.
Name | Description | Required | Documentation |
---|---|---|---|
JSESSIONID | The JSESSIONID cookie is used to store a session identifier so that New Relic can monitor session counts for an application. | [ ] | Link |
Matomo | Allows to track to improve user experience | [ ] | Link |
Google Analytics | Allows to track to improve user experience | [ ] | Link |
Please check the known issues file
See Decidim.
This engine is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.