Module Description
This module provides a simple implementation of the Open Source Consent Management Software Klaro.

Because Klaro is configured using a simple configuration file, this module provides only a field for modifying this configuration. It is better to add Klaro to a project with a simple configuration module, because this allows to change the configuration without deploying a new version of the website.



The module is called Simple Klaro, because it does not offer a feature rich configuration UI and does not integrate with other modules. An alternative module with a more complex configuration UI and integrations with other modules is here.

How to install The module uses the klaro library either by CDN or installed via composer. The recommended setup is to install via composer, but this requires some extra steps.


* Add the composer merge plugin with composer require wikimedia/composer-merge-plugin
* And then add the following to the site's extra section of composer.json: "merge-plugin": { "include": [ "docroot/modules/contrib/simple_klaro/composer.libraries.json" ] }

How it use After enabling this module the consent manager appears automatically on all pages. A permission is provided to bypass Klaro, that can be granted to selected roles.

The consent manager can be integrated with default styles, or without styles, which makes it easy to adapt it to the design of a website.

Also a block is provided with a link to open the consent settings dialog after the settings have been saved. The syntax of the link is <a href="#" id="klaro-preferences">Cookie preferences</a>. Any HTML element with the id klaro-preferences will open the dialog, so a custom button can easily be created.

When the settings of Klaro are changed, all caches are cleared and the changed settings are applied on all pages.

Using the settings the appearance, the applications, all texts, and translations can easily be configured. Translations are displayed based on the lang attribute of the html element. The execution of scripts on the website is by default controlled by changing the script type from text/plain to application/javascript, when the corresponding consent setting is toggled. Additionally, custom callback functions can be invoked. When consent is revoked, cookies can be deleted with regular expressions.

Screenshots Below are some screenshots of different configurations with and without custom styling.













Project Usage
123
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to provide a simple implementation of the Open Source Consent Management Software Klaro, allowing for easy configuration and integration with a website without the need for deploying new versions.
Data Name
simple_klaro

OPENAI CHATBOT

OPENAI CHATBOT

14:28:20
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.