Documentation

Unity Ads Monetization


Android API reference

Unity Ads Monetization


Introduction to developer consent solution

Collect and manage user privacy choices directly in your app, then pass those values to the Unity Ads SDK using the UnityAds Privacy API.
Read time 1 minuteLast updated a day ago

The recommended way to implement user consent with the Unity Ads SDK is through Developer consent. This approach lets you collect and manage user privacy choices directly in your app, then pass those values to the Unity Ads SDK using the UnityAds Privacy API. It provides full flexibility and control over how you display and integrate consent in your existing systems. Using Developer consent gives the following benefits:
  • Full control over how and when consent is collected
  • Compatibility with both Unity Ads and third-party mediation partners
  • A customizable experience that fits your app’s design and user flow
If you don’t implement a custom Developer consent solution, the SDK provides a built-in default consent prompt to users. This fallback ensures a minimum level of compliance but isn’t recommended because it can’t be customized and doesn’t support mediation. When you use Developer consent, your app is responsible for providing valid consent data to the SDK at initialization. If the SDK doesn’t receive explicit consent values, it assumes the user hasn’t provided consent and automatically serves contextual ads instead of personalized ones.

Prerequisites

Review these requirements before setting up custom developer consent: Before implementing a custom consent solution, make sure your project uses the latest version of the Unity Ads SDK. Updating to the latest SDK gives you access to the newest privacy APIs and ensures full compatibility with supported privacy frameworks. The SDK only acts on the consent values it receives. If no value is provided, it defaults to treating the user as if they haven’t consented to data collection or tracking. You must set clear true or false values for each privacy framework that applies to your users.

Regional privacy frameworks

The SDK doesn’t automatically detect or interpret regional privacy laws. You’re responsible for determining which privacy frameworks apply (for example, GDPR or CCPA) for all regions and for sending the corresponding consent signals. Refer to Supported privacy frameworks for a full list.

Developer responsibility

You’re responsible for collecting and managing user consent directly in your app. This allows you to design and control the consent flow according to your user experience. Specifically, you must:
  • Collect and store valid consent from users
  • Manage and update consent when user preferences change
  • Pass the correct consent and opt-out values to the SDK
The SDK doesn’t apply different consent logic per region. Your app must handle that logic before passing data to the SDK.

Impact on revenue

If a user opts out or if consent data is missing, only contextual ads are shown. This can limit ad targeting and may reduce overall revenue potential for your app. Your app must communicate the user’s privacy choices to the SDK before it initializes. Use the UnityAds Privacy API to specify whether a user has provided consent, opted out, or should only receive non-personalized ads. When you provide these values, the SDK automatically adjusts ad delivery to reflect the user’s preferences. If you don’t send consent or opt-out information, the SDK defaults to serving contextual ads only. If a user dismisses your consent dialog without making a choice, consider prompting them again later to obtain an explicit answer.
Note
Users can still access or delete their data at any time by tapping the Unity Data Privacy icon when an ad is shown or after an ad is shown.