Web and Webview Privacy Manager (GDPR TCF v2) Javascript Code

Admin access or Domain access to property (property group) with feature access to message/scenario partition set management.

The web and webview Privacy Manager (GDPR TCF v2) javascript code is a snippet that is added to a property and allows an end-user to directly manage their consent preferences on an ongoing basis without having to re-encounter your organization's First Layer Message. In this article, we will cover the following:

Create Privacy Manager (GDPR TCF v2) Javascript Code

The Privacy Manager javascript code uses the Sourcepoint function window._sp_.gdpr.loadPrivacyManagerModal() to pass a specific GDPR TCF v2 Privacy Manager ID.

The GDPR TCF v2 Privacy Manager ID can be found by navigating to Dialogue > Property > GDPR > Web and Webview > Privacy Manager.

When combined, the GDPR TCF v2 javascript code snippet should follow the following format:

window._sp_.ccpa.loadPrivacyManagerModal(GDPRTCFv2_PM_ID)

Implement Privacy Manager (GDPR TCF v2) Javascript Code

Attach the Privacy Manager (GDPR TCF v2) javascript code to an event handler on your property. Most organizations who implement the javascript code on their page will attach the function to the onclick event of a page element.

<button onclick="window._sp_.gdpr.loadPrivacyManagerModal(123456)">Privacy Manager</button>