Skip to main content

Commanders Act

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

With the Commanders Act integration, you can directly and securely connect and read data from Commanders ACT in the Kameleoon platform, and A/B test and personalize every visitor's user experience using omni-channel data from Commanders Act.

Key benefits:

  • Save time building segments without the need to write a line of code.
  • Guarantee the security and protection of your data with two RGPD compliant solutions.
  • Run A/B tests and personalizations on first-time visitors to your website
  • Create targeting campaigns using third-party data

Custom integration with Commanders Act CDP

You must create a new custom data.

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

if(typeof tC != "undefined" ){

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

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

return {"value": null}

}else{

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 you're defining in Commanders Act. When you set scope to page, data is reevaluated on every page load if the user belongs to a certain segment Commanders Act identifies.

Fetching Commanders Act segment data in Kameleoon

Segments in your DMP are made available by Commanders Act via a REST-API. In the code below, replace SITEID and TOKEN with your information. Speak with your Commanders Act Success Manager to get this information.

var commanderRequest = new XMLHttpRequest();

var url = "https://api.commander1.com/api/dms/segmentation/segments/list?site=SITEID&token=TOKEN";

commanderRequest.open("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);

dmp_segments.map(function (segment) {

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

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

}

});

}

}

commanderRequest.send();

return commandersActDMPSegments;

Then, insert this snippet into the Options tab 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 in the Kameleoon Segment builder by choosing the custom data and selecting is among the values, which displays a list of every segment from Commanders Act. Selecting a Commanders Act segment will enable targeting in personalizations and experiments.