Follow

Export Cxense DMP segments to the ADTECH ad server

Steps

  • From the menu bar, go to Master data > Key Groups.
  • Enter a name for the new key group in the Add new key group text box and click Add, for example "Audience Segments" or similar.
  • Click the name of the new key group to add keys to the key group.

For each of the segments, follow these steps:

  • Click the Add button.
  • Set the key to "CxSegments". It is important that this is spelled exactly the same way as in the tag!
  • Copy the segment name into the Caption input field
  • Copy the segment ID into the value input field at the bottom of the form
  • Set Preselect: Yes
  • Set Multi select: No

 

 

Ad tag modification

At run time, the current user's assigned segments need to be read from Cxense DMP and provided to the ADTECH ad tag so that the ADTECH ad server can match the user to a targeted ad or campaign.

This integration uses ADTECH "Key Value Targeting" for this purpose. See the ADTECH "Key Value Targeting" documentation for more detail on the feature.

In essence, we need to add a key value "CxSegments" with multiple values to the ADTECH ad server URL.

For example if we have a user that is matching the two segments "12" and "23", the we must add these parameters to the URL:

 - ;kvCxSegments=12:23

 

This can be done by modifying a typical ADTECH ad tag like this one:

 

<!-- AdTech ad tag begin -->
<script type="text/javascript">
    // Setup and run the AdTech ad request
    document.write('<scr'+'ipt type="text/javascript" src="http://' + 'adserver.adtech.de/multiad/3.0/25/0/0/-1/ADTECH' +
        ';mode=multiad;plcids=12345;loc=100;target=_blank' +
        ';misc=' + new Date().getTime()+ '"></scri'+'pt>');
</script>
<script type="text/javascript">
    // Place the ad
    ADTECH_showAd(12345, document, false);
</script>
<!-- AdTech ad tag end -->

 

Modified to include the current user's segments in the ad server request URL:

 

<!-- DMP-targeted AdTech ad tag begin -->

<script type="text/javascript">
    // Load cx.js
    document.write('<scr' + 'ipt type="text/javascript" src="http' +
        (location.protocol === 'https:' ? 's://s' : '://') + 'cdn.cxense.com/cx.js"></scr' + 'ipt>');
</script>
 
<script type="text/javascript">
     // Send an analytics event to setup cross-site user id link so that we can read user segment ids
     cX.setSiteId('<TODO: Insert your site id here!>');
     cX.sendPageViewEvent();
     // Read the user segment ids from DMP
     var segments = cX.getUserSegmentIds({ persistedQueryId: '<TODO: insert persisted query id here>' });
     var adtechTargeting = (segments && segments.length) ? ';kvCxSegments=' + segments.join(':') : '';
</script>
 
<!-- Modified AdTech ad tag -->
<script type="text/javascript">
     // Setup and run the AdTech ad request
     document.write('<scr'+'ipt type="text/javascript" src="http://' + 'adserver.adtech.de/multiad/3.0/25/0/0/-1/ADTECH' +
         ';mode=multiad;plcids=12345;loc=100;target=_blank' +
         adtechTargeting + ';misc=' + new Date().getTime()+ '"></scri'+'pt>');
</script>
<script type="text/javascript">
    // Place the ad
    ADTECH_showAd(12345, document, false);
</script>
<!-- DMP-targeted AdTech ad tag end -->

 

For how to setup the cX.getUserSegmentIds(..) call, see this page on our public facing wiki page:

 - DMP segments helper function - getUserSegmentIds()

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk