Customize the notice

The notice is the first banner or pop-in that gets displayed on your website 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 to true, all visitors will see consent notices. If set to false, 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 to true, the user will see a consent notice when its country is unknown.

Example:

didomi_config.json
{
"app": {
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
}
}

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:

didomi_config.json
{
"languages": {
"enabled": ['en', 'fr'],
"default": 'fr'
}
}

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:

Language

Code

Bulgarian

bg

Catalan

ca

Croatian

hr

Czech

cs

Danish

da

Dutch

nl

English

en

Finnish

fi

French

fr

German

de

Greek

el

Hungarian

hu

Italian

it

Lithuanian

lt

Polish

pl

Portuguese

pt

Romanian

ro

Russian

ru

Slovak

sk

Slovenian

sl

Spanish

es

Swedish

sv

Turkish

tr

Ukrainian

uk

Position

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:

Values

Description

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:

Bottom banner
Popup
Bottom banner
didomi_config.json
{
"notice": {
"position": "bottom"
}
}
Popup
didomi_config.json
{
"notice": {
"position": "popup"
}
}

Texts

You can change the message of the notice as well as the "Agree & Close" and "Learn More" buttons.

Configuration Key

Description

notice.content.notice

Message in the banner or popup.

notice.content.dismiss

"Agree & Close" button

notice.content.learnMore

"Learn More" button

Example:

didomi_config.json
{
"notice": {
"content": {
"notice": {
"en": "This website uses cookies to provide you with tailored commercial offers",
"fr": "Ce site utilise des cookies pour vous fournir des offres commerciales personalisées"
},
"dismiss": {
"en": "Agree & Close",
"fr": "Accepter et fermer"
},
"learnMore": {
"en": "Learn More",
"fr": "En savoir plus"
}
}
}
}

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.

Window for recollecting consent

Every time a new vendor is added in your tag configuration or in the IAB vendors list (if you choose the option all), the notice will be displayed again. To avoid displaying the notice too often, you have the option to choose a number of days during which the notice won't 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.

didomi_config.json
{
"notice": {
"daysBeforeShowingAgain": 5 // Number of days. Default is 0
}
}

If you choose that option, having the notice not being displayed will not mean that the user gave his consent to all the vendors. Therefore, Didomi.Shared.isUserConsentStatusPartial() can return true .

Read our detailed section to see how they can be configured.