Customize the notice
The notice is the first banner or pop-in that gets displayed on your app to ask the user to give consent. It is a short version of the full Preferences pop-in that has all the details on the purposes and vendors that you are collecting consent for.
This section presents the main customization options that are available for the consent notice.
Country and GDPR
If you are an EU-based company then you must collect consent and enforce GDPR for all users no matter where they are located. There is no exception to that rule so you'll want to keep the properties app.gdprAppliesGlobally
and app.gdprAppliesWhenUnknown
to true
.
If you are not an EU company then your only obligation is to enforce GDPR for EU-based users. We offer the following two configuration options for you to define what behavior you want:
app.gdprAppliesGlobally
defines whether GDPR should be applied to all visitors or not. If set totrue
, all visitors will see consent notices. If set tofalse
, only visitors from the EU will see the consent notices.app.gdprAppliesWhenUnknown
defines what to do when the user country is unknown. If the SDK is unable to determine the user country (because the device does not have a location, the location permission is not available, or there is no Internet connection), this flag will decide if the user should see a consent notice or not. If set totrue
, the user will see a consent notice when its country is unknown.
Example:
Publisher country
You can define your publisher country code by setting app.country
property in the configuration file (2 letters, ISO 3166-1 alpha-2). This value will be used when generating the IAB TCF consent, both in the consent string and stored on device with the IABTCF_PublisherCC
key.
Example:
Supported languages
Our SDK supports multiple languages out-of-the-box with translations for all our standard messages. See below if your website uses other languages. English is the default language: if a visitor does not use a supported language, the banner and popups will be displayed in English.
You do not need to do anything to use Didomi's languages. However, you can choose to enable only certain languages and set up a different default language.
Set the languages.enabled
property to your list of supported languages and languages.default
property as the default language in case the customer language is not supported:
By default, enabled
is the list of supported languages by Didomi and default
is en
. You can support a different language by changing the English texts and setting English as the only enabled language.
We currently support the following languages:
Arabic
ar
Arabic (Jordan)
ar-JO
Azerbaijani
az
Bengali
bn
Bulgarian
bg
Catalan
ca
Croatian
hr
Czech
cs
Danish
da
Dutch
nl
Dutch (Belgium)
nl-BE
English
en
English (New Zealand)
en-NZ
English (United Kingdom)
en-GB
Estonian
et
Finnish
fi
Filipino / Tagalog
fil
French
fr
French (Belgium)
fr-BE
French (Canada)
fr-CA
German
de
German (Austria)
de-AT
German (Switzerland)
de-CH
Greek
el
Hebrew
he
Hindi
hi
Hungarian
hu
Indonesian
id
Italian
it
Japanese
ja
Korean
ko
Latvian
lv
Lithuanian
lt
Macedonian
mk
Malaysian
ms
Norwegian
no
Polish
pl
Portuguese
pt
Portuguese (Brazil)
pt-BR
Romanian
ro
Russian
ru
Serbian
sr
Serbian Latin
sr-Latn
Simplified Chinese
zh-CN
Slovak
sk
Slovenian
sl
Spanish
es
Swahili
sw
Swedish
sv
Thai
th
Traditional Chinese
zh-TW
Turkish
tr
Ukrainian
uk
Vietnamese
vi
Position (Mobile only)
On mobile, the notice can be displayed as a popup or a regular bottom banner.
The notice.position
configuration parameter lets you define the position of the notice. The possible values are:
popup
Display the notice as a full-screen popup. Also set your website logo and name to make sure the popup is personalized.
bottom
Display a banner notice at the bottom of the screen
Examples:
Disagree & Close
You can enable the "Disagree & Close" option from the notice by setting the denyOptions
property. In this case, the "Learn More" button will be shown as a link.
To show a button containing the "Disagree & Close" text, set the denyOptions.button
property to primary
or secondary
. Default is none
. Note that on TV, the Disagree & Close button will always be displayed with the same style, whether the property is set to primary
or secondary
.
Disagree & Close as primary
You can show the "Disagree & Close" button styled as a primary button by setting the denyOptions.button
to primary
as shown below:
Expected result:
Disagree & Close as secondary
On mobile, you can show the "Disagree & Close" button styled as a secondary button by setting the denyOptions.button
to secondary
as shown below:
Expected result:
Remove Disagree & Close button
To make sure the "Disagree & Close" button is not displayed, you can disable it by setting denyOptions.button
to none
, as shown below:
"Continue without agreeing" link (mobile)
On mobile, you can also display a "Continue without agreeing" link rather than the "Disagree & Close" button by setting the denyOptions.link
property to true
and denyOptions.button
to none
, as shown below:
Expected result:
The "Continue without agreeing" link has the same behavior as the "Disagree & Close" button.
Close cross (mobile)
In order to comply with Italian regulations, you should display a cross allowing users to close the notice. On mobile, you can display a cross instead of the "Continue without agreeing" link by setting the denyOptions.cross
property to true
and denyOptions.button
to none
, as shown below:
Expected result:
The cross has the same behavior as the "Disagree & Close" button.
"Disagree" and legitimate interest
By default, "Disagree & close" and "Continue without agreeing" only apply to consent, not legitimate interest. This means that after this option was selected, purposes based on legitimate interest will still be enabled, and vendors using these purposes will still be enabled for data processing based on legitimate interest.
This behavior can be controlled by setting the denyAppliesToLI
property. When set to true
, selecting "Disagree & close" or "Continue without agreeing" will disable both consent and legitimate interest based data processing for all purposes and all vendors..json
Texts
You can change the message of the notice as well as the "Agree & Close" and "Learn More" buttons.
notice.content.title
Title of the banner or popup
notice.content.notice
Message in the banner or popup
notice.content.dismiss
"Agree & Close" button
notice.content.deny
"Disagree & Close" button
notice.content.learnMore
"Learn More" button
notice.content.privacyPolicy*
"Our Privacy Policy" button
* Fields marked with asterisk are relevant only for TV SDKs for now
Example:
Note that you should provide translations for all the languages that your app supports. We provide translations for all our standard messages.
Vendors and purposes
You must configure the vendors for which consent is collected by our consent notice and displayed in the preferences popup.
Read our detailed section to see how they can be configured.
Window for recollecting consent
By default, consent is automatically re-collected and the notice is displayed in these cases:
After 13 months (maximum acceptable cookie lifetime)
When a new vendor is added in the IAB vendors list (if you choose the option
all
)
The third case (a new vendor is added) can happen pretty often so you have the option to choose a number of days during which the notice will not be displayed even though there are new vendors to collect consent for. By default, the number is zero and the notice will be displayed automatically if a new vendor is added.
During that consent recollection window:
New users will be asked for consent for the new vendor immediately.
Previous users that had already given consent within the window (ie less than X days ago) will not be asked again until the expiration of the window. The new vendor will not have consent during that time.
Previous users that had already given consent outside of the window (ie more than X days ago) will be asked again immediately.
If you choose that option and because the notice is not shown again, the user consent status will be partial and some vendors will not have consent information. The function Didomi.isUserConsentStatusPartial()
can return true
in these cases.
Recollect consent after a certain date
In some cases, you might want to force recollect consent for all users after a certain date, irrespective of their choices and the configured window for recollecting consent.
This can be achieved by setting an ISO8601 date in the user.ignoreConsentBefore
property:
When the user has given consent before the provided date, consent will be automatically recollected. Dates in the future are ignored until they become current so you can schedule a consent recollection for a specific date in the future.
Consent expiration
Didomi CMP allows you to customize the lifetime of the consent so that it expires after a specific time.
You can use app.consentDuration
configuration option to specify custom consent duration:
The app.consentDuration
configuration option accepts custom consent duration value in seconds.
By default, consent expires after 31,622,400 seconds (approximately 12 months) if custom consent duration is not specified.
Denied consent duration
It is possible to apply a specific consent duration when user denies consent for all purposes and vendors. This is done by setting the app.deniedConsentDuration
configuration option.
If this option is set and user disagrees to consent based data processing for all purposes and vendors (legitimate interest based data processing is ignored), the consent will expire after this time instead of the standard consent duration, and user consent will be asked again.
If user selects "disagree to all" button from notice or from preferences screen, and app.deniedConsentDuration
is set, this duration will apply.
app.deniedConsentDuration
value should be shorter than app.consentDuration
, otherwise it will be ignored.
The app.deniedConsentDuration
configuration option accepts custom consent duration value in seconds.
If no value is set, the standard consent duration will still be applied to denied consents.
Last updated