How to Implement a Consent Listener for Non-IAB Vendors

How to Implement a Consent Listener for Non-IAB Vendors

Each vendor that you have implemented on your page, such as Facebook or Google Analytics, would need to have the nonIABVendorConsent API implemented to gather user consent to comply with GDPR by implementing the script below to your page, at the same position where the original script/function of the vendor that you have.

<script>
  window.__tcfapi('addEventListener', 2, function(tcData, listenerSuccess) {
  if (listenerSuccess) {
      if (tcData.eventStatus === 'useractioncomplete' ||
          tcData.eventStatus === 'tcloaded') {

         window.__tcfapi('getNonIABVendorConsents',2,function(nonIabConsent, nonIabSuccess) {
           if (nonIabSuccess && nonIabConsent.nonIabVendorConsents && nonIabConsent.nonIabVendorConsents[INSERT THE NON-IAB VENDOR ID HERE]) {
Insert the original script/function from the third-party services such as Facebook/Google Analytics here
           }
         });
      }
   }
});
</script>


Note:
  1. Do replace the "INSERT THE NON-IAB VENDOR ID HERE" with the Non-IAB Vendor ID provided by our Account Management team.
  2. Do insert the original script/function of the said vendor in the blue section of the script.
  3. Do test this script on staging environment before deploying any changes to your live site.

If you're using Google Tag Manager to implement any scripts/functions on your page, do refer to this guide by Quantcast.

Do reach out to us via support@publift.com if you have any questions.


    • Related Articles

    • What is CMP?

      The CMP (consent management platform) is a privacy regulation pop up that ensures we have consented to use your user’s data to serve them personalised ads. It is required by law for users coming to your website from Europe (GDPR) and California ...
    • What is AdBlock monetisation?

      We have a feature built within our tag which allows you to serve ads to certain ad block users that have opted in to see acceptable ads. This is about 70% of current ad-block users and allows us to serve certain non-intrusive ad creatives and ad ...
    • Blockthrough - FAQs

      The purpose of this document is to explain what Blockthrough's product does, how it works within the Fuse tag, on your website and how we'll help you understand the uplift. Q. What is Blockthrough? A: Blockthrough is an advertising technology that ...
    • I've been contacted by a new network

      A new network has contacted you expressing interest in advertising on your site. To begin testing a new ad network, an IO will be signed, with rates and ad types (display, video etc.) agreed upon, and the creative tags will be sent across to either ...