Display privacy manager link based on end-user location (GDPR TCF and U.S. Multi-State Privacy)

   Permission: Vendor list - GDPR and Regulation Settings - USNat

Sourcepoint provides a JavaScript code that can be implemented on your property that allows end-users to directly manage their consent/opt-in preferences on an ongoing basis without having to re-encounter your organization's first layer message. This code is implemented on-page as a link or button.

For organizations who have implemented both GDPR TCF and U.S. Multi-State Privacy campaigns on their property, you will only want your end-user to interact with the correct privacy manager based upon the region to which the end-user belongs (e.g. an end-user who is currently in the U.S. and opted into privacy choices for U.S. Multi-State Privacy should only be able to manage their opt in status for U.S. Multi-State Privacy on an ongoing basis while in the U.S.)

In this article, we will cover how to conditionally render either a GDPR TCF or U.S. Multi-State privacy manager link/button on your property based upon the end-user's region. 

  Note: Ensure that the Applies Scope setting is correctly configured for your GDPR TCF vendor list and that the Framework Territories is correctly configured for your U.S. Multi-State Privacy vendor list. Additionally, ensure that the scenarios for each messaging campaign are targeting the appropriate regions/states using the geo-targeting condition

Use Case

In this article, we will use the details of the following use case to control which privacy manager the end-user can resurface depending on the region they are in when accessing our property.


On our website property we have two messaging campaigns that collect consent from end-users in the EEA + UK and the United States using GDPR TCF and U.S. Multi-State Privacy frameworks, respectively. We want to implement a button at the bottom of our website that can resurface our configured privacy manager for each respective framework based on the location of the end-user. Our desired experience for this link is as follows:

  • The button should surface the appropriate privacy manager for the regional framework to which the end-user belongs.
  • The text of the button should also change depending on which privacy manager will be resurfaced
  • For users who do not belong to any of the specified regions configured in our vendor lists and scenarios, the button should not be visible



In order to conditionally display and resurface the appropriate privacy manager based on the end-user's region we will:

  • Create a placeholder button on our page
  • Use CSS to set the default visibility of that button to :hidden
  • Add logic to the onConsentReady event callback that will edit the button visibility and text, and insert the appropriate privacy manager for our placeholder button based on the message_type and info.applies parameter
Sourcepoint JavaScript HTML CSS
onConsentReady: function (message_type, uuid, string, info) {
    if((message_type == "usnat") && (info.applies)){
      /* code to insert the usnat footer link */
            document.getElementById("pmLink").innerHTML= "Manage Opt-in Status ";
            document.getElementById("pmLink").onclick= function(){
    if((message_type == "gdpr") && (info.applies)){
      /* code to insert the GDPR footer link */
            document.getElementById("pmLink").innerHTML= "Manage consent";
            document.getElementById("pmLink").onclick= function(){
Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.