> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Axeptio

> Integrate Axeptio CMP with Kameleoon to automatically manage visitor consent and run A/B tests on different versions of your consent notice.

[Axeptio](https://www.axeptio.eu/) is a Consent Management Platform (CMP) that helps organizations collect and manage visitor consent for cookies and personal data in compliance with the GDPR and other privacy regulations.

Kameleoon reads consent policies within the Axeptio platform, so you can run A/B tests and personalize the performance of a configuration variant (for example, notice format, content, and banner versus pop-in).

**Key benefits:**

* Automatically manage user consent through Axeptio CMP with no additional setup needed.
* Deploy different variants of the Axeptio tag configuration through Kameleoon and automatically measure the difference in consent rates.

> [!NOTE]
>
> [Kameleoon is also IAB TCF compliant](https://docs.kameleoon.com/user-manual/integrations/as-a-source/cmp/iab-transparency-and-consent-framework.md)

## Integration with Axeptio CMP

Kameleoon provides custom integration with Axeptio CMP. Kameleoon automatically reads the consent policy within the Axeptio platform for both the Experiment and Personalization modules.

With this integration, you can also run A/B tests to test a variant's performance (for example, notice format, content, and banner versus pop-in).

## Enable Axeptio in Kameleoon

First, you need to add Kameleoon as a vendor in Axeptio's CMP.

### Configure your Axeptio notice

In your Axeptio configuration, add `kameleoon` as a vendor/cookie so that visitors can grant or deny consent for Kameleoon from your consent notice.

### Configure Axeptio in Kameleoon

> [!WARNING]
>
> Trigger the Kameleoon snippet independently of Axeptio and add it directly to the source code of the page to prevent flickering in your experiments and personalizations.

1. Log in to your Kameleoon account.
2. Click **Admin** > **Projects**.
3. Navigate to your project's card and click **Configurations**.
4. Click **General**.

#### Global custom script

The **Global custom script** insert lets you link Kameleoon to Axeptio. Any JavaScript code you add to this insert runs every time the page loads. This feature is often used to add a complex tracking code or integration to other solutions.

To activate the bridge between Kameleoon and Axeptio, copy and paste the code below into the **Global script section**:

```javascript theme={null}
//axeptio
Kameleoon.API.Core.runWhenConditionTrue(function () {
    return typeof window._axcb != "undefined";
}, function () {
    void 0 === window._axcb && (window._axcb = []);
    window._axcb.push(function (axeptio) {
        axeptio.on("cookies:complete", function (choices) {
            if (choices.kameleoon) {
                Kameleoon.API.Core.enableLegalConsent("BOTH");
                console.log("enableLegalConsent");
            } else if (choices.kameleoon == false || choices.kameleoon == undefined) {
                Kameleoon.API.Core.disableLegalConsent("BOTH");
                console.log("disableLegalConsent");
            }
        });
    });
});
```

With this code, any time a visitor activates or disables Kameleoon's consent from the Axeptio pop-in, Kameleoon receives the notification and activates or disables the Experiment and Personalization modules (depending on whether consent is granted).

Click **Validate** to apply the changes to your configuration.

#### Consent policy

The last step is setting up your project's consent management policy to **Consent required** for both Experiment and Personalization. Read [this documentation](https://docs.kameleoon.com/user-manual/project-management/consent-management-policy.md) to find out more.

To set up the consent management policy on your project:

1. Unfold the **Experiment** and/or **Personalization** section of your configuration.
2. Select **Consent required** in the dropdown.
3. Click **Validate**.

Kameleoon now collects and stores data based on the consent that users provide through Axeptio CMP.

## A/B test different versions of your consent notice

With this Axeptio integration, you can run different versions of your consent notice by creating an experiment in Kameleoon.

Follow [these guidelines](https://docs.kameleoon.com/user-manual/project-management/consent-management-policy.md) and run a technical experiment, which lets you A/B test several versions of your consent pop-in before consent has been provided.

Note that you cannot analyze the experiment's results in the reporting tool, because Kameleoon collects no data for it. However, Kameleoon still sends analytics data to your default analytics platform.
