文档

​
​

Development

User Acquisition

Monetization

工业

Unity Ads Monetization

SDK 4.20.0

受支持
​

Android API reference

Unity Ads Monetization

SDK 4.20.0

受支持
​

此页面不支持所选语言。
Unity Ads developer consent
​
​
Developer consent solution
  • Introduction to the developer consent solution
  • Set up a custom consent solution
  1. Unity Ads SDK Android developer monetization
  2. Unity Ads SDK privacy guides
  3. Unity Ads developer consent
  4. Developer consent solution

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 Unity Ads Privacy API.
阅读时间1 分钟
最后更新于 1 个月前

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.

Missing consent

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.

Communicate consent to the SDK

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

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Prerequisites

      • Missing consent

      • Regional privacy frameworks

      • Developer responsibility

      • Impact on revenue

    • Communicate consent to the SDK


报告此页面的问题