Integrate Pangle with mediation

本指南介绍了如何使用 Google 移动广告 SDK 利用中介从 Pangle 加载和展示广告,涵盖 广告瀑布流和出价 集成。还介绍了如何将 Pangle 添加到广告单元的中介配置中,以及如何将 Pangle SDK 和适配器集成到 Unity 应用中。

支持的集成和广告格式

Pangle 的 AdMob 中介适配器具有以下功能:

集成
出价
瀑布
表现形式
横幅
插页式广告
已奖励
插页式激励广告

使用要求

  • 最新版 Google 移动广告 SDK
  • Unity 5.6 或更高版本
  • 在 Android 上部署
    • Android API 级别 21 或更高级别
  • 在 iOS 上部署
    • iOS 部署目标为 12.0 或更高版本
  • 一个配置了 Google 移动广告 SDK 的有效 Unity 项目。如需了解详情,请参阅开始使用
  • 完成中介 入门指南

第 1 步:在 Pangle 界面中设置配置

Sign up or Log in to your Pangle account.

Add a new application

Navigate to the Applications tab and click the Add App button.

Select the Operating System you wish to create an application for and fill out the rest of the form. Then, click Submit.

Android

iOS

Take note of your application's App ID.

Android

iOS

Create an ad placement

Once your application has been created, click the Add button to create your ad placement.

Android

iOS

Bidding

Select your Ad Format and Ad Placement Name, and select In-App Bidding as the Pricing Type. Fill out the rest of the form and click Submit.

Once your ad placement is created, take note of the Ad Placement ID.

Android

iOS

Waterfall

Select your Ad Format and Ad Placement Name, and Global CPM as the Pricing Type. Fill out the rest of the form and click Submit.

Once your ad placement is created, take note of the Ad Placement ID.

Android

iOS

Locate Pangle Reporting API key

Bidding

This step isn't required for bidding integrations.

Waterfall

Take note of the User ID at the bottom left corner of the page.

Click Integrations > SDK & API > Pangle Reporting API 2.0. Take note of Role ID and Security Key.

Turn on test mode

Follow the instructions in Pangle's How to add a Test Ad guide on how to enable Pangle test ads.

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

Configure mediation settings for your ad unit

Android

For instructions, see step 2 in the guide for Android.

iOS

For instructions, see step 2 in the guide for iOS.

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

通过更新日志中的下载链接下载适用于 Pangle 的最新版 Google 移动广告中介插件,并从 zip 文件中提取 GoogleMobileAdsPangleMediation.unitypackage

在 Unity 项目编辑器中,依次选择 Assets > Import Package > Custom Package,然后找到您下载的 GoogleMobileAdsPangleMediation.unitypackage 文件。确保选择所有文件,然后点击 Import

然后,依次选择 Assets > Play Services Resolver > Android Resolver > Force Resolve。Unity Play 服务解析器库将从头开始执行依赖项解析,并将声明的依赖项复制到 Unity 应用的 Assets/Plugins/Android 目录中。

第 4 步:添加所需的代码

Android

Pangle 集成无需额外代码。

iOS

SKAdNetwork 集成

按照 Pangle 的文档操作,将 SKAdNetwork 标识符添加到项目的 Info.plist 文件中。

第 5 步:测试您的实现

Enable test ads

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

Verify test ads

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

错误代码

如果适配器无法从 Pangle 接收广告,发布商可以使用以下类下的 ResponseInfo 检查广告响应的根本错误:

Android

com.pangle.ads
com.google.ads.mediation.pangle.PangleMediationAdapter

iOS

GADMediationAdapterPangle

以下是广告加载失败时 Pangle 适配器抛出的代码及随附的消息:

Android

错误代码 网域 原因
101 com.google.ads.mediation.pangle 服务器参数无效(例如缺少应用 ID 或展示位置 ID)。
102 com.google.ads.mediation.pangle 请求的广告尺寸与 Pangle 支持的横幅广告尺寸不匹配。
103 com.google.ads.mediation.pangle 出价响应缺失或无效。
-1-60000 com.pangle.ads Pangle SDK 返回错误。如需了解详情,请参阅 Pangle 的文档

iOS

错误代码 网域 原因
101 com.google.ads.mediation.pangle 服务器参数无效(例如缺少应用 ID 或展示位置 ID)。
102 com.google.ads.mediation.pangle 请求的广告尺寸与 Pangle 支持的横幅广告尺寸不匹配。
-1-60000 由 Pangle SDK 发送 Pangle SDK 返回错误。如需了解详情,请参阅 Pangle 的文档

Pangle Unity 中介插件更新日志

版本 2.7.0

版本 2.6.0

版本 2.5.0

版本 2.4.0

版本 2.3.0

版本 2.2.0

版本 2.1.0

版本 2.0.0

版本 1.5.1

版本 1.5.0

版本 1.4.0

版本 1.3.1

版本 1.3.0

版本 1.2.0

版本 1.1.0

版本 1.0.0