Skip to main content
OneTrust is a platform that focuses privacy and security & governance. Customers use OneTrust to build integrated programs that comply with the CCPA, GDPR, LGPD, PDPA, ISO27001, and hundreds of the world’s privacy and security laws. This guide walks you through how to set up an integration with OneTrust CMP.

Integration with OneTrust CMP

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

Enable OneTrust integration on Kameleoon

First, you must add Kameleoon in OneTrust’s CMP.

Configure OneTrust in Kameleoon

Trigger the Kameleoon snippet independently of OneTrust and add it directly to the page’s source code to prevent flickering in your experiments and personalizations.
  1. Log in to your Kameleoon account.
  2. Click Admin > Projects.
  3. Click Configuration on your project’s card.
  1. Unfold the General section.

Global custom script

The Global custom script insert links Kameleoon to OneTrust. Kameleoon executes any JavaScript code you add to this insert every time the page loads. You can use this feature to add complex tracking code or integrations with other solutions. To activate the bridge between Kameleoon and OneTrust, copy and paste the code below into the Global script section:
You need to update the preceding code depending on the category where you added Kameleoon in OneTrust. For example, you may have a group called “Performance Cookies,” which has a category id of C0002. With this code, Kameleoon automatically activates or deactivates the Experiment or Personalization module any time a visitor grants or revokes consent from the OneTrust pop-in. Click Validate to apply the changes to your configuration. The last step is setting your project’s consent management policy to Consent required for both Experiment and Personalization. Read this documentation to learn more.
To do this:
  1. Unfold the Experiment and/or Personalization section of your configuration.
  2. Select the Consent required option in the dropdown.
  3. Click Validate to apply your changes
Kameleoon will now collect and store data based on the consent provided by users from OneTrust CMP.