Orejime

Module Drupal Illustration Voir sur Drupal.org
Nb téléchargements : 178

Components

  • Code
  • Documentation
  • Miscellaneous
  • User interface

Images


Licence

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

permet d'intégrer la lib JS Orejime qui permet de sélectionner les cookies sur un site

Release

Status : Published
Projects : Modules
Maintenance status : Actively maintained
Development status : Under active development
Supported Branches : 2.0.
shield Stable releases for this project are covered by the security advisory policy.


Description

Summary

Orejime is an open-source JavaScript library you can use on your website to let users choose what third-party cookies they allow. It's specifically made to comply with the GDPR. Orejime is a fork of Klaro that focuses on accessibility. It follows Web Content Accessibility Guidelines (WCAG) via the French RGAA.

The final goal is to make certain scripts available only if the user accepts it on a modal. This therefore prevents the creation of cookies.

This module is an implementation of this library. The objective is to provide a back office allowing the administrator to directly manage the options of this library (Texts, List of services…).

This implementation is sponsored by the GAYA web agency.

Requirements

This module requires the css file and js of following library:

We advise you to upgrade to the latest version: 2.2.1

Installation

  1. Install as you would normally install a contributed Drupal module.
  2. Get js and cs files of orejime :
    https://unpkg.com/orejime@||version||/dist/orejime.js
    https://unpkg.com/orejime@||version||/dist/orejime.css
    (Change |version| by the current version of the library)
  3. Add file JS and CSS Orejime in /admin/structure/orejime_service/settings.
  4. Give the url of the privacy policy in /admin/structure/orejime_service/settings
  5. Orejime is ready to use !

Settings Configuration

The page /admin/structure/orejime_service/settings provides a list of parameters.

Global

  • Cookie Name : You can customize the name of the cookie that Orejime uses for storing user consent decisions.
  • Cookie expire after days : You can set a custom expiration time for the Orejime cookie, in days.
  • Cookie Domain : You can provide a custom domain for the Orejime cookie, for example to make it available on every associated subdomains.
  • Privacy Policy : You must provide a link to your privacy policy page
  • URL logo notice : Optional. You can pass an image url to show in the notice.
  • Must consent : "mustConsent" is set to true, Orejime will directly display the consent manager modal and not allow the user to close it before having actively consented or declined the use of third-party apps.
  • Must notice : If "mustNotice" is set to true, Orejime will display the consent notice and not allow the user to close it before having actively consented or declined the use of third-party apps. Has no effect if mustConsent is set to true.
  • UA codes to manage : Liste here UA used in the website.
  • CSS Orejime : Set here the url if you want a different CSS or use external link
  • JS Orejime : Set here the url if you want a different js for orejime or use external link

Ignore settings

This page allow to ignore the library on certain page. This is useful for admin page or privacy policy page.

Languages settings

This page allow to override text of orejime. This text is a yml file. The default file is : https://raw.githubusercontent.com/empreinte-digitale/orejime/master/src/...

Colors settings

You can change the colors of the popin directly in the bo. This option is disabled by default. You need to clear cache after activation.

COOKIES CONFIGURATION

The page /admin/content/orejime_service provides a list of cookies lists (called a service) that a user can accept or reject. It is possible to add or delete them.
A service has different configurations :

  • Sytem name : The system name of the service. This parameter is used internally by Orejime and that serves as a link between the configuration and the scripts.
  • Label : The title of you service as listed in the consent modal.
  • Description : The description of you service as listed in the consent modal.
  • Purposes : Allows you to add purposes to your service. Will be listed on the consent notice. To put several, just separate them with commas.
  • Cookies List : The list of cookies corresponding to this service. If the user withdraws consent for a given app, Orejime will then automatically delete all matching cookies.
  • To get UA code, the token{ga} is available.
  • Scripts : The list of scripts depending on this service. These scripts will be played only if this service is accepted by the visitor.
    Each line corresponds to another file. Just put the name of the JS file (for example locale.translation.js). If several files have the same name it will suffice to put its full path (example: core / modules / locale / locale.translation.js)
  • Required : In order to make a service required. This parameter is mainly used for cookies strictly necessary for the operation of the site.
  • Enabled by default : Sets the default value for the service. If is set to true, the service will be accepted by default on the popin.
  • Published Status : Allows you to publish a service. If unchecked the service will not appear on the popup.

Front Configuration

If you import directly javascript on your template, you need to add the relationship between the service and the script.

For inline scripts, set the type attribute to opt-in to keep the browser from executing the script. Also add a data-name attribute with a short, unique, spaceless name for this script:

<script
   type="opt-in"
   data-type="application/javascript"
   data-name="$SYSTEM_NAME">
$SCRIPT$
</script>

For external scripts or img tags (for tracking pixels), do the same, and rename the src attribute to data-src:

 <script
   type="opt-in"
   data-type="application/javascript"
   data-name="$SYSTEM_NAME"
   data-src="$SCRIPT_URL"></script>

Related modules

Orejime register

Sponsors

The Orejime drupal module was sponsored by GAYA.



Toutes les informations proviennent du site drupal.org