by Overwolf
  • Nitro
  • Publishers
    PUBLISHERS
    How it Works Documentation Newsletter
  • Advertisers
    ADVERTISERS
    Advertisers Offering Top Sites
  • Resources
    RESOURCES
    Ad Unit Demos Blog & News Press Releases FAQ Case Studies
  • NitroDex
Log in

Ad Publishers

  • Special Ad Formats
  • Installing the ad script on your page
  • Creating an ad placement
  • Setting up your ads.txt file
  • Creating a Playlist and Adding Content
  • US Privacy law compliance steps
  • Creating a Video Placement
  • Ad script lifecycle events
  • Detecting ad-blocking users
  • Placement Configuration API

Data and Privacy

  • Passing Hashed Emails
  • Support for Google Analytics and Consent Mode
  • Adding custom consents or disclosures
  • Creating a link for the user to manage their consents

FAQs and Demos

  • FAQ
  • Ad Layout Best Practices
  • Nitro Glossary
  • Electron Apps and NitroPay
  • NitroPay
  • Docs
  • Data and Privacy
  • Creating a link for the user to manage their consents

Creating a link for the user to manage their consents

NitroPay’s ad script is bundled with our IAB registered CMP to collect data processing consents from users in the European Union. IAB requires the initial prompt be shown automatically, which NitroPay takes care of. If a consent string exists on the user’s device the initial prompt won’t be shown and the user needs a way to bring it back up when they want to manage their consents.

Our CMP is only loaded on your page if the user is accessing from a region where the GDPR is in effect. Because of this, the management link will only be relevant to those specific users and won’t work outside of the EU. We don’t assume the most appropriate place for this link in your unique layout, so consider the 2 methods below and implement the solution that works best for your site.

Simple Implementation #

The CMP will look for an element with id ncmp-consent-link and inject a button when it loads. You can style the button with your site’s stylesheets to match it to your page.

<div id="ncmp-consent-link"></div>

SPAs (single page apps) can instruct the CMP to look for your element and inject the button again with the following.

if (window['__cmp']) {
    window['__cmp']('addConsentLink');
}

It’s important to check for the existence of the __cmp property on your window object before running any commands since it will not be there for non-EU users.

Advanced Implementation #

The following example creates a div consent-box that starts out hidden, and is only made visible to users in GDPR zones.

<div id="consent-box" style="display:none">
  <button onclick="window.__cmp('showModal');">
    Update cookie preferences
  </button>
</div>

<script>
  if (window["nitroAds"] && window["nitroAds"].loaded) {
    document.getElementById("consent-box").style.display = window["__tcfapi"]
      ? ""
      : "none";
  } else {
    document.addEventListener(
      "nitroAds.loaded",
      () =>
        (document.getElementById("consent-box").style.display = window["__tcfapi"]
          ? ""
          : "none")
    );
  }
</script>


To test GDPR features from regions outside of the zones, append ?gdpr_debug=1 to your URL. E.g. https://example.com/?gdpr_debug=1.

What are your Feelings
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on January 25, 2023
Adding custom consents or disclosures
Table of Contents
  • Simple Implementation
  • Advanced Implementation
We use cookies to improve your experience and increase the relevancy of content when using Nitro. Our cookies are used for analytics, optimization, and advertising operations. Learn more.Got it
  • Publishers

    • How it works
    • Documentation
    • Newsletter
  • Advertisers

    • Advertisers Offering
    • Top Sites
  • Resources

    • Ad Unit Demos
    • Blog & News
    • Press Releases
    • FAQ
    • Case Studies
  • Companions

    • Overwolf
    • CurseForge
    • Tebex
  • Nitrodex

© Overwolf. All rights reserved.
  • Terms of Service
  • Privacy Policy