Sourcepoint offers messaging capabilities for multiple regulatory and non-regulatory frameworks. These messages are surfaced to your end-users in accordance with the campaigns (and scenarios) that you enable for the property.
In this article, we will walk you through the essential steps to launch your U.S. Multi-State Privacy (National) messaging campaign on your web property.
- Overview
- Portal configuration
- Install U.S. Multi-State Privacy (National) Sourcepoint code on property
- Install resurface privacy manager code on property
- U.S. Multi-State Privacy (National) API
- Launch campaign
Overview
Sourcepoint offers two different frameworks that can be used for U.S. Multi-State Privacy messaging campaigns:
- National (IAB)
- Standard
These frameworks are defined on a per vendor list basis with each framework sharing the same workflow for message, scenario, partition set, and campaign workflow. Click here to review the different frameworks available.
Portal configuration
Use the table below to track the necessary configurations that need to be performed within the Sourcepoint portal before adding the required code onto the property and launching your U.S. Multi-State Privacy (National) campaign.
Note: There are certain optional steps/configurations that are not represented in this tracker such as property groups, dynamic language support, etc...
Step | Resource(s) | |
1 | Create new property | |
2 | Create U.S. Multi-State Privacy (National) vendor list | |
3 | Edit U.S. Multi-State Privacy (National) vendor list | |
4 | Create U.S. Multi-State Privacy privacy manager | |
5 | Create U.S. Multi-State Privacy first layer message | |
6 | Create U.S. Multi-State Privacy scenario | |
7 | Create U.S. Multi-State Privacy partition set |
Install U.S. Multi-State Privacy (National) Sourcepoint code on property
When you have completed the portal configuration for your property, click Properties on the left-hand panel and select Properties from the subsequent menu.
Click <> inline with the property name.
Use the Campaign Type dropdown menu to select U.S. Multi-State Privacy and select the US IAB GPP toggle.
The implementation code snippet will automatically populate in the provided space.
Click Copy Code and add the implementation code snippet to your property.
Note: Click here for best practices on how to implement the Sourcepoint implementation code snippet to optimize message loading time.
The Sourcepoint U.S. Multi-State Privacy (National) implementation code snippet is comprised of three scripts. Review the sections below for additional information and possible configuration options to suit your organization's use cases.
//Example only. Please use stub file generated in Sourcepoint portal as it may have changed
<script>
window.__gpp_addFrame=function(e){if(!window.frames[e])if(document.body){var t=document.createElement("iframe");t.style.cssText="display:none",t.name=e,document.body.appendChild(t)}else window.setTimeout(window.__gpp_addFrame,10,e)},window.__gpp_stub=function(){var e=arguments;if(__gpp.queue=__gpp.queue||[],__gpp.events=__gpp.events||[],!e.length||1==e.length&&"queue"==e[0])return __gpp.queue;if(1==e.length&&"events"==e[0])return __gpp.events;var t=e[0],p=e.length>1?e[1]:null,s=e.length>2?e[2]:null;if("ping"===t)p({gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}},!0);else if("addEventListener"===t){"lastId"in __gpp||(__gpp.lastId=0),__gpp.lastId++;var n=__gpp.lastId;__gpp.events.push({id:n,callback:p,parameter:s}),p({eventName:"listenerRegistered",listenerId:n,data:!0,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else if("removeEventListener"===t){for(var a=!1,i=0;i<__gpp.events.length;i++)if(__gpp.events[i].id==s){__gpp.events.splice(i,1),a=!0;break}p({eventName:"listenerRemoved",listenerId:s,data:a,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else"hasSection"===t?p(!1,!0):"getSection"===t||"getField"===t?p(null,!0):__gpp.queue.push([].slice.apply(e))},window.__gpp_msghandler=function(e){var t="string"==typeof e.data;try{var p=t?JSON.parse(e.data):e.data}catch(e){p=null}if("object"==typeof p&&null!==p&&"__gppCall"in p){var s=p.__gppCall;window.__gpp(s.command,(function(p,n){var a={__gppReturn:{returnValue:p,success:n,callId:s.callId}};e.source.postMessage(t?JSON.stringify(a):a,"*")}),"parameter"in s?s.parameter:null,"version"in s?s.version:"1.1")}},"__gpp"in window&&"function"==typeof window.__gpp||(window.__gpp=window.__gpp_stub,window.addEventListener("message",window.__gpp_msghandler,!1),window.__gpp_addFrame("__gppLocator"));
</script>
<script>
window._sp_queue = [];
window._sp_ = {
config: {
accountId: 22,
baseEndpoint: 'https://cdn.privacy-mgmt.com',
usnat: { },
events: {
onMessageChoiceSelect: function() {
console.log('[event] onMessageChoiceSelect', arguments);
},
onMessageReady: function() {
console.log('[event] onMessageReady', arguments);
},
onMessageChoiceError: function() {
console.log('[event] onMessageChoiceError', arguments);
},
onPrivacyManagerAction: function() {
console.log('[event] onPrivacyManagerAction', arguments);
},
onPMCancel: function() {
console.log('[event] onPMCancel', arguments);
},
onMessageReceiveData: function() {
console.log('[event] onMessageReceiveData', arguments);
},
onSPPMObjectReady: function() {
console.log('[event] onSPPMObjectReady', arguments);
},
onConsentReady: function (consentUUID, euconsent) {
console.log('[event] onConsentReady', arguments);
},
onError: function() {
console.log('[event] onError', arguments);
},
}
}
}
</script>
<script src="https://cdn.privacy-mgmt.com/unified/wrapperMessagingWithoutDetection.js" async></script>
Stub file
The first part of the implementation code snippet contains the IAB stub functions. The stub function set up the IAB privacy string object __gpp
. This makes it available on queue to be called and released when needed. It is important to have these script tags in the first position to avoid errors and failure of service.
//Example only. Please use stub file generated in Sourcepoint portal as it may have changed
<script>
window.__gpp_addFrame=function(e){if(!window.frames[e])if(document.body){var t=document.createElement("iframe");t.style.cssText="display:none",t.name=e,document.body.appendChild(t)}else window.setTimeout(window.__gpp_addFrame,10,e)},window.__gpp_stub=function(){var e=arguments;if(__gpp.queue=__gpp.queue||[],__gpp.events=__gpp.events||[],!e.length||1==e.length&&"queue"==e[0])return __gpp.queue;if(1==e.length&&"events"==e[0])return __gpp.events;var t=e[0],p=e.length>1?e[1]:null,s=e.length>2?e[2]:null;if("ping"===t)p({gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}},!0);else if("addEventListener"===t){"lastId"in __gpp||(__gpp.lastId=0),__gpp.lastId++;var n=__gpp.lastId;__gpp.events.push({id:n,callback:p,parameter:s}),p({eventName:"listenerRegistered",listenerId:n,data:!0,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else if("removeEventListener"===t){for(var a=!1,i=0;i<__gpp.events.length;i++)if(__gpp.events[i].id==s){__gpp.events.splice(i,1),a=!0;break}p({eventName:"listenerRemoved",listenerId:s,data:a,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:usca","9:usva","10:usco","11:usut","12:usct"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else"hasSection"===t?p(!1,!0):"getSection"===t||"getField"===t?p(null,!0):__gpp.queue.push([].slice.apply(e))},window.__gpp_msghandler=function(e){var t="string"==typeof e.data;try{var p=t?JSON.parse(e.data):e.data}catch(e){p=null}if("object"==typeof p&&null!==p&&"__gppCall"in p){var s=p.__gppCall;window.__gpp(s.command,(function(p,n){var a={__gppReturn:{returnValue:p,success:n,callId:s.callId}};e.source.postMessage(t?JSON.stringify(a):a,"*")}),"parameter"in s?s.parameter:null,"version"in s?s.version:"1.1")}},"__gpp"in window&&"function"==typeof window.__gpp||(window.__gpp=window.__gpp_stub,window.addEventListener("message",window.__gpp_msghandler,!1),window.__gpp_addFrame("__gppLocator"));
</script>
Client configuration script
The client configuration script contains your organization's specific account configuration parameters. This configuration includes the necessary and optional parameters for your property to communicate with the Sourcepoint messaging platform and consent service libraries.
Currently, there are four required properties to successfully deliver an end-user notification:
Note: Use either propertyHref
or propertyId
in your client configuration script.
Required Property | Data Type | Description |
accountId |
Number | The accountId value associates the property with your organization's Sourcepoint account. Your organization's accountId can be retrieved by contacting your Sourcepoint Account Manager or via the My Account page in your Sourcepoint account. |
baseEndpoint |
String |
A single server endpoint that serves the messaging experience.
Note: The |
propertyHref |
String |
Maps the implementation to a specific URL as set up in the Sourcepoint account dashboard. Use Note: When a campaign is ready to launch publicly to your end-users, we recommend that you replace |
propertyId |
Number |
Maps the message to a specific property set up in the Sourcepoint portal. Use |
usnat |
Object |
Campaigns are surfaced on your property by adding campaign objects to your configuration. |
In addition to the required parameters (above), your organization can further implement additional parameters and customizations in the code snippet for different use cases. Follow the resources below for additional information
<script>
window._sp_queue = [];
window._sp_ = {
config: {
accountId: 12123,
baseEndpoint: 'https://cdn.privacy-mgmt.com',
propertyHref: 'https://testdemo.com',
usnat: { }
}
}
</script>
URL to messaging library
The final script is a URL that points to Sourcepoint's messaging libraries. The default URL is as follows:
Campaign(s) | Description |
|
https://cdn.privacy-mgmt.com/unified/wrapperMessagingWithoutDetection.js' Note: If your organization has edited the https://cname.subdomain/unified/wrapperMessagingWithoutDetection.js |
In the developer console, the URL to the messaging library can return the following regardless of whether a message was shown to the user:
Console | Description |
Messaging without detection successfully executed |
The script, messaging without detection, has successfully fired. It does not indicate that a message was shown to the end-user. |
interaction complete |
The interaction with our, messaging without detection script, has concluded. It does not indicate that an end-user interacted with a message. |
Install resurface privacy manager code on property
Many organizations will want to add a button/link onto their web property that allows an end-user to resurface the privacy manager so they can manager their privacy choice preferences on an ongoing basis.
Typically, the JavaScript code on their page will attach the function to the onclick event of a page element. Click here for more information on how to retrieve the privacy manager ID and implement the JavaScript code.
U.S. Multi-State Privacy (National) API
In addition to the U.S. Multi-State Privacy (National) Sourcepoint code that is added to your property, your organization can leverage IAB and Sourcepoint designed APIs to further customize and test your implementation. Information on the commands available with the __gpp
call can be found in our developer hub:
U.S. Multi-State Privacy (National) API
Launch campaign
With the property configured in the portal and Sourcepoint's implementation code snippet added to the web property, your organization can now launch a U.S. Multi-State Privacy (National) campaign on the property and test the end-user flow.
Step | Resources |
Launch U.S. Multi-State Privacy campaign | |
Test end-user privacy choice flow |
Comments
0 comments