Skip to content

Guidelines for Consent Management Platforms

Carter McBride edited this page Feb 2, 2022 · 5 revisions

This document provides a set of requirements and recommendations for Consent Management Platforms (CMPs) to use when integrating with Adobe Experience Platform (AEP) Web SDK with and without Adobe Experience Platform Launch. For those using a CMP, please refer to their documentation (i.e. Sourcepoint or OneTrust), or Web SDK privacy documentation.

Adobe Standard Consent

Adobe uses a consent object format to keep track of consent. You will need to transform your consent data into this format. This format is referred to as Consent XDM. An example consent XDM can be found in the XDM documentation repo (you should omit the xdm: prefix on each object key). Notice that there is a "consents" key at the top level. This key is NOT included in the options for the setConsent AEP Web SDK command.

The Adobe Experience Platform Web SDK will handle consent enforcement via its setConsent command. The setConsent command should be called on every page load when the consent is loaded or updated. The consent XDM is passed to the setConsent command.

CMP Requirements for use with AEP Web SDK

  • The CMP should allow customers to be notified when consent is loaded or updated.
  • When the consent is loaded or updated, customers should be able to map the consent preferences into XDM.

Customer Bridge Code Example

var identityMap = { ... };
CMP.whenConsentIsLoadedOrUpdated(function(categoriesString, collectedAt) {
  var categories = categoriesString.split(",");
  var consentsXdm = {
    collect: {
      val: categories.indexOf("abc") !== -1 ? "y" : "n"
    },
    personalize: {
      content: {
        val: categories.indexOf("def") !== -1 ? "y" : "n"
      }
    },
    share: {
      val: categories.indexOf("ghi") !== -1 ? "y" : "n"
    },
    metadata: {
      time: collectedAt
    }
  };
  window.alloy("setConsent", {
    consent: [{
      standard: "Adobe",
      version: "2.0",
      value: consentsXdm
    }],
    identityMap: identityMap
  });
});

Platform Launch Integration without CMP Extension Support

For a customer to integrate with Platform Launch without a CMP Extension, they will need to create a rule with a custom code event and an AEP Web SDK Set Consent action:

The custom code event would be configured like this:

Example customer bridge code:

CMP.whenConsentIsLoadedOrUpdated(function(categoriesString, collectedAt) {
  var categories = categoriesString.split(",");
  var consentsXdm = {
    collect: {
      val: categories.indexOf("abc") !== -1 ? "y" : "n"
    },
    personalize: {
      content: {
        val: categories.indexOf("def") !== -1 ? "y" : "n"
      }
    },
    share: {
      val: categories.indexOf("ghi") !== -1 ? "y" : "n"
    },
    metadata: {
      time: collectedAt
    }
  };
  trigger({ consents: consentsXdm });
});

This creates a custom event that is triggered when consent is loaded or updated. The consentsXdm can be used inside a data element using "%event.consents%"

Platform Launch Extension Recommendations

A step further is to provide an integration within a Launch extension. The CMP may already have a Platform Launch extension with conditions and other features. The recommendations here are to make integrating with the Web SDK easier for customers. This includes creating a data element type and an event inside your Platform Launch extension.

Create a Data element type that resolves to the Adobe XDM standard. The data element should resolve to an object that would be in the "consents" key in xdm. (see example in the XDM documentation repo)

{
  collect: {
    val: "y"
  },
  personalize: {
    content: {
      val: "n"
    }
  },
  share: {
    val: "y"
  },
  metadata: {
    time: "2019-01-01T15:52:25+00:00"
  }
}

Provide a configuration UI for the data element, which allows customers to define a custom mapping. Some CMPs keep track of categories that the user has consented into. These categories need to be mapped to the consent XDM object "val" fields. Below is an example of what that might look like:

This data element will be used by customers when using the AEP Web SDK setConsent action.

Create an event type that triggers when the consent is loaded or updated. Customers will use this event in a rule with a AEP Web SDK "Set Consent" action.