Sortable-Hosted CMP and Custom Publisher Purposes

A publisher can add custom data processing purposes for the user to accept before visiting the site. One example of how these can be used is to collect consent for partners that process personal data but are not registered as an IAB vendor.

Configuring custom purposes

Provide the following to your account manager for each purpose:

ID

The ID of the custom purpose.

IDs should start at 2, and be unique for each custom purpose used on a site. Purpose 1 is used by the Google custom purpose.

TitleThe title of the purpose to display.
DescriptionThe description of the purpose. This should describe the purpose of the data processing and the controllers involved.

Taking action on user consent

Once the user has consented (or not consented) to the data collection purposes, the results are available using the standardized IAB CMP API:

window.__cmp= window.__cmp || function() {window.__cmp.commandQueue.push(arguments);};
window.__cmp.commandQueue = window.__cmp.commandQueue || [];

// Check if a standard purposes has been accepted. The ids are defined here:
// https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/333392e39145403fe06a2d585af163e43652d3c7/Consent%20string%20and%20vendor%20list%20formats%20v1.1%20Final.md#what-are-the-purposes-and-features-being-supported-
// ID 1 is "Storage and access of information" (e.g. cookies consent)
window.__cmp('getVendorConsents', null, function(result){
  if (result.gdprApplies && !result.standardPurposes[1]) {
    console.log("Standard Purpose 1 not accepted", result.customPurposes[1])
  }
});

// Check if a custom publisher purpose has been accepted
window.__cmp('getPublisherConsents', null, function(result){
  if (result.gdprApplies && !result.customPurposes[1]) {
    console.log("Custom Publihser Purpose 1 not accepted", result.customPurposes[1])
  }
});

Examples