- Automatically manages user consent through Usercentrics CMP with no additional setup.
- Ensures consistent consent management and compliance.
- Reassures users that Kameleoon handles their data compliantly.
Add Kameleoon as a Data Processing Service in Usercentrics
To add Kameleoon as a Data Processing Service, complete the following steps:- In the Usercentrics admin interface, click Service Settings.
- Click Add DPS via Database > Kameleoon.

- Select your category in the Category dropdown.
- Kameleoon AB Testing & Personalization / Template ID: H1yDxp7JN
- Kameleoon Only AB Testing Module / Template ID: 9FYjH37-J
- Kameleoon Only Personalization Module / Template ID: 2lh8-reEz

Set up IAB TCF in Usercentrics
To enable IAB TCF 2.3 in Usercentrics and Kameleoon, complete the following steps:- Set up Kameleoon as a vendor (ID: 820) in Usercentrics.
- In the Usercentrics admin interface, navigate to Service Settings.
- Set the CMP version to Version 2.

- Click Configuration.
- Enable Transparency & Consent Framework 2.3 (TCF).

Custom Kameleoon legal consent integration
If you cannot enable TCF 2.3 in Usercentrics, you can use a custom script setup.The custom script shows users campaigns when consent status is unknown, without tracking. You can also show A/B testing changes on your project’s entry pages.
- In Kameleoon, define your consent management policy and choose Consent required.
- Integrate the following Kameleoon functions:
enableLegalConsentdisableLegalConsent
For more information about legal consent in Kameleoon, see the legal consent API reference. For more information about consent states and modes, see the consent management documentation.
- Go to the Projects menu.
- Click Configuration on the card for your site or mobile app.

- Expand the General section.
- Copy and paste one of the code blocks below, depending on the Kameleoon template you chose.
- Web CMP v2
- Web CMP v3
Run an A/B test on the Usercentrics consent banner
Run only one consent experiment per site.
- Click Configure > Goals > New goal.
- In Website Selection, choose the website you defined when you created your account.
- Select Custom Goal in Type.
- Usercentrics supports several custom events for custom goals. For the full list of available events, see available UI events in the Usercentrics documentation.
- Click Next.
- Enter a name for your goal in the Name your goal field.
- In the Describe your goal field, enter
Kameleoon.API.Goals.processConversionfollowed by the unique ID.- You can find the ID in the New goal pop-in at the end of the function text.

- Open the Experiments dashboard.
- Click New Experiment. A pop-in opens asking what type of experiment you want to create.
- Click In the code editor > JS/CSS.
- Enter the Name, Website, and URL of the page where you want to launch your experiment.
- Click Validate. The code editor opens.

- Click Experiment (above Variations in the left menu), then click Test specific code in the right menu.
- Add the following code:
variant0is the default, empty variant. It makes no changes to the consent management platform. If your default variant has a different name, updatewindow.UC_AB_VARIANTaccordingly.- The event listener fires each time a custom event occurs. For the full list of custom events for A/B testing, see available UI events in the Usercentrics documentation.
- The three
console.logstatements output information about the event. For example, trackingACCEPT_ALLproduces these logs:
if statement:
if (data.detail.type === "Consent Management Platform event here") Kameleoon.API.Goals.processConversion(goalID)
- Go back to the Variations tab.
-
In Variation 1, add the following code:
window.UC_AB_VARIANT = "variant1"; -
If you named your variant something else, replace
variant1accordingly. -
In the Finalize tab, select your traffic distribution, targeting, tracking, and goals.
- Add the goal you created. You can search by the goal’s unique ID. If search returns no results, try entering only the first digits of the goal ID.
- Click Publish to finalize the experiment setup.