Getting started

This section shows you 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 and iOS) 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:

didomi_config.json
{
"app": {
"name": "My App Name",
"privacyPolicyURL": "http://www.website.com/privacy",
"vendors": {
"iab": {
"all": true
}
},
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
}
}

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

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:

{
"app": {
"name": "My App Name",
"logoUrl": "nameOfTheAssetInYourAppBundle",
"privacyPolicyURL": "http://www.website.com/privacy",
"vendors": {
"iab": {
"all": true
}
},
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
}
}

The logoUrl is the name of your logo in the assets of your app bundle

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:

{
"app": {
"name": "My App Name",
"logoUrl": "http://www.website.com/logo.gif",
"privacyPolicyURL": "http://www.website.com/privacy",
"vendors": {
"iab": {
"all": true
}
},
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
},
"languages": {
"enabled": ["fr", "en"],
"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.

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:

{
"app": {
"name": "My App Name",
"logoUrl": "http://www.website.com/logo.gif",
"privacyPolicyURL": "http://www.website.com/privacy",
"vendors": {
"iab": {
"all": true
}
},
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
}
}

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:

{
"app": {
"name": "My App Name",
"logoUrl": "http://www.website.com/logo.gif",
"privacyPolicyURL": "http://www.website.com/privacy",
"vendors": {
"iab": {
"all": true
}
},
"gdprAppliesGlobally": true,
"gdprAppliesWhenUnknown": true
},
"theme": {
"color": "#BD081C"
}
}

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: