Prebid Configuration for GDPR TCF Version 1.1

The article describes integrating with the Prebid header bidder wrapper for the IAB Europe's Transparency and Consent Framework version 1.1.

Overview

Prebid is a header bidder wrapper that conducts bids for multiple header bidder partners. Prebid accomplishes this by concurrently calling the selected SSPs and ad exchanges within the set timeout. For the purposes of consent, Prebid has a module that reads the consent string for a user on a publisher's site and pass this information to SSPs and ad exchanges.

Part of the Prebid module is the ability to set a timeout for users when consent does not exist. The module will wait for the user to provide consent before sending bids out to the auctions. To take advantage of this feature, Sourcepoint has created a flag to withhold calls to the __cmp() function when no consent for the user's exists. As soon as the user consents, Sourcpoint allows the __cmp() function call Prebid makes to execute and Prebid attaches the user's consent to the bid request. If the user fails to consent before the timeout executes, then the bid requests are sent without consent attached.

The flag to enable this capability is waitForConsent and it take a value of true. Its implementation is shown in the example code below.

<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
//Sourcepoint stub function
(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>
</head>
<body>
<!-- Sourcepoint Config Tags w/Prebid waitForConsent flag -->
<script>
window._sp_ = {
config: {
mmsDomain: "https://message.sp-prod.net",
accountId: 22,
cmpOrigin: "https://sourcepoint.mgr.consensu.org",
waitForConsent: "true"
}
}
</script>
<script src="https://dialogue.sp-prod.net/messagingWithoutDetection.js"></script>
</body>
</html>

To learn more about the Prebid module for the IAB Europe's Transparency and Consent Framework version 1.1, please visit the Prebid site.