解读用户意见征求模式值
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
UMP SDK 可以解读 Google 意见征求模式的 GDPR 用户意见征求选项。
UMP SDK 会解读以下用途:
- Google Ads 存储
- 广告个性化
- 广告用户数据
- Google Analytics 存储
对于需要征求用户同意才能使用您产品的应用,解读意见征求模式值非常有用。
准备工作
开始使用
在 AdMob 界面中启用意见征求模式。如需了解详情,请参阅管理意见征求模式设置。
使用 UMP SDK 3.0.0 或更高版本。
请先初始化 Firebase,然后再启动 UMP SDK。如需了解详情,请参阅将 Google Analytics SDK 添加到您的应用。
设置默认同意情况
当欧盟 (EU) 法规适用于用户时,UMP SDK 会更新用户同意情况。
当欧盟法规不适用于用户时,设置默认同意情况。
使用基本模式
如需使用基本模式,请参阅意见征求模式基本模式支持。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["The UMP SDK can interpret GDPR consent choices for Google\n\n[Consent Mode](//support.google.com/admanager/answer/10076805#consentmode).\n\nThe UMP SDK interprets the following purposes:\n\n- ad storage\n- ad personalization\n- ad user data\n- analytics storage\n\nInterpreting consent mode values is useful for apps that get consent for the use\nof your products.\n\nBefore you begin\n\n- Make sure you are using the [Google Analytics for Firebase SDK](//firebase.google.com/docs/analytics) in your app.\n- Choose [Basic versus advanced consent mode](//developers.google.com/tag-platform/security/concepts/consent-mode#basic-vs-advanced). Google supports advanced mode by default, while basic mode has additional steps.\n\nGet started\n\n1. Turn on consent mode in the AdMob UI. For more details, see\n\n [Manage consent mode settings](//support.google.com/admanager/answer/16053245).\n\n2. Use UMP SDK version 3.0.0 or higher.\n\n3. Initialize Firebase before starting the UMP SDK. For more details, see\n\n [Add the Analytics SDK to your app](//firebase.google.com/docs/analytics/get-started?platform=ios#add-sdk).\n\nSet default consent state\n\nThe UMP SDK updates the consent state when European Union (EU) regulations\napply to the user.\n\n[Set the default consent state](//developers.google.com/tag-platform/security/guides/app-consent?consentmode=basic&platform=ios#default-consent)\n\nwhen EU regulations don't apply to the user.\n\nUse basic mode\n\nTo use basic mode, see [Consent mode basic mode support](//developers.google.com/funding-choices/fc-sdks#consent_mode_basic_mode_support)."]]