Integrate Liftoff Monetize with mediation

本指南将向您介绍如何使用 Google 移动广告 SDK 加载和展示 Liftoff Monetize 使用 提供的广告, AdMob 中介、 包括出价和广告瀑布流集成其中介绍了如何添加 Liftoff 功能 通过广告单元的中介配置创收,以及如何集成 将 Vungle SDK 和适配器导入 Android 应用。

支持的集成和广告格式

Liftoff Monetize 的中介适配器具有以下功能:

集成
出价
瀑布
表现形式
打开应用 13 个
横幅 2
插页式广告
激励广告
插页式激励广告 2
原生 2

1 出价 此格式的集成功能目前处于封闭式 Beta 版测试阶段。

2 出价 此格式的集成功能目前处于公开测试阶段。

3 广告瀑布流 此格式的集成功能目前处于封闭式 Beta 版测试阶段。

要求

  • Android API 级别 21 或更高级别

  • [适用于出价]:Liftoff Monetize Adapter 6.11.0.2 或更高版本 (建议使用最新版本

  • 最新版 Google 移动广告 SDK

  • 完成中介流程 入门指南

第 1 步:在 Liftoff Monetize 界面中设置配置

Sign up or log in to your Liftoff Monetize account.

Add your app to the Liftoff Monetize dashboard by clicking the Add Application button.

Fill out the form, entering all the necessary details.

Once your app is created, select your app from the Liftoff Monetize Applications dashboard.

Take note of the App ID.

Add new placements

To create a new placement to be used with AdMob mediation, navigate to the Liftoff Monetize Placements dashboard, click the Add Placement button and select your app from the drop-down list.

Details for adding new placements are included below:

App Open

Select Interstitial and enter a Placement Name. Then, select Yes for Skippable and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Select Banner, enter a Placement Name and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

300x250 Banner

Select MREC, enter a Placement Name and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Interstitial

Select Interstitial, enter a Placement Name, and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Rewarded

Select Rewarded, enter a Placement Name and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Rewarded Interstitial

Select Rewarded. Enter a Placement Name, enable Skippable and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Native

Select Native, enter a Placement Name and fill out the rest of the form. [Bidding only] Under Monetization, toggle the In-App Bidding switch to Enabled. Click the Continue button at the bottom of the page to create the placement.

Take note of the Reference ID and click Sounds Good.

App Open

300x250 Banner

Interstitial

Rewarded

Rewarded Interstitial

Native

Locate your Reporting API Key

Bidding

This step isn't required for bidding integrations.

Waterfall

In addition to the App ID and the Reference ID, you'll also need your Liftoff Monetize Reporting API Key to set up your AdMob ad unit ID. Navigate to the Liftoff Monetize Reports dashboard and click the Reporting API Key button to view your Reporting API Key.

Turn on test mode

To enable test ads, go to your Liftoff Monetize dashboard and navigate to Applications.

Select your app for which you would like to enable test ads under the Placement Reference ID section of your app. Test ads can be enabled by selecting Test Mode to Show test ads only under the Status section.

第 2 步:在界面中设置 Liftoff Monetize 需求 AdMob

Configure mediation settings for your ad unit

You need to add Liftoff Monetize to the mediation configuration for your ad unit.

First, sign in to your AdMob account. Next, navigate to the Mediation tab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it, and skip ahead to Add Liftoff Monetize as an ad source.

To create a new mediation group, select Create Mediation Group.

Enter your ad format and platform, then click Continue.

Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled, and then click Add Ad Units.

Associate this mediation group with one or more of your existing AdMob ad units. Then click Done.

You should now see the ad units card populated with the ad units you selected:

Add Liftoff Monetize as an ad source

Bidding

Under the Bidding card in the Ad Sources section, select Add Ad Source. Then select Liftoff Monetize.

Click How to sign a partnership agreement and set up a bidding partnership with Liftoff Monetize.

Click Acknowledge & agree, then click Continue.

If you already have a mapping for Liftoff Monetize, you can select it. Otherwise, click Add mapping.

Next, enter the Application ID and Placement Reference ID obtained in the previous section. Then click Done.

Important: The Application ID must be associated with the targeted app as in the Liftoff Monetize UI.

Waterfall

Under the Waterfall card in the Ad Sources section, select Add Ad Source. Then select Liftoff Monetize.

Select Liftoff Monetize and enable the Optimize switch. Enter the Reporting API Key obtained in the previous section to set up ad source optimization for Liftoff Monetize. Then enter an eCPM value for Liftoff Monetize and click Continue.

If you already have a mapping for Liftoff Monetize, you can select it. Otherwise, click Add mapping.

Next, enter the Application ID and Placement Reference ID obtained in the previous section. Then click Done.

将 Liftoff 添加到 GDPR 和美国州级法规广告合作伙伴列表

Follow the steps in GDPR settings and US state regulations settings to add Liftoff to the GDPR and US state regulations ad partners list in the AdMob UI.

第 3 步:导入 Vungle SDK 和适配器

在应用级 build.gradle.kts 文件中,添加以下实现 依赖项和配置使用最新版 Vungle SDK 和适配器:

dependencies {
    implementation("com.google.android.gms:play-services-ads:23.2.0")
    implementation("com.google.ads.mediation:vungle:7.4.0.0")
}

手动集成

  • 下载最新的 Vungle Android SDK.jar 文件解压缩到 libs 文件夹下,并将其添加到您的 项目。

  • 前往 Liftoff Monetize 适配器工件 。选择最新版本,下载 Vungle 适配器的 .aar 文件,并将其添加到您的项目。

第 4 步:在 Liftoff Monetize SDK 上实现隐私设置

根据 Google 欧盟地区用户意见征求 政策,因此您必须确保向 Google 披露特定信息,并且 针对欧洲经济区 (EEA) 境内用户就 设备标识符和个人数据的使用。此政策反映了 欧盟《电子隐私指令》和《一般数据保护条例》的要求 条例 (GDPR)。在征求用户意见时,您必须指明每个广告联盟 可能会收集、接收或使用个人数据的中介链 提供有关每个网络使用情况的信息。Google 目前无法 自动将用户的意见选择传递给此类广告网络。

Liftoff Monetize 提供一个 API,可让您将用户意见传达给 Vungle SDK。 以下示例代码展示了如何将此意见征求信息传递给 Vungle SDK。如果您选择调用此方法,建议您 然后再通过 Google 移动广告 SDK 请求广告。

Java

import com.vungle.ads.VunglePrivacySettings;
// ...

VunglePrivacySettings.setGDPRStatus(true, "v1.0.0");

Kotlin

import com.vungle.ads.VunglePrivacySettings
// ...

VunglePrivacySettings.setGDPRStatus(true, "v1.0.0")

请参阅 GDPR 推荐实现说明 以了解更多详情,以及可在方法中提供的值。

美国州级隐私保护法律

美国州级隐私保护法 要求向用户提供 来退出“促销”的“个人信息”(因为法律规定 这些条款),同时在其页面上以醒目方式显示“Do Not Sell My Personal 信息”请点击“销售”链接主页。通过 美国州/省/自治区/直辖市隐私权 法律合规指南提供了一项新功能, 受限的数据处理 用于 Google 广告投放,但 Google 无法对每个广告应用此设置 您的中介链中的广告联盟。因此,您必须找出每个广告联盟 可能参与销售个人数据或 并遵循每个广告联盟提供的指导, 合规性。

Liftoff Monetize 提供一个 API,可让您将用户意见传达给 Vungle SDK。 以下示例代码展示了如何将此意见征求信息传递给 Vungle SDK。如果您选择调用此方法,建议您 然后再通过 Google 移动广告 SDK 请求广告。

Java

import com.vungle.ads.VunglePrivacySettings;
// ...

VunglePrivacySettings.setCCPAStatus(true);

Kotlin

import com.vungle.ads.VunglePrivacySettings
// ...

VunglePrivacySettings.setCCPAStatus(true)

请参阅 CCPA 实施 以了解更多详情,以及可在方法中提供的值。

第 5 步:添加所需的代码

集成 Liftoff Monetize 功能无需其他代码。

第 6 步:测试实现效果

Enable test ads

Make sure you register your test device for AdMob and enable test mode in Liftoff Monetize UI.

Verify test ads

To verify that you are receiving test ads from Liftoff Monetize, enable single ad source testing in ad inspector using the Liftoff Monetize (Bidding) and Liftoff Monetize (Waterfall) ad source(s).

可选步骤

广告联盟专有参数

Liftoff Monetize 适配器支持以下额外请求 可以传递给适配器的参数:

userId
表示 Liftoff Monetize 的激励用户 ID 的字符串。
adOrientation
一个整数,用于指定全屏广告的展示方向。

以下示例代码展示了如何创建可设置这些参数的广告请求:

Java

Bundle extras = new Bundle();
extras.putString(VungleConstants.KEY_USER_ID, "myUserID");
extras.putInt(VungleConstants.KEY_ORIENTATION, 1);

AdRequest request = new AdRequest.Builder()
   .addNetworkExtrasBundle(VungleAdapter.class, extras) // Rewarded.
   .addNetworkExtrasBundle(VungleInterstitialAdapter.class, extras) // Interstitial.
   .build();

Kotlin

val extras = Bundle()
extras.putString(VungleConstants.KEY_USER_ID, "myUserID")
extras.putInt(VungleConstants.KEY_ORIENTATION, 1)

val request = AdRequest.Builder()
   .addNetworkExtrasBundle(VungleAdapter::class, extras) // Rewarded.
   .addNetworkExtrasBundle(VungleInterstitialAdapter.class, extras) // Interstitial.
   .build()

原生广告呈现

Liftoff Monetize 适配器以 NativeAd 对象的操作。它会填充以下内容 原生广告字段说明 针对 NativeAd.

字段 Liftoff Monetize 适配器始终包含资产
标题
映像 1
媒体视图
正文
应用图标
号召性用语
星级
商店
价格

1 Liftoff Monetize 适配器不提供对其原生的主图片素材资源的直接访问 广告。相反,适配器会填充 MediaView 包含视频或图片。

错误代码

如果适配器未能收到来自 Liftoff Monetize 的广告,发布商可以 使用 ResponseInfo.getAdapterResponses() 分为以下类:

格式 课程名称
横幅 com.vungle.mediation.VungleInterstitialAdapter
插页式广告 com.vungle.mediation.VungleInterstitialAdapter
激励广告 com.vungle.mediation.VungleAdapter

下面是 Liftoff Monetize 提供的代码和随附的消息 适配器:

错误代码 网域 原因
0-100 com.vungle.warren Vungle SDK 返回了错误。请参阅文档 了解详情。
101 com.google.ads.mediation.vungle 服务器参数(如应用 ID 或展示位置 ID)无效。
102 com.google.ads.mediation.vungle 请求的横幅尺寸未映射到有效的 Liftoff Monetize 广告 。
103 com.google.ads.mediation.vungle Liftoff Monetize 需要 Activity 上下文才能请求广告。
104 com.google.ads.mediation.vungle Vungle SDK 无法为同一展示位置加载多个广告 ID。
105 com.google.ads.mediation.vungle Vungle SDK 初始化失败。
106 com.google.ads.mediation.vungle Vungle SDK 返回了成功的加载回调,但 Banners.getBanner() 或 Vungle.getNativeAd() 返回了 null。
107 com.google.ads.mediation.vungle Vungle SDK 尚未准备好播放广告。
1-100 由 Vungle SDK 发送 Vungle SDK 返回了错误。请参阅代码 了解详情。
101 com.google.mediation.vungle 界面中配置的 Liftoff Monetize 服务器参数 AdMob 缺失/无效。
102 com.google.mediation.vungle 已加载此广告联盟配置的广告。Vungle SDK 无法 为相同的展示位置 ID 加载第二个广告。
103 com.google.mediation.vungle 请求的广告尺寸与 Liftoff Monetize 支持的横幅不符 。
104 com.google.mediation.vungle Vungle SDK 无法呈现横幅广告。
105 com.google.mediation.vungle Vungle SDK 一次仅支持加载 1 个横幅广告 而不考虑展示位置 ID
106 com.google.mediation.vungle Vungle SDK 发送了一个回调,指出该广告无法播放。

Liftoff Monetize Android 中介适配器变更日志

7.4.0.0 版

  • VungleMediationAdapter 扩展了 VungleInterstitialAdapter 类 ,在 Google Ad Manager 上为开屏广告格式添加广告瀑布流支持。
  • 已验证与 Vungle SDK 7.4.0 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 23.2.0 版。
  • Vungle SDK 7.4.0 版。

7.3.2.0 版

  • 已验证与 Vungle SDK 7.3.2 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 版本 23.0.0。
  • Vungle SDK 7.3.2 版。

7.3.1.0 版

  • 已验证与 Vungle SDK 7.3.1 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 版本 23.0.0。
  • Vungle SDK 7.3.1 版。

7.3.0.0 版

  • 将所需的最低 Google 移动广告 SDK 版本更新为 23.0.0。
  • 已验证与 Vungle SDK 7.3.0 的兼容性。
  • 为开屏广告格式添加了广告瀑布流和出价支持。

构建和测试所需系统:

  • Google 移动广告 SDK 版本 23.0.0。
  • Vungle SDK 7.3.0 版。

7.1.0.0 版

  • 已验证与 Vungle SDK 7.1.0 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 22.3.0 版。
  • Vungle SDK 7.1.0 版。

7.0.0.1 版

  • 修复了 Google 移动广告 SDK 无法为出价原生广告记录展示次数的问题。
  • 恢复了适配器,以依赖于 Google 移动广告 SDK 22.3.0 版。

构建和测试所需系统:

  • Google 移动广告 SDK 22.3.0 版。
  • Vungle SDK 7.0.0 版。

7.0.0.0 版

  • 新增了相关支持,可针对所有瀑布流广告格式加载具有相同展示位置 ID 的多个广告。
  • 适配器名称从 Vungle 更名为 Liftoff Monetize。
  • 已验证与 Vungle SDK 7.0.0 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 22.4.0 版。
  • Vungle SDK 7.0.0 版。

版本 6.12.1.1

  • 更新了适配器,以使用新的 VersionInfo 类。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 22.0.0。

构建和测试所需系统:

  • Google 移动广告 SDK 22.0.0 版。
  • Vungle SDK 版本 6.12.1。

版本 6.12.1.0

  • 已验证与 Vungle SDK 6.12.1 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 21.4.0 版。
  • Vungle SDK 版本 6.12.1。

版本 6.12.0.1

  • 新增了对横幅广告格式的出价支持。
  • 已验证与 Vungle SDK 6.12.0 的兼容性。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 21.4.0。

构建和测试所需系统:

  • Google 移动广告 SDK 21.4.0 版。
  • Vungle SDK 版本 6.12.0。

版本 6.12.0.0

  • 为插页式激励广告格式添加了广告瀑布流中介和出价支持。
  • 新增了对原生广告格式的出价支持。

构建和测试所需系统:

  • Google 移动广告 SDK 21.1.0 版。
  • Vungle SDK 版本 6.12.0。

版本 6.11.0.3

  • 为原生广告格式添加了广告瀑布流中介支持。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 21.1.0。

构建和测试所需系统:

  • Google 移动广告 SDK 21.1.0 版。
  • Vungle SDK 版本 6.11.0。

版本 6.11.0.2

  • 现已支持在激励广告中针对同一展示位置 ID 加载多个广告。

构建和测试所需系统:

  • Google 移动广告 SDK 21.0.0 版。
  • Vungle SDK 版本 6.11.0。

版本 6.11.0.1

  • compileSdkVersiontargetSdkVersion 更新到了 API 31。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 21.0.0。
  • 将所需的最低 Android API 级别更新为 19。

构建和测试所需系统:

  • Google 移动广告 SDK 21.0.0 版。
  • Vungle SDK 版本 6.11.0。

版本 6.11.0.0

  • 已验证与 Vungle SDK 6.11.0 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 20.6.0 版。
  • Vungle SDK 版本 6.11.0。

版本 6.10.5.0

  • 已验证与 Vungle SDK 6.10.5 的兼容性。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 20.6.0。

构建和测试所需系统:

  • Google 移动广告 SDK 20.6.0 版。
  • Vungle SDK 版本 6.10.5。

版本 6.10.4.0

  • 已验证与 Vungle SDK 6.10.4 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 20.5.0 版。
  • Vungle SDK 版本 6.10.4。

版本 6.10.3.0

  • 已验证与 Vungle SDK 6.10.3 的兼容性。

构建和测试所需系统:

  • Google 移动广告 SDK 20.5.0 版。
  • Vungle SDK 版本 6.10.3。

版本 6.10.2.1

  • 已验证与 Vungle SDK 6.10.2 的兼容性。
  • 新增了对插页式广告和激励广告格式的出价支持。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 20.5.0。

构建和测试所需系统:

  • Google 移动广告 SDK 20.5.0 版。
  • Vungle SDK 版本 6.10.2。

版本 6.10.2.0

  • 已验证与 Vungle SDK 6.10.2 的兼容性。
  • 修复了适配器问题,具体方法为:在请求横幅广告和插页式广告时,将参数 serverParameters 替换为 mediationExtras,以获取 Vungle 广告联盟专用参数。

构建和测试所需系统:

  • Google 移动广告 SDK 20.3.0 版。
  • Vungle SDK 版本 6.10.2。

版本 6.10.1.0

  • 已验证与 Vungle SDK 6.10.1 的兼容性。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 20.3.0。
  • Vungle 的横幅广告 API 现在支持 MREC 广告。
  • 更新了标准化错误代码和消息。

构建和测试所需系统:

  • Google 移动广告 SDK 20.3.0 版。
  • Vungle SDK 版本 6.10.1。

版本 6.9.1.1

  • 将所需的最低 Google 移动广告 SDK 版本更新为 20.0.0。

构建和测试所需系统:

  • Google 移动广告 SDK 20.0.0 版。
  • Vungle SDK 版本 6.9.1。

版本 6.9.1.0

  • 已验证与 Vungle SDK 6.9.1 的兼容性。
  • 添加了对 OMSDK 的支持。
  • 修复了各种问题。
  • 针对 Vungle onAdViewed 回调的激励广告支持。
  • 将要求的最低 Google 移动广告 SDK 版本更新为 19.7.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.7.0 版。
  • Vungle SDK 版本 6.9.1。

版本 6.8.1.1

  • 将要求的最低 Google 移动广告 SDK 版本更新为 19.6.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.6.0 版。
  • Vungle SDK 版本 6.8.1。

版本 6.8.1.0

  • 已验证与 Vungle SDK 6.8.1 的兼容性。
  • 将要求的最低 Google 移动广告 SDK 版本更新为 19.5.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.5.0 版。
  • Vungle SDK 版本 6.8.1。

版本 6.8.0.0

  • 已验证与 Vungle SDK 6.8.0 的兼容性。
  • 将适配器更新为了在刷新或销毁横幅广告时不转发 onAdClosed()
  • 移除了 FlexFeedFlexView(在 Vungle 6.8.0 中已废弃)。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 19.4.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.4.0 版。
  • Vungle SDK 版本 6.8.0。

版本 6.7.1.0

  • 已验证与 Vungle SDK 6.7.1 的兼容性。
  • 修复了使用应用上下文加载广告时无法加载广告的错误。
  • targetSdkVersion 更新为了 API 29。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 19.3.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.3.0 版。
  • Vungle SDK 版本 6.7.1。

版本 6.7.0.0

  • 已验证与 Vungle SDK 6.7.0 的兼容性。
  • 更新了适配器,以支持内嵌自适应横幅广告请求。
  • 现在,插页式广告和激励广告在默认情况下会处于取消静音状态。
  • 现在,插页式广告会在点击后转发 onAdLeftApplication() 回调。
  • 将要求的最低 Google 移动广告 SDK 版本更新为 19.2.0。

构建和测试所需系统:

  • Google 移动广告 SDK 19.2.0 版。
  • Vungle SDK 版本 6.7.0。

版本 6.5.3.0

  • 已验证与 Vungle SDK 6.5.3 的兼容性。
  • 添加对新引入的 Vungle 横幅广告格式的支持。
  • 将要求的最低 Google 移动广告 SDK 版本更新为 19.0.1。

构建和测试所需系统:

  • Google 移动广告 SDK 19.0.1 版。
  • Vungle SDK 版本 6.5.3。

版本 6.4.11.1

  • 修复了横幅广告无法刷新的问题。

版本 6.4.11.0

  • 已验证与 Vungle SDK 6.4.11 的兼容性。
  • 新增了对横幅广告的支持。
  • 将适配器迁移到了 AndroidX。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 18.2.0。

版本 6.3.24.1

  • 更新了适配器,以支持新的开放式 Beta 版激励广告 API。
  • 将所需的最低 Google 移动广告 SDK 版本更新为 17.2.0。

版本 6.3.24.0

  • 已验证与 Vungle SDK 6.3.24 的兼容性。

版本 6.3.17.0

  • 已验证与 Vungle SDK 6.3.17 的兼容性。

版本 6.3.12.0

  • 已验证与 Vungle SDK 6.3.12 的兼容性。

版本 6.2.5.1

  • 更新了适配器,以调用 onRewardedVideoComplete() 广告事件。

版本 6.2.5.0

  • 已验证与 Vungle SDK 6.2.5 的兼容性。

版本 5.3.2.1

  • 更新了适配器,以便正确地向 Google 移动广告 SDK 报告点击次数。

版本 5.3.2.0

  • 已验证与 Vungle SDK 5.3.2 的兼容性。
  • 更新了 Android Studio 3.0 的 Adpater 项目。
  • 向 Bundle 构建器类添加了以下方法。
    • setOrdinalViewCount:此字段用于传递中介序数、 发布商每次从 Vungle 收到序数数据报告时发送通知。
    • setFlexViewCloseTimeInSec:此选项用于制作灵活视图广告 在指定秒数后自行关闭。

版本 5.3.0.0

  • 已验证与 Vungle SDK 5.3.0 的兼容性。

版本 5.1.0.0

  • 更新了适配器,使其与 Vungle SDK 5.1.0 兼容。
  • 已将版本命名系统更改为 [Vungle SDK version].[adapter patch version]。

早期版本

  • 新增了对插页式广告和激励视频广告格式的支持。