Configure Klaro!
Last updated on
18 November 2024
Enable Klaro!
To enable Klaro! you need to do the following:
- Enable the module at
/admin/modules - Grant the permission
Use Klaro! UIat/admin/people/permissionsto all roles - alsoAnonymousif you want your visitors to see the Klaro! consent - Note: the default mode is
silent- i.e. no consent notice or modal is displayed. (» find more information at the page Different consent modes for Klaro!)
On the Klaro config pages you will get informed, if something is wrong with the Klaro installation or library.
Configuration
Go to Administration > Configuration > User interface > Klaro!
(/admin/config/user-interface/klaro)
There you will find:
Settings
General
Here you can configure behavior and options for the Klaro! element.
- Consent
Klaro! Dialog Mode- Specify whether and what type of dialog is used to obtain consent. See section Different consent modes for Klaro!Show button to toggle the consent modal- Adds a toggle button that is shipped with this module to open the consent modal after user action.
- Services
Group by purpose- Allow the user to enable or disable entire groups of services at once. This also reduces the space taken up by the modal, which is important especially for websites that use many third-party applications.Verbose service descriptions- If enabled, all Klaro! service descriptions will be processed. As for now they will get extended by the privacy policy url and the info url. If you enable "Allow HTML in texts" at settings->styling the links will be formatted as anchors, otherwise they can only be displayed as text and are not clickable
- Buttons
Accept all- Notice dialog: If checked, all services are accepted, instead of only required services and those enabled by default. Consent dialog: This options ass a new button "Accept all".Decline all- Show decline button in notice and decline all button in consent modal.Link to open consent dialog- Show a link in the notice dialog to open the consent modal.Display link as a button- Displays the link to open the consent modal with a button style.Add close button to the Klaro! dialog- Adds an close button "X" to the modal forms, which closes the dialog and declines all consents. Mandatory in some countries for consent dialogs.
Storage
- change
Storage methodto "Cookie" or "Local storage" Cookie name- You can customize the name of the cookie that Klaro! uses for storing user consent decisions.Cookie expires after- decrease / increase the amount of days the browser will store the consents of the userCookie domain- You can change to cookie domain for the consent manager itself. Use this if you want to get consent once for multiple matching domains. If undefined, Klaro! will use the current domain.
Advanced
- Matching cookie domains
- Disable Klaro and block attributed resources on following url patterns
- Disable Klaro element and do not block attributed resources on following url patterns
Unknown resources
During processing to decorate attributes (see “Automatic attribution”), this module can detect external resources and embedded external content without a matching service.
Log unknown resources- Creates a notice in recent log messages whenever an unknown external resource is requested.Block unknown external resources- Matches and decorates resources that are external and did not match a configured service (Only works ifProcess final HTMLis activated).- Label for the unknown service
- Description text for the unknown service
Automatic attribution
To make Klaro! block resources, they need special html attributes which the klaro library expects you to add manually, however this module can try to set them automatically.
Process js_alter- Matches and decorates script files added from libraries against the configurated services.Process page_attachments- Matches and decorates manually attached JS files against the configurated services.Process preprocess_field- Matches and decorates iframes or oembeds from special field types (see README.md).Process final HTML- Adds contextual blocking toiframe,img,audioandvideotags and adds attributes to all matching script tags, that are not attributed yet. This feature is rather experimental, invalid or malformed html might lead to unknown behaviour.
Styling
Element ID- Specify the HTML CSS identifier for the Klaro! container.Additional CSS classes- Add custom classes seperated by spaces to the Klaro! container, i.e. "custom-class-one custom-class-two"Override Klaro css variables- Override inbuilt klaro css variables seperated by a comma, i.e. "light, top" to use the light theme and position the notice at the top, More infosAllow HTML in texts- Activating this will allow HTML in the descriptions of the services (e.g. for links). Use with care!
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion