Integrate Kameleoon with Commanders Act Customer Data Platform (CDP)

Written by Julie Trenque

Updated on 10/09/2023

3 min


Manage your integrations






Data Warehouses


Was this content useful?

Commanders Act helps digital teams work better with data through the various applications of its Customer Data Platform, which allows you to collect, reconcile and segment your data.

By optimizing data management, Commanders Act accelerates campaign execution, improves user experience, maximizes ROI and provides a better understanding of multi-channel campaigns.

Commanders Act Customer Data Platform lets you increase sales and loyalty through meaningful relationships with your leads and customers. Through the integration of Kameleoon and Commanders Act CDP, brands can personalize the user experience of every visitor thanks to a seamless integration between both our platforms.

With the deep custom data bridge, you can create individual segments in Kameleoon based on the segments from Commanders Act.

Key benefits

  • Optimize your costs by refining your targeting and improving the performance of your personalization campaigns.
  • Guarantee the security and protection of your data with two RGPD compliant solutions.
  • Personalize your web experiment from the first visit using the Commanders Act data set.
  • Save time with seamless integration and data mining without the need to write a line of code.

Custom integration with Commanders Act CDP

You need to create a new custom data.

Use the Custom Javascript Code acquisition method. This code should be placed in the custom code section of the custom data.

if(typeof tC != "undefined" ){

        var commandersSegments = tC.getCookie("TCAUDIENCE");

        if(!commandersSegments || commandersSegments == ""){

                return {"value": null}


                commandersSegments = commandersSegments.split("|||");

                return {"value": commandersSegments, "overwrite": true};



return null;

Note: The Commanders Act acquisition method, available in the dropdown, is used to retrieve variables from Tag Commander datalayer.

The custom data should be set to the list of and strings types, the scope may be set to Page, depending on the scope of the segments being defined in Commanders Act; when being set to page it is reevaluated on every page load, if the user is within a certain segment being identified by Commanders Act.

Fetching Commanders Act segment data in Kameleoon

The available segments in your DMP are being made available by Commanders Act via a REST-API. In the code below, SITEID and TOKEN should be replaced by your informations. Please talk to your Commanders Act Success Manager to get these informations and replace them within this snippet:

var commanderRequest = new XMLHttpRequest();

var url = "";"GET", url, false);

commanderRequest.withCredentials = true;

var commandersActDMPSegments = [];

commanderRequest.onreadystatechange = function() { // Call a function when the state changes.

    if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {

      var dmp_segments = JSON.parse(commanderRequest.response); (segment) {

        if ( && segment.label !== 'undefined') {

          commandersActDMPSegments.push({value:, label: segment.label});






return commandersActDMPSegments;

Then insert this snippet into the Options (step 2) of the same custom data. Set the fourth toggle to ON and insert the code.

Using a Commanders Act CDP segment in a Kameleoon segment

After the custom data for the Commanders Act segments has been set up, you can build segments within the Kameleoon segment builder, by choosing the custom data and selecting is among the values, which will then show a list of every segment from the Commanders Act. Selecting one or multiple Commanders Act segments will enable a targeting in personalizations and experiments.

  • In this article :