enableRejectChoice

Functionality

The function enableRejectChoice enables an additional button in AdConsent GDPR GUI main page, which allows the user to perform a full opt-out without the need to go to Customize Choices and then Save. This option is currently being required in some user countries, so it can be enabled or disabled globally, but also in a per-country basis. Given this is an option that can impact earnings on associated products like AdEngine, this is an option that is disabled by default.

Syntax

function adconsent.gdpr()

argument name

type

optional

value

description

argument name

type

optional

value

description

command

string

 

'enableRejectChoice'

Sets a customizable title in the CMP GUI first layer.

parameter

boolean or Array(string)

 

true, false, or i.e., ['pt', 'de']

A boolean to set globally on or off, or an array with the country codes where it should be enabled

callback

function

✔️

function(result:boolean, success:boolean)

The callback function that is called with the function call result.

Description

Enabling the reject choice will create an additional button in the GDPR UI first screen, which allows the user to perform a full opt-out right from the first screen of AdConsent. The general appearance of the UI will be much like the one below:

Scope

The function must be called before AdConsent shows the GUI. Calls after AdConsent has shown the GUI will be ignored.

Examples

Configure the CMP GUI always to show the reject button

adconsent.gdpr('enableRejectChoice', true);

Configure the CMP GUI always to hide the reject button

adconsent.gdpr('enableRejectChoice', false);

Enable the reject button for Portuese, Spanish, and German users only

adconsent.gdpr('enableRejectChoice', ['pt', 'es', 'de']);