Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Country and GDPR
  • Publisher country
  • Supported languages
  • Position (Mobile only)
  • Disagree & Close
  • "Continue without agreeing" link (mobile)
  • Close cross (mobile)
  • "Disagree" and legitimate interest
  • Texts
  • Vendors and purposes
  • Window for recollecting consent
  • Recollect consent after a certain date
  • Consent expiration
  • Denied consent duration
  1. SDKs
  2. Mobile and TV SDKs
  3. Consent notice

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 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:

Custom JSON
{
    "app": {
        "gdprAppliesGlobally": true,
        "gdprAppliesWhenUnknown": true
    }
}

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:

Custom JSON
{
    "app": {
        "country": "ES"
    }
}

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:

Custom 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

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:

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:

Custom JSON
{
  "notice": {
    "position": "bottom"
  }
}
Custom JSON
{
  "notice": {
    "position": "popup"
  }
}

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:

Custom JSON
{
    "notice": {
        "denyOptions": {
            "button": "primary"
        }
    }
}

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:

Custom JSON
{
    "notice": {
        "denyOptions": {
            "button": "secondary"
        }
    }
}

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:

Custom JSON
{
    "notice": {
        "denyOptions": {
            "button": "none"
        }
    }
}

"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:

Custom JSON
{
    "notice": {
        "denyOptions": {
            "link": true,
            "button": "none"
        }
    }
}

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:

Custom JSON
{
    "notice": {
        "denyOptions": {
            "cross": true,
            "button": "none"
        }
    }
}

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

Custom JSON
{
    "notice": {
        "denyOptions": {
            "button": "primary"
        },
        "denyAppliesToLI": true
    }
}

Texts

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

Configuration Key
Description

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:

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"
      },
      "deny": {
        "en": "Disagree & Close",
        "fr": "Refuser et fermer"
      },
      "learnMore": {
        "en": "Learn More",
        "fr": "En savoir plus"
      },
      "privacyPolicy": {
        "en": "Our Privacy Policy",
        "fr": "Notre politique de confidentialité"
      },
      "viewOurPartners": {
        "en": "View our partners",
        "fr": "Voir nos partenaires"
      }
    }
  }
}

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

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.

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

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:

{
    "user": {
       "ignoreConsentBefore": "2020-09-09T00:00:00Z"
    }
}

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:

{
    "app": {
        "consentDuration": 2592000 // Custom consent duration in seconds
    }
}

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.

{
    "app": {
        "deniedConsentDuration": 1296000 // Denied consent duration in seconds
    }
}

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.

PreviousGetting startedNextCustomize the preferences popup

Last updated 7 months ago

to see how they can be configured.

Read our detailed section
Disagree & Close button when deny button is set to primary (mobile)
Disagree & Close button when deny button is set to primary or secondary (TV)
Disagree & Close button when deny button is set to secondary (mobile)
"Continue without agreeing" link when denyOptions.link is set to true.
Cross allowing to close the notice without agreeing