在本页中,您将了解如何使用 MAX 条款和隐私政策流程来提示用户接受使用条款和隐私政策。
您可以选择是否使用 MAX SDK 中的 CMP 流程。 如果您集成了自己的 CMP 流程,请确保在初始化 MAX SDK 之前完成该流程。
由于 iOS 17.4 中的 bug,App Tracking Transparency (ATT) 弹窗可能会过早地指示用户拒绝了 ATT。 这会导致 AppLovin SDK 通过配置了 LAT 的广告平台初始化广告单元,即使用户随后授予 ATT 许可。 如果您正在使用 AppLovin 的 Unifed Consent Flow,请更新至最新版本的 iOS SDK (12.3.0+) 以缓解该问题。
配合 Google UMP 使用时,AppLovin MAX SDK 符合 TCF v2 的要求:MAX SDK 可以接收许可字符串和 AC 字符串,并按照 TCF v2 许可中的描述,将 TCF v2 许可字符串/状态转发至被聚合的平台。
If you do not use Google UMP as your CMP, either through AppLovin’s automated flow or otherwise, you must ensure that the CMP you choose supports the mediated networks you integrate.
如果您不使用 CMP,则必须继续按照 GDPR 及其他地区的许可和其他适用标记中的描述设置 AppLovin SDK 的二进制许可标记。
要通过 MAX 对接 Google 广告需求,请务必在开始集成前查看 Google CMP 要求。
AppLovin MAX SDK 12.0.0 及以上版本可自动化集成 Google UMP。 因此集成 MAX SDK 之外,您无需手动集成 Google UMP。 这是一项完全可选的设置,AppLovin 会为您说明如何启用额外的 Google UMP 集成。 下面是此流程的可视化呈现:
在下列任一情况下,TCF 许可状态可能为 false:
您必须先创建 Google GDPR 信息并在 AdMob 控制面板中发布该信息,才能在 MAX 许可流程中显示 Google GDPR 表单。 请按照下列步骤操作:
请勿勾选 Close (do not consent) 选项。
#ffffff)。#6e6e6e)。在默认的 GDPR 信息中,Google 可能不会显示您的所有广告平台合作伙伴。 如果未能纳入这些平台,您的广告收入可能会受到负面影响。 请按照本节中的步骤操作,确保 GDPR 消息中显示所有广告合作伙伴。
要自定义在 GDPR 消息中显示的广告合作伙伴,请按照下列步骤操作:
对于 Mintegral,从广告合作伙伴列表中选择 Mobvista/Mintegral,而非 Mintegral。
按照以下步骤启用条款和隐私政策流程:

将应用提交至 App Store Connect 进行审核时,您必须告知审核员您只为 iOS 14.5+ 启用了 App Tracking Transparency 框架权限请求。 请在Review Notes部分注明此信息。 否则,Apple 可能会拒绝您的构建版本。
初始化 SDK 时,SDK 会显示许可请求流程。 用户完成流程时,SDK 会调用您的初始化完成回传。
在初始化第三方 SDK (例如 MMP 或数据分析 SDK) 之前,您必须等待用户完成许可请求流程。 因此,请在初始化-完成回传中初始化此类 SDK。 如果您在用户完成许可流程之前初始化第三方 SDK,这些 SDK 将无法访问相关标识符。 之后的监测、报告和广告收入都会受到实质影响。
请不要在初始化回传中初始化通过 MAX 聚合的其他广告平台 SDK。 MAX 会自动进行这些平台 SDK 的初始化。
如果您要在 MMP 集成中设置用户 ID,请在设置 AppLovin 用户 ID 的位置进行设置。 以下代码片段以 Adjust 为例。 请参阅 Adjust 文档,了解如何初始化 Adjust 以及如何设置用户 ID。
MaxSdkCallbacks.OnSdkInitializedEvent += (MaxSdk.SdkConfiguration sdkConfiguration) = {
// You can check app transparency tracking authorization in sdkConfiguration.AppTrackingStatus for Unity Editor and iOS targets.
// Initialize other third-party SDKs; do not initialize mediated advertising SDKs (MAX does that for you). Not following this step will result in noticeable integration issues.
// Initialize the Adjust SDK inside the AppLovin SDK's initialization callback
string adjustAppToken = "«your-Adjust-app-token»";
AdjustEnvironment adjustEnvironment = AdjustEnvironment.Sandbox or AdjustEnvironment.Production;
AdjustConfig config = new AdjustConfig(adjustAppToken, adjustEnvironment);
Adjust.start(config);
// Start loading ads
};
MaxSdk.SetUserId("«user-ID»");
Adjust.addSessionCallbackParameter("«your-user-ID-key»", "«user-ID»");
MaxSdk.InitializeSdk();
AppLovin MAX Unity 插件包含一组默认的用户跟踪用途描述。 如果您想覆盖这些设置,请在Integration Manager中勾选Override Default User Tracking Usage Description设置并输入您的描述。
AppLovin recommends that you allow existing users in GDPR regions to reenter the GDPR flow.
Typically, users do this in your app’s Settings section via an option to Manage Existing Privacy Settings.
If a user is in a GDPR region you can conditionally show that settings option.
To determine this, use the SDK API MaxSdk.GetSdkConfiguration().ConsentFlowUserGeography.
The user is in GDPR region when ConsentFlowUserGeography is ConsentFlowUserGeography.Gdpr.
当用户点击 Manage Exisiting Privacy Settings (或其他类似的现有隐私设置管理选项)时,调用 MaxSdk.CmpService.ShowCmpForExistingUser()。
该操作会重置用户现有的许可信息。
using UnityEngine;
using AppLovinMax.Internal.API;
public class MyGame
{
private void LoadAndShowCmpFlow()
{
var cmpService = MaxSdk.CmpService;
cmpService.ShowCmpForExistingUser(error =>
{
if (null == error)
{
// The CMP alert was shown successfully.
}
});
}
}
如果您想在 GDPR 地区之外测试 Google CMP,请在Integration Manager中将Debug User Geography 设置为 GDPR,如下所示:

然后,在初始化 MAX SDK 之前,将测试设备的哈希 ID 设置为 SDK 的额外参数。 当应用在设备上运行时,Google CMP SDK 会记录此测试设备的哈希 ID。 通过以下调用设置测试设备的哈希 ID:
MaxSdk.SetExtraParameter("google_test_device_hashed_id", "«your-test-device-hashed-ID»")该流程仅向新用户显示。 如果您完成 CMP 弹窗选择后想要测试该流程,则必须删除并重新安装应用。
在 MAX Mediation Debugger 的 Privacy 部分下,**CMP (Consent Management Platform)**行显示已集成的 Google 认证 CMP SDK 的名称。 如果集成了 Google UMP SDK,则会显示 “Google consent management solutions” 作为名称。

If you select the CMP (Consent Management Platform) row, you can inspect the IAB TCF parameters IABTCF_gdprApplies, IABTCF_TCString, and IABTCF_AddtlConsent. For the latter two, you can click the row to copy or share its value.

在 CMP CONFIGURATION 部分,可以验证 Google UMP 配置中集成或缺失的平台。 下方列表包含 MAX 可用的所有平台。 您可以忽略应用中未集成的平台。
On your CMP flow you must list the networks that you integrate in your application. To check if any of those networks are missing, and to fix this problem:
重复这些步骤,直到确认您已将全部平台包含在 CMP 流程中。
要查看所有平台的许可状态,请展开 Mediation Debugger 的 Network Consent Statuses 部分。 Mediation Debugger 会解析 TC 字符串并显示所有平台的许可状态。 此外还会显示从 Google UMP 生成的 AC 字符串中解析出的 AppLovin 许可状态。
