• How it works
  • Partners
  • Blog
  • Docs
  • Sign up
  • Client Area

Ad Publishers

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

CMP

  • Adding custom consents or disclosures
  • Creating a link for the user to manage their consents

Sponsor

  • Getting started with Sponsor

Users

  • Getting started with Users
  • Adding the Users SDK to your site
  • Initializing the Users SDK
  • Launching the login/registration screen
  • Managing user sessions
  • Users SDK API Reference

FAQs and Demos

  • Getting started with Ads – Common Issues & FAQs
  • Payment & Fee FAQs
  • Special ad format: Sticky Stack
  • NitroPay
  • Docs
  • CMP
  • Adding custom consents or disclosures

Adding custom consents or disclosures

NitroPay is bundled with our in-house IAB accredited Consent Management Platform (CMP) to collect privacy signals from users in the EU. The purposes and features are pre-selected for you in order to disclose everything necessary for online advertising.

We understand that some sites have their own data disclosures separate from this CMP. In an effort to reduce UI clutter from having multiple independent data processing popups at the same time, we’ve created an area within the CMP for our publishers (see: “Other disclosures” in fig. below)

Once your disclosures have been added in the panel to your site(s), you will likely want to access whether the current user has consented or not during their session at some point. This data is made available through a command added to the TCFv2 api.

argument nametypeexpected valuedescription
commandstring‘hasCustomConsent’
versionint2The current version of the TCF framework
callbackfunctionfunction(result: boolean)The first argument will be true if the user has consented
consent idintThe id of the custom consent you’re checking

Here’s a basic example of it in action, where we created a custom consent with ID 3 and want to see if the user has opted into it.

<script type="text/javascript">
if (typeof window['__tcfapi'] == 'function') {
    __tcfapi('hasCustomConsent', 2, (res) => {
        if (res) {
            // do something
        }
    }, 3);
}
</script>

Note: It’s important to check that the TCF API function exists before checking for consents (as demonstrated above). The API may not exist due to ad blockers, or the user being in a region outside of the EU.

Alternatively (if allowed by the user) consents are available as a cookie named ncmp-cc containing all of the custom consent IDs that the user enabled as a comma delimited string.

Share this document:
  • Facebook
  • Twitter
  • LinkedIn
Updated on January 25, 2023
Creating a link for the user to manage their consents
© GG Software, LP
Privacy Policy | Terms of Use | Contact us