GDPR compliance

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.

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.

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.

Non-TCF users

If you’re using a mediation provider, refer to their documentation to determine if they support sharing user consent status with the Unity Ads SDK. Some mediators, such as LevelPlay, have APIs that let you set the consent status of a user and automatically communicate the consent status to Unity Ads on your behalf.

Note: Some mediators might also support Google’s Additional Consent mode, which is a mechanism to share consent with non-TCF vendors like Unity Ads. Mediators, such as LevelPlay, read the Additional Consent string and pass the consent status to Unity Ads where applicable.

Otherwise, use the Developer Consent API to directly pass the consent status to the Unity Ads SDK.

TCF users

If you’re using Google UMP, refer to Google’s Manage GDPR ad partners documentation to complete your setup on the AdMob platform.

If you’re not using Google UMP, refer to the documentation of your CMP for configuration support in implementing Google’s Additional Consent.

During the setup, do the following to ensure Unity Ads is included as a custom ad partner in AdMob:

  1. Sign into your AdMob account.
  2. Go to Privacy & messaging.
  3. Select Personalized ads as the type of ads you want to show.
  4. Go to the Review your ad partners section, then edit the Commonly used ad partners.
  5. Select Custom ad partners in the ad partners page, then enable Unity Ads.

Important: Unity Ads is not a registered TCF vendor, which means that Unity does not directly read the TCString to determine user consent. To the extent you are collecting consent for Unity Ads via the Additional Consent (or similar) mechanism, some mediators, like LevelPlay, read this string and communicate consent to Unity Ads. In all cases, you’ll still need to share the consent status of the user through your mediator (if supported) or using the Developer Consent API.

When using another integrated CMP, set up your unregistered TCF networks according to the CMP guidelines. Ensure that you add Unity Ads as a non-TCF vendor to your CMP.

If you’re using a mediation provider, refer to their documentation to determine if they support sharing user consent statuses with the Unity Ads SDK. Some mediators, such as LevelPlay, have APIs that let you set the consent status of a user and automatically communicate the consent status to Unity Ads on your behalf.

If you’re not using a mediator and intend to process user consent yourself, read the relevant consent value for the user according to their CMP provider, then pass the consent status to the Unity Ads SDK via our Developer Consent API.

The following table details where to find instructions for passing user consent statuses to the Unity Ads SDK:

TCF CMP usersNon-TCF users
Using a mediation providerRefer to your mediator’s documentation to learn if and how they support sharing user consent status with the Unity Ads SDK, which is usually done through APIs or Google’s Additional Consent mode.Refer to your mediator’s documentation to learn if and how they support sharing user consent status with the Unity Ads SDK, which is usually done through APIs.
Without a mediation providerRefer to the Developer Consent API to pass the consent status directly to the Unity Ads SDK.Refer to the DDeveloper Consent API to pass the consent status directly to the Unity Ads SDK.

If a publisher or mediator sends us a value via 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.

Use the following API to pass a consent flag to the Unity Ads SDK.

Tip: If the user takes no action to agree or disagree with targeted advertising (for example, closing the prompt), the recommended best practice is to re-prompt them at a later time.

Unity (C#)

// 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);

Note: You must commit the changes to the MetaData object for each value before trying to set another value. The second parameter is an object (a string in this example). Using a Boolean value will result in an error.

iOS (Objective-C)

// If the user opts in to targeted advertising:
UADSMetaData *gdprConsentMetaData = [[UADSMetaData alloc] init];
[gdprConsentMetaData set:@"gdpr.consent" value:@YES];
[gdprConsentMetaData commit];

// If the user opts out of targeted advertising:
UADSMetaData *gdprConsentMetaData = [[UADSMetaData alloc] init];
[gdprConsentMetaData set:@"gdpr.consent" value:@NO];
[gdprConsentMetaData commit];

Note: You must commit the changes to the MetaData object for each value before trying to set another value.

Android (Java)

// If the user opts in to targeted advertising:
MetaData gdprMetaData = new MetaData(this);
gdprMetaData.set("gdpr.consent", true);
gdprMetaData.commit();

// If the user opts out of targeted advertising:
MetaData gdprMetaData = new MetaData(this);
gdprMetaData.set("gdpr.consent", false);
gdprMetaData.commit();

Note: You must commit the changes to the MetaData object for each value before trying to set another value.