Getting started
This section shows you how to configure a consent notice via a didomi_config.json
file, or from the Behavior
> Custom json
field in the console. We recommend using our Console to configure your notice instead of a local configuration file.
In this section, you will learn how to display a consent notice to let your users know that you and your vendors are using cookies, personalizing content and advertising, etc. in your mobile applications.
The notice is fully compliant with the IAB GDPR framework and will share the consent information collected from users with third-parties adhering to this framework to let them know what processing they are allowed to run. We also offer options to control the loading or behavior of third-party SDKs.
Make sure that our SDK is setup
Before continuing, please read our section on setting up our SDK (Android / Android TV and iOS / tvOS) to learn how to do the initial setup of our SDK. You must do that before being able to continue with the configuration of your SDK.
Show the consent notice
Use the following didomi_config.json
content to get started:
This will display our standard banner to all app users, collecting consent for all the IAB vendors (more on this later, for now, just keep in mind that if you remove the vendors
property, no banner will be displayed as the banner will consider that there is no consent to collect). Keep reading to see what configuration options you can use to customize the banner.
What visitors to collect consent for?
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.
Configure your app name and logo
The name of your website (or company) is used to customize our default messages.
Set the app.name
and app.logoUrl
properties to configure your app name and logo:
The logoUrl
parameter can be the name of your logo in the assets of your app bundle, or an url leading to your logo.
When using a remote image url, svg format is not supported.
If logoUrl
is provided and the image exists, then that image will be displayed at the top of the Preferences screen as shown below:
Otherwise, the name
text will be displayed at the top of the Preferences screen as shown below:
Configure your supported languages (optional)
Our SDK supports multiple European 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.
Add your privacy policy URL
Our default text includes a link to your privacy policy. You can set that URL with the app.privacyPolicyURL
property.
Example:
Customize the consent notice
We offer further configuration options to customize the notice for your app. For instance, you can pretty easily change the colors of the notice and the buttons by setting the theme's primary color:
You can also customize the shape and position of the notice and much more. Read the Customization section to get more information on the configuration options of the notice.
Configure vendors and purposes
As per the regulation, the consent notice collects consents for a specific set of vendors and purposes. You must configure the notice to let it know what vendors are used on your website and it will automatically determine what purposes are required.
Read our dedicated section to learn how to configure your vendors.
Add a link for the user to manage their preferences
After the user has given consent or closed the banner, you must given them an easy access to their choices so that they can update them.
You can use the function showPreferences()
(see the Android or iOS documentation) to open the preferences manager and let the user update her choices.
We suggest adding this link in your privacy policy or in a header or footer menu in your app.
What's next?
There is plenty more to customize on our banner, read the following sections for more information:
Last updated