Integrate Pangle with mediation

本指南将向您介绍如何使用 Google 移动广告 SDK 加载和展示 使用中介功能向 Pangle 投放广告, 同时涵盖 出价 集成。其中介绍了如何 如何将 Pangle 添加到广告单元的中介配置中,以及如何将 Pangle SDK 和适配器 Unity 添加到应用中。

支持的集成和广告格式

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

集成
出价
瀑布  1
表现形式
横幅
插页式广告
激励广告
插页式激励广告
1 采用瀑布流集成 封闭式 Beta 版。

要求

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

第 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

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 需求 Ad Manager

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 >导入软件包 >自定义 Package 并找到 GoogleMobileAdsPangleMediation.unitypackage 文件。确保已选择所有文件,然后点击 导入

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

第 4 步:添加所需的代码

Android

Pangle 集成不需要其他代码。

iOS

SKAdNetwork 集成

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

第 5 步:测试实现效果

Enable test ads

Make sure you register your test device for Ad Manager 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 中介插件更新日志

下一个版本

  • DummyClient 重命名为了 PlaceholderClient

版本 4.1.0

版本 4.0.1

版本 4.0.0

版本 3.0.0

版本 2.8.1

版本 2.8.0

版本 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