跳转到内容

测试模式

使用测试模式验证是否成功集成了 MAX 聚合的特定广告平台。

要启用测试模式,请在 MAX 账户的 Test Mode部分定义一台测试设备并选择一个平台。 为设备启用测试模式后,当该设备向平台发出广告请求时,平台的测试模式会被启用。 设备还会接收到详细的设备日志。

禁用测试模式时,广告单元会恢复使用 MAXAd Units页面的设置。 除在控制面板中使用测试模式外,AppLovin 建议您在设备上使用 Mediation Debugger Test Ads。 这是测试集成的快速方法。

启用测试模式

要启用测试模式,请选择 MAX > Mediation > Manage > Test Mode并点击 + Add Test Device

MAX Test Devices: + Add Test Device. Create your first Test Device. Test devices are used to verify successful integration of specific ad networks. By defining a test device and selecting a network, all valid MAX ad unit requests for that test device will initiate an ad request to the selected network with their test mode enabled.

输入设备名称和 “Google 广告 ID” (GAID)。

Test Mode: Add Test Device.Add New Test Device. Name, IDFA (iOS) or GAID (Android), Test Network. Save.

选择要接收哪个测试平台的广告。 然后点击✔ Save。 保存完成后,与账户关联的所有 MAX 应用都会开始从所选平台接收测试广告。

Max Mediation Test Devices. Test Device, IDFA, Ad Network, Status. Test devices are used to verify successful integration of specific ad networks. By defining a test device and selecting a network, all valid MAX ad unit requests for that test device will initiate an ad request to the selected network with their test mode enabled.

禁用测试模式

要在设备上禁用测试模式,请按照下列步骤操作:

  1. 选择 MAX > Mediation > Manage > Test Mode
  2. MAX Test Devices列表中找到您的设备。 在与该设备关联的行中,将光标悬停在Status列中的绿点上。
  3. 绿点旁边出现暂停图标 ( ⏸️ ) 按钮。 点击该按钮。
  4. 随后出现Pause Test Device对话框。 点击✔ Yes

此操作会禁用设备的测试模式。 您的设备现在会根据 MAX 广告单元页面中列出的广告单元配置接收广告。

如何在 AppLovin SDK 中启用测试广告

您可以在 AppLovin SDK 中以编程方式为一个或多个 GAID 启用测试广告。

To enable test ads for a set of GAIDs, pass a list of test device advertising IDs in AppLovin SDK settings. You must set test GAIDs when you create the first SDK instance. The following code snippets show how to do this in Java and Kotlin:

AppLovinSdkInitializationConfiguration initConfig = AppLovinSdkInitializationConfiguration.builder("«SDK-key»", this)
.setMediationProvider( AppLovinMediationProvider.MAX )
.setTestDeviceAdvertisingIds( Arrays.asList("«your-GAID»") )
.build();

您可以在 AppLovin 控制面板的 Account > General > Keys 部分找到 SDK Key。

故障排查

如果在按照这些步骤操作后,依旧无法获得测试广告,则说明可能出现了集成问题。 按照”为什么我没有看到广告?” 中的步骤进行操作。