Setting up Didomi

3

min

quiz

Didomi builds technology that allows organizations to place customer consent at the core of their strategy, by offering a powerful Consent Management Platform (CMP) that can be deployed on websites or mobile applications.

This guide walks you through how to set up an integration with Didomi CMP. It leverages Didomi Programmatic API capabilities.

Please note that Kameleoon is also IAB TCF compliant

 

Key benefits

  • Automatic management of user consent through Didomi CMP with no additional setup needed.
  • Easily deploy different variants of the Didomi tag configuration through Kameleoon and automatically measure the difference in consent rates.

 

Integration with Didomi CMP

Kameleoon provides a custom integration with Didomi CMP. Kameleoon automatically reads the consent policy within Didomi platform for both our experimentation and personalization modules.

Thanks to our deep integration, you can also run AB tests to test the performance of a variant of your configuration (notice format, content, banner vs popin etc.).

Enable Didomi integration on Kameleoon

As a first step, you will need to add Kameleoon as a vendor in Didomi’s CMP. 

Configure your Didomi notice

Please follow this documentation provided by Didomi

 

Configure Didomi in Kameleoon

Warning: Please note that, as usual, the Kameleoon snippet needs to be triggered independently of Didomi and added directly in the source code of the page, to prevent flickering in your experiments and personalizations.

On your Kameleoon account, click on “Settings” in the left menu, then on “My Websites”.

On the card of your website, click on “Edit”: you access the configuration of your website on Kameleoon.

In “Configuration”, unfold the “General” section.

Global custom script

The “Global custom script” insert will allow you to link Kameleoon to Didomi. Any JavaScript code you add in this insert will be executed each time the page is loaded. This feature is usually used to add complex tracking code or integration to other solutions.

To activate the bridge between Kameleoon and Didomi, please copy and paste the code below in the Global script section.

window.didomiOnReady = window.didomiOnReady || [];

window.didomiOnReady.push(function (Didomi) { 

    if (Didomi.isConsentRequired()) {

        Didomi.getObservableOnUserConsentStatusForVendor('c:kameleoon-experiment')

            .subscribe(function (consentStatusForVendor) {

                if (consentStatusForVendor === true) {

                   Kameleoon.API.Core.enableLegalConsent("AB_TESTING");

                   console.log("Enabling A/B Testing");

                } else if (consentStatusForVendor === false) {

                    Kameleoon.API.Core.disableLegalConsent("AB_TESTING");

                    console.log("Disabling A/B Testing");

                }

            });

                                                

        Didomi.getObservableOnUserConsentStatusForVendor('c:kameleoon-personalization')

            .subscribe(function (consentStatusForVendor) {

                if (consentStatusForVendor === true) {

                   Kameleoon.API.Core.enableLegalConsent("PERSONALIZATION");

                   console.log("Enabling Personalization");

                } else if (consentStatusForVendor === false) {

                    Kameleoon.API.Core.disableLegalConsent("PERSONALIZATION");

                    console.log("Disabling Personalization");

                }

            });

                                                

    } else {

        Kameleoon.API.Core.enableLegalConsent();

    }

});

 

Thanks to this code, anytime a visitor activates or disables Kameleoon’s consent from the Didomi popin, Kameleoon is automatically notified and activates or disables the A/B testing or Personalization module (depending on the consent granted or not).

You can click on “Validate” to apply the changes to your configuration.

Consent policy

The last step is to set up the consent management policy on your site to “Consent required” for both A/B testing and Personalization. Please read this documentation to know more.

To do so, unfold the “A/B testing” and/or “Personalization” section of your configuration and select in the dropdown the “Consent required” option.

You can click on “Validate” to apply the changes.

You are done. Kameleoon will now collect and store data based on the consent provided by the users from Didomi CMP.

 

A/B test different version of your consent notice

Thanks to our deep integration with Didomi, you can also run through Kameleoon different versions of your consent notice by creating an experiment.

Please follow these guidelines. It requires you to run a Technical experiment: it will allow us to run the experiment while consent has not yet been provided (which is what we need here if we want to A/B test several versions of our consent popin).

Please note that you won’t be able to analyse the results of this experiment in our reporting tool as no data will be collected. However, Kameleoon will still send analytics data to your default analytics platform.

You can find below an example of an experiment that A/B tests two versions of the consent notice: popin vs banner. 

  • Popin notice version

  • Banner notice version