Set up GDPR consent
Use the recommended best practice of setting up your own custom consent solution using Developer Consent APIs to be compliant with GDPR requirements with your app.
Read time 2 minutesLast updated 6 hours ago
All versions of the Unity Ads SDK are compliant with the General Data Protection Regulation (GDPR), which took effect in the European Economic Area (EEA) on May 25, 2018. Visit our legal site for more information on Unity's approach to privacy.
Implement Unity's built-in consent solution
The recommended best practice is to update to the latest version of the Unity Ads SDK, but this is not required for GDPR compliance. SDK versions earlier than 2.0 now only serve contextual ads to users, strictly based on geographic location and in-app actions. SDK versions 2.0 and later automatically present affected users with an opportunity to opt in to targeted advertising, with no implementation needed from the publisher. On a per-app basis, the first time a Unity ad displays, a banner provides the option to opt in to behaviorally targeted advertising. Thereafter, the user can select an information button to manage their privacy choices.Implement a custom consent solution
If you implement a custom consent solution in your app, you must send your users’ consent statuses to the Unity Ads SDK. The following sections describe the guidelines for handling custom consent implementations as a non-TCF user and as a TCF user with an integrated CMP.Custom consent implementation using Developer Consent API
If a publisher or mediator sends us a value by using our Developer Consent API, the Unity opt-in does not display. Note that users can still request opt-out or data deletion, and can access their data at any time during an ad display by selecting the Unity Data Privacy icon. While the recommended best practice is to use Boolean values forMetaDatatruefalse// If the user opts in to targeted advertising:MetaData gdprMetaData = new MetaData("gdpr");gdprMetaData.Set("consent", "true");Advertisement.SetMetaData(gdprMetaData);// If the user opts out of targeted advertising:MetaData gdprMetaData = new MetaData("gdpr");gdprMetaData.Set("consent", "false");Advertisement.SetMetaData(gdprMetaData);