Info
Content

Client-side configuration options

In order to change the behavior or design of the CMP you can set several JavaScript-Variables:

Variable Description
window.cmp_regulationkey = "GDPR"; Set legislation/regulation for this user (overrides the automatic detection):
GDPR
GDPRUK
DSGLPD
CCPA
PIPEDA
LGPD
LFPDPPP
PDPA
NDPR
POPIA
PIPA
PDPL
PPA
RPDL
PIPL
PDPAT
ROW (RestOfTheWorld)

window.cmp_privacyurl = "https://www...."; Override the URL for the privacy policy link.
window.cmp_imprinturl = "https://www...."; Override the URL for the imprint link.
window.cmp_tacurl = "https://www...."; Override the URL for the T&C link
window.cmp_target = "_blank"; Override the target window for privacy policy, imprint and t&c link
window.cmp_logo = "https://www..."; Override the logo shown in the consent layer.
window.cmp_setlang = "FR"; Override the default language.

window.cmp_textmacros = {"macroname":"value",

"macroname2": "value", ...};

Set macros that can appear in any translated text of the consent layer. In order to use a macro, please set [mymacro] in the text under Menu > Texts and set the value that this macro should be replaced via JS on the website using window.cmp_textmacros = {"mymacro":"replaced text"};
window.cmp_stayiniframe = 1; If set, the CMP-code will not try to get out of an iframe but instead show the consent layer within this iframe.
window.cmp_iframecallback = function (){...} Defines a callback function that will be called in case when the CMP is loaded in a non-friendly iframe.
window.cmp_dontloadiniframe = true; Set whether or not the CMP should be allowed to load in an iframe. If set to false, the CMP will not load in an iframe. If set to true (default), the CMP will load also in iframes.
window.cmp_noscreen = true; If set to true, the CMP will not show the consent screen automatically (default = false).
window.cmp_proto = "https:"; Override the used protocol for the connection. Default is "https:"
window.cmp_params = "..."; Add additional parameters to the CMP, e.g. '&usedesign=1234' (Note: This variable is set in your stub code.)

window.cmp_nogam = true;

window.cmp_notealium = true;

window.cmp_nofacebook = true;

Set it to true in order to disable automatic creation of datalayer / passing consent information to Google TagManager, Tealium TagManager or Facebook.

window.cmp_datalayername = "...";

Set the name of the data layer variable (default is "dataLayer").

window.cmp_block_inline = true;

(Automatic Blocking Code only) Set the system to block/not block inline scripts if they contain document.cookie. Default: true
window.cmp_block_unkown = true; (Automatic Blocking Code only) Set the system to block/not block unknown scripts/iframes/images. Default: true
window.cmp_block_sync = true; (Automatic Blocking Code only) Set the system to block/not block synchronous scripts. Default: true
window.cmp_block_img = false; (Automatic Blocking Code only) Set the system to block/not block images. Default: false
window.cmp_block_samedomain = false; (Automatic Blocking Code only) Set the system to block/not block scripts/iframes/images from the same domain. Default: false
window.cmp_block_ignoredomains =
["domain1.com","domain2.net","domain3.org"];
(Automatic Blocking Code only) Set the system to not block scripts/iframes/images from these domains.

window.cmp_block_ignorepaths =

["domain1.com/path/to/ignore","domain2.com/path"];

(Automatic Blocking Code only) Set the system to not block scripts/iframes/images from these domains with these paths.
window.cmp_preview_accept = true; If set to true, accepting a preview (dynamic content blocking) will automatically save the users choice (checkbox will be disabled).
window.cmp_preview_minheight = 200;
window.cmp_preview_minwidth = 100;
Changes the minimum height/width of an element in order to be eligible for a preview (dynamic content blocking). Default is 300x300.
window.cmp_waitforimport = 3000; Tells the CMP to delay the start period by a maximum of x milliseconds and wait for incomming calls to __cmp('importConsent',...). Waiting period can be skipped by calling __cmp('cancelwait');
window.cmp_disablesubchecks = true; Tells the automatic code stop watching for changing elements, after website is fully loaded.
Default = false
window.cmp_custombutton = true; Activates a custom button.
window.cmp_custombutton_name = "..."; Title (label) of the custom button.
window.cmp_custombutton_pos = 0; Position on which the button should be inserted. Starting at 0 for the first position
window.cmp_custombutton_screen = 2; Define where the button should be visible.
0 = Button visible on welcome page and custom settings page
1 = Button visible only on welcome page (Default)
2 = Button visible only on custom settings page
window.cmp_custombutton_vendors = [...]; Vendors that should be enabled when the button is clicked.
window.cmp_custombutton_purposes = [...]; Purposes (and assigned vendors) that should be enabled when the button is clicked.
window.cmp_custombutton_logic = 0;

Set the behavior of the custom button:

0 - Button is always clickable

1 - Button can only be clicked if all purposes listed in window.cmp_custombutton_purposes are already enabled

2 - Button can only be clicked if all vendors listed in window.cmp_custombutton_vendors are already enabled

3 - Button can only be clicked if all purposes  and all vendors listed in window.cmp_custombutton_vendors and window.cmp_custombutton_purposes are already enabled

4 - Button can only be clicked if at least one purpose listed in window.cmp_custombutton_purposes is already enabled

5 - Button can only be clicked if at least one vendor listed in window.cmp_custombutton_vendors is already enabled

6 - Button can only be clicked if at least one purpose or at least one vendor listed in window.cmp_custombutton_vendors and window.cmp_custombutton_purposes is already enabled

7 - Button can only be clicked if at least one purpose and at least one vendor listed in window.cmp_custombutton_vendors and window.cmp_custombutton_purposes is already enabled

window.cmp_consentmode_timeout = 500; Set the wait_for_update timeout for Google Consent Mode.
window.cmp_storage_name_default = "..."; Override default cookie/localstorage name for consent information.
window.cmp_storage_name_cpc = "..."; Override default cookie/localstorage name for purpose consents.
window.cmp_storage_name_cvc = "..."; Override default cookie/localstorage name for vendor consents.
window.cmp_storage_name_ccc = "..."; Override default cookie/localstorage name for compressed consent information.
window.cmp_cookie_path = "/"; Override cookie path.
window.cmp_pur_enable = true; Must be set to true in order to enable pay-or-accept modes. When using the integrated contentpass module, this will automatically be set to true.
window.cmp_pur_loggedin = false; Signal to the CMP whether or not the user is logged in as a paid user.
window.cmp_pur_mode = 0;

Sets how the CMP should treat visitors with existing choices. Set to 0 to signal to the CMP that visitors with existing choises that did not accept all vendors, shall be presented with the consent layer again.

Set to 1 to signal to the CMP that visitors with existing choises that did not accept all vendors, shall not be presented with the consent layer again.

Set to 2 to signal to the CMP that visitors should at least accept a certain amount of vendors and/or purposes. Vendors/purposes are defined via window.cmp_pur_purposes and window.cmp_pur_vendors giving an array of purpose- or vendor-IDs.

window.cmp_disable_spa = 1;

Suppresses checks for URL change in SPAs.

In order to override settings in AMP, please add the variable names as parameters to the AMP consent URL(e.g. &cmp_privacyurl=https%3A%2F%2Fwww.mywebsite.com%2Fprivacy). Example:

Please note that cmp_regulation, cmp_stayiniframe, cmp_proto and cmp_textmacros are not supported for AMP. In order to insert macros, please use &cmp_macro_name=value (e.g. &cmp_macro_websitename=myWebsite in order to replace macro [websitename] with "myWebsite").

Back to top