Sourcepoint CMP Setup & Configuration (V2)

Overview

Setting up Sourcepoint’s CMP solution is a simple process that publisher teams can get up and running quickly. This document is a quick start guide on how to get consent messages displaying on your site using Sourcepoint’s JS code-snippet. The JS code-snippet needs to be placed on your site, preferably in the header tag of your site. Sourcepoint’s script has been built and optimized for high performance and fast delivery. Please be aware that this setup would likely change for delivering adblock messages. This guide provides details on simply getting consent messages displayed on your site.

Implementation can be divided into two steps:

  1. Page Configuration

  2. Setting up the messaging domain

Please read through the content below regarding each of these implementation steps and feel free to reach out to your Sourcepoint account manager with any questions you may have.

1. Page Configuration

Below is Sourcepoint’s Javascript code-snippet which needs to be placed at the top (preferably in the header of your page before other ad-tech related tags such as a header bidding tag).

<script type="text/javascript">
(function () { var e = false; var c = window; var t = document; function r() { if (!c.frames["__cmpLocator"]) { if (t.body) { var a = t.body; var e = t.createElement("iframe"); e.style.cssText = "display:none"; e.name = "__cmpLocator"; a.appendChild(e) } else { setTimeout(r, 5) } } } r(); function p() { var a = arguments; __cmp.a = __cmp.a || []; if (!a.length) { return __cmp.a } else if (a[0] === "ping") { a[2]({ gdprAppliesGlobally: e, cmpLoaded: false }, true) } else { __cmp.a.push([].slice.apply(a)) } } function l(t) { var r = typeof t.data === "string"; try { var a = r ? JSON.parse(t.data) : t.data; if (a.__cmpCall) { var n = a.__cmpCall; c.__cmp(n.command, n.parameter, function (a, e) { var c = { __cmpReturn: { returnValue: a, success: e, callId: n.callId } }; t.source.postMessage(r ? JSON.stringify(c) : c, "*") }) } } catch (a) { } } if (typeof __cmp !== "function") { c.__cmp = p; __cmp.msgHandler = l; c.addEventListener("message", l, false) } })();
</script>
<script>
window._sp_ = {
config: {
mmsDomain: "https://message{accountIdHere}.sp-prod.net",
accountId: "ACCOUNT_ID_HERE",
cmpOrigin: "https://sourcepoint.mgr.consensu.org"
}
}
</script>
<script src="https://dialogue.sp-prod.net/messagingWithoutDetection.js"></script>

The code-snippet consists of 3 script tags:

1. The first section of the tag is the Stub script. This sets up the iAB consent object “__cmp” and makes it available on queue to be called and released when needed. It is important to have this script tag always at the top in the first position to avoid errors and failure of the service.

2. The second section of the tag configures the tag for your account in the Sourcepoint user interface. This section sets up the parameters necessary for your website to communicate with the Sourcepoint messaging platform and establishes communication with our messaging service library. In addition to the standard parameters in the example above, there are additional parameters that allow for JavaScript callbacks to be triggered for different customization purposes. There are currently only three required params to deliver a message successfully:

a. accountId – This is set to the account id you receive from your Sourcepoint account manager - The id associates your data and site up to the publisher account in the Sourcepoint user interface.

b. cmpOrigin - 'https://sourcepoint.mgr.consensu.org' where the Sourcepoint CMP lives. Keep as is.

c. mmsDomain - 'https://mms.sp-prod.net' can be changed to a CNAMED subdomain in order to deliver 1st party cookies on Safari web browser (due to Safari’s ITP). Changing the mmsDomain is optional! More information about setting up an mmsDomain below.

Other optional params:

d. siteHref – maps the message to a specific URL

e. privacyManagerId – forces a specific privacy manager to be allocated for that message

f. waitForConsent – a Boolean that when is set to true disables interaction with the page until a user has given consent

g. siteId – maps the message to a specific property (website, app, OTT)

h. events – an array of events that allow JavaScript callbacks to be triggered. These events are:

  • onMessageReady

  • onMessageChoiceSelect

  • onMessageReceiveData

  • onMessageChoiceError

  • onPrivacyManagerAction

  • onConsentReady

  • onPMCancel

  • onSPPMObjectReady

3. The Messaging JavaSript Library script: This calls our messaging library and hosted on our servers and is what finally delivers the message.

2. Setting up The Messaging Domain

Setting up a messaging domain (mmsDomain) is optional. The Dialogue JavaScript communicates with the Sourcepoint messaging server on a subdomain of the site. The benefit of doing that is to allow messaging cookies to be “first party” and thus, circumventing Safari’s web browser Intelligent Tracking Prevention (ITP). This creates a discrete messaging channel between the publisher’s messaging subdomain and the Dialogue messaging server. Once you have created the subdomain, you should create a DNS CNAME record to direct traffic to the Sourcepoint messaging endpoint message<account id>.sp-prod.net where the account id refers to you account ID in the Sourcepoint user interface. If you are unsure of what your account ID is, please contact your Sourcepoint account manager

Once you have created the CNAME record, please inform your Sourcepoint Account manager so that they can create an SSL certificate for the subdomain. This will ensure that both secure and non-secure traffic are handled properly. We also included additional information on how to leverage our key-value pair targeting features and our data callbacks. Key-value pairs are used to create highly targeted messages based on data points from external systems like DMPs and CRM platforms. Our callbacks can be used to set cookie values based on the messages a user have seen and to send data to external systems such as website analytics platforms and/or DMPs.