Key-Value Pairs Targeting for CCPA

Overview

The Sourcepoint Dialogue platform allows you to add additional targeting through the use of key-value pairs. The key-value pairs are added to the on-page configuration code using the targetingParams parameter. You can then add a targeting condition in the scenario for a campaign. Multiple key-value pairs can be added per messaging call.

The example code below passes a key-value pair of color=red to the Sourcepoint platform by setting the key-value pair up within the targetingParams parameter. The value set can be a string, boolean or integer value. JavaScript variables that evaluate to either strings, boolean values or integers can be passed.

Key-Value Pair Code Example:

<script type="text/javascript">
(function () { var e = false; var c = window; var t = document; function r() { if (!c.frames["__uspapiLocator"]) { if (t.body) { var a = t.body; var e = t.createElement("iframe"); e.style.cssText = "display:none"; e.name = "__uspapiLocator"; a.appendChild(e) } else { setTimeout(r, 5) } } } r(); function p() { var a = arguments; __uspapi.a = __uspapi.a || []; if (!a.length) { return __uspapi.a } else if (a[0] === "ping") { a[2]({ gdprAppliesGlobally: e, cmpLoaded: false }, true) } else { __uspapi.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.__uspapi(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 __uspapi !== "function") { c.__uspapi = p; __uspapi.msgHandler = l; c.addEventListener("message", l, false) } })();
</script>
<script>
window._sp_ccpa = {
config: {
mmsDomain: "https://message.sp-prod.net",
ccpaOrigin: "https://ccpa-service.sp-prod.net",
accountId: 22,
getDnsMsgMms: true,
alwaysDisplayDns: false,
targetingParams: {
color: "red"
}
}
}
</script>
<script src="https://ccpa.sp-prod.net/ccpa.js"></script>

Key-Value Pair User Interface Setup Example

To leverage this data, there a corresponding step in the Dialogue user interface that would perform (or not perform) an action based on the value portion of the key-value pair being sent. In the example screenshot below, the scenario is setup to show a message only if there is value of blue being sent for the color_preference key.