Sourcepoint Setup & Configuration v2


Setting up Sourcepoint’s CMP solution is a simple process that publisher teams can follow to 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 Javascript code-snippet. The Javascript code-snippet needs to be placed on your site, preferably in the header tag of your site. Sourcepoint’s script has been optimized for high performance and fast delivery.

This guide provides details on simply getting consent messages displayed on your site. (This setup would likely change for delivering other messages, such as adblock.)

2 Step Implementation

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"); = "display:none"; = "__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 === "string"; try { var a = r ? JSON.parse( :; 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) } })();
window._sp_ = {
config: {
mmsDomain: "https://message{accountIdHere}",
cmpOrigin: ""
<script src=""></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 property to your account in the Sourcepoint user interface.

b. cmpOrigin - '' this is where the Sourcepoint CMP lives. Keep as is.

c. mmsDomain - '' 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:

siteHref – maps the message to a specific URL

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

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

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

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 Javascript 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 (optional)

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> 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.