Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

simple_klaro

230 sites Security covered
View on drupal.org

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 useful 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.

  1. Add the composer merge plugin with composer require wikimedia/composer-merge-plugin
  2. 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 to 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.

Activity

Total releases
5
First release
May 2025
Latest release
8 months ago
Release cadence
16 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
1.12.1 Stable Jul 31, 2025
1.12.0 Stable Jul 31, 2025
1.11.1 Stable Jul 17, 2025
1.11.0 Stable Jul 17, 2025
1.10.0 Stable May 27, 2025