Adobe Experience Manager

   Permission: Vendor list-GDPR 

Sourcepoint CMP's integration with Adobe Experience Manager is a one way sync that allows you to push end-user consent preferences from Sourcepoint to Adobe Experience Manager. In this article, we will cover the necessary steps to integrate the two platforms.

  Note: The Sourcepoint CMP and Adobe Experience Manager integration can be configured for GDPR TCF and GDPR Standard regulatory frameworks.


Prerequisites

This article assumes that you have Adobe Experience Manager and are comfortable configuring a dataset to capture consent and preference data.

For more information on Adobe Experience Manager please review the resources below:

Additionally, the consent(s) you wish to collect from end-users and push into Adobe Experience Manager (i.e. collect, share, and/or personalize) should be added as a custom purpose to your vendor list.

Screenshot_2023-07-31_at_2_16_56_PM.jpg


Add consent and reject actions to custom purpose(s)

You will need to set the proper variables for a consent and reject action for each custom purpose added to a vendor list for the integration.

Navigate to your Sourcepoint account and click Vendor Management on the left-hand panel and select a regulatory framework from the menu. 

Screen_Shot_2023-01-20_at_11.57.29_AM.png

Select a vendor list from the subsequent page.

landing page.png

Click the name of a custom purpose on the vendor list that was added specifically for the integration.

Screenshot_2023-07-31_at_2_21_27_PM.jpg

You will need to set the proper variables within consent actions and reject actions using the custom JS tab for each custom purpose added for the integration. For your convenience, please refer to the table below:

Consent collected Consent actions Reject actions
Collect window.adobe_collect = "y"; window.adobe_collect = "y";
Share window.adobe_share = "y"; window.adobe_share = "n";
Personalize window.adobe_personalize = "y"; window.adobe_personalize = "n";

Screen_Shot_2021-03-12_at_3.22.09_PM.png

Click Apply changes when finished and repeat as necessary for other custom purposes added for the integration.

 


Add JavaScript configuration to property

The Adobe Consent Schema is built in a function that takes the sp_adID as an argument called:

setAdobeConsent(sp_adID)

  Note: The function to format the Adobe Consent Schema should be placed before your Sourcepoint client code snippet.

This function checks to see if a custom purpose has been defined from the consent and reject actions. If it has not been defined, it sets the value to "n". If it has already been defined from a custom consent and reject action, it takes that value. The variables are populated in the Adobe Consent Schema. Please see the configuration example and comments below:

Configuration example
<script>
    
  function setAdobeConsent(sp_adID){
      
    //Sets the date for the meta_data property
    sp_date = new Date();

    //Initializes the string to hold the final JSON
    adobeConsentStr = ''

    //string to build the JSON in
    consent_obj_str = '';
      
    /*checks if the client has configured a "collect" consent purpose
    and if it has it adds it to the JSON string */
    if(typeof window.adobe_collect!="undefined"){
      consent_obj_str = '"xdm:collect":{"xdm:val": "'+window.adobe_collect+'"}'
    }

    /*checks if the client has configured a "share" consent purpose
    and if it has it adds it to the JSON string. It also checks to see if a
    previous purpose is available to consent and adds a comma to the JSON structure
    as necessary*/
    if(typeof window.adobe_share!="undefined"){
      if(consent_obj_str.length>0){
        consent_obj_str += ',"xdm:share":{"xdm:val": "'+window.adobe_share+'"}';  
      }        
      else{
        consent_obj_str += '"xdm:share":{"xdm:val": "'+window.adobe_share+'"}'; 
      }
    }

    /*checks if the client has configured a "personalize" consent purpose
    and if it has it adds it to the JSON string. It also checks to see if a
    previous purpose is available to consent and adds a comma to the JSON structure
    as necessary*/
    if(typeof window.adobe_personalize!="undefined"){
      if(consent_obj_str.length>0){
        consent_obj_str += ',"xdm:personalize":{"xdm:val": "'+window.adobe_personalize+'"}';  
      }
      else{
        consent_obj_str += '"xdm:share":{"xdm:val": "'+window.adobe_personalize+'"}'; 
      }
    }

    /*Adds the meta_data to the consent object checking to see if there were any custom 
    purposes already added to the string. If so, it adds a comma to the JSON structire.*/
    if(consent_obj_str.length>0){
      consent_obj_str += ',"xdm:metadata": {"xdm:time": "'+sp_date+'"}';  
    }
    else{
      consent_obj_str += '"xdm:metadata": {"xdm:time": "'+sp_date+'"}';
    }

    //completes the Adobe JSON schema as a string.
    adobeConsentStr += '{"xdm:consents":{'+consent_obj_str+'}}'

      
    //parses the Adobe JSON string into a JSON object
    adobeConsentJSON = JSON.parse(adobeConsentStr);

    /*At this point the object has been created and can be sent to the 
    Adobe Experience Manager and any function to send that data could be
    inserted below. Also, this setAdobeConsent function could have Adobe config
    arguments passed to it for sending the data to Adobe*/

//Sourcepoint client config snippet
window._sp_queue = [];
window._sp_ = {
    config: {
        accountId: ACCOUNT_ID,
        baseEndpoint: 'https://cdn.privacy-mgmt.com',
        ccpa: { },
        gdpr: { },
        propertyHref: 'https://yourexamplehere.com',
        events: {
          onMessageReady: function (message_type) {
              console.log('onMessageReady', message_type)
          },
          onMessageChoiceSelect: function (message_type, choice_id, choice_type_id) {
              console.log('onMessageChoiceSelect message_type: ', message_type);
              console.log('onMessageChoiceSelect choice_id: ', choice_id);
              console.log('onMessageChoiceSelect choice_type_id: ', choice_type_id);
          },
          onPrivacyManagerAction: function (message_type, pmData) {
              console.log('onPrivacyManagerAction message_type:', message_type);
              console.log('onPrivacyManagerAction', pmData)
          },
          onMessageChoiceError: function (message_type, err) {
              console.log('onMessageChoiceError', message_type);
              console.log('onMessageChoiceError', err)
          },
          onConsentReady: function (message_type, consentUUID, euconsent) {
              console.log('onConsentReady', message_type);
              console.log('consentUUID', consentUUID)
              console.log('euconsent', euconsent)
setAdobeConsent(sp_adID); }, onPMCancel: function (message_type) { console.log('onPMCancel', message_type) }, onMessageReceiveData: function (message_type, data) { console.log('onMessageReceiveData', message_type); console.log('onMessageReceiveData', data) console.log(JSON.stringify(data)); }, onSPPMObjectReady: function () { console.log('onSPPMObjectReady') setAdobeConsent(sp_adID); }, onError: function (message_type, errorCode, errorObject, userReset){ console.log('errorCode: ', message_type); console.log('errorCode: ' + errorCode); console.log(errorObject); console.log('userReset: ' + userReset); }, } } } </script>

 


Send/update consent state with Sourcepoint callbacks

In the configuration example above, within the client configuration snippet, are two callbacks that enable Adobe Experience Manager to pick up the Adobe Consent Schema JSON object:

Callback Description
onSPPMObjectReady Send the current consent state from the previous pageview or the default consent state if it is the first time we see the user.
onConsentReady Update the current consent state if the user makes a change to their consent preferences on that pageview.
//Sourcepoint client config snippet
window._sp_queue = [];
window._sp_ = {
    config: {
        accountId: ACCOUNT_ID,
        baseEndpoint: 'https://cdn.privacy-mgmt.com',
        ccpa: { },
        gdpr: { },
        propertyHref: 'https://yourexamplehere.com',
        events: {
          onMessageReady: function (message_type) {
              console.log('onMessageReady', message_type)
          },
          onMessageChoiceSelect: function (message_type, choice_id, choice_type_id) {
              console.log('onMessageChoiceSelect message_type: ', message_type);
              console.log('onMessageChoiceSelect choice_id: ', choice_id);
              console.log('onMessageChoiceSelect choice_type_id: ', choice_type_id);
          },
          onPrivacyManagerAction: function (message_type, pmData) {
              console.log('onPrivacyManagerAction message_type:', message_type);
              console.log('onPrivacyManagerAction', pmData)
          },
          onMessageChoiceError: function (message_type, err) {
              console.log('onMessageChoiceError', message_type);
              console.log('onMessageChoiceError', err)
          },
          onConsentReady: function (message_type, consentUUID, euconsent) {
              console.log('onConsentReady', message_type);
              console.log('consentUUID', consentUUID)
              console.log('euconsent', euconsent)
setAdobeConsent(sp_adID); }, onPMCancel: function (message_type) { console.log('onPMCancel', message_type) }, onMessageReceiveData: function (message_type, data) { console.log('onMessageReceiveData', message_type); console.log('onMessageReceiveData', data) console.log(JSON.stringify(data)); }, onSPPMObjectReady: function () { console.log('onSPPMObjectReady') setAdobeConsent(sp_adID); }, onError: function (message_type, errorCode, errorObject, userReset){ console.log('errorCode: ', message_type); console.log('errorCode: ' + errorCode); console.log(errorObject); console.log('userReset: ' + userReset); }, } } } </script>

 


Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.