Permission: Campaign entities
The Native OTT message JavaScript code is a snippet that is added to a Native OTT property and allows an end-user to resurface a Native OTT message. Using this link/button, end-users can directly manage their consent preferences on an ongoing basis.
Create Native OTT message JavaScript code
Click Messages on the left-hand panel and select a regulatory regime (GDPR Messages or U.S. Privacy Messages).
Click Native OTT from either subsequent menu.
Use the property field in the upper right-hand corner to select a property for which you will resurface a Native OTT message.
Locate the ID for a Native OTT message with a PUBLIC status on the subsequent list.
The Native OTT message JavaScript code uses a loadNativeOtt
function to pass the specific Native OTT message ID.
The format of the JavaScript code depends on the regulatory framework to which the Native OTT message belongs. Please see the table below for the appropriate formatting:
window._sp_.gdpr.loadNativeOtt(GDPR_NATIVE_OTT_ID)
window._sp_.ccpa.loadNativeOtt(USP_NATIVE_OTT_ID)
Implement Native OTT message JavaScript code
Attach the Native OTT message JavaScript code to an event handler on your Native OTT property. Most organizations who implement the JavaScript code will attach the function to the onclick
event of an element.
<button onclick="window._sp_.gdpr.loadNativeOtt(123456)">Native OTT GDPR</button>
<a href="javascript:window._sp_.gdpr.loadNativeOtt(123456);">Native OTT GDPR</a>
<button onclick="window._sp_.ccpa.loadNativeOtt(987654)">Native OTT USPrivacy</button>
<a href="javascript:window._sp_.ccpa.loadNativeOtt(987654);">Native OTT USPrivacy</a>
Comments
0 comments