本指南介绍了如何使用 Google 移动广告 SDK 通过中介从 i-mobile 加载和展示广告,其中包括广告瀑布流集成。该指南介绍了如何将 i-mobile 添加到广告单元的中介配置中,以及如何将 i-mobile SDK 和适配器集成到 Unity 应用中。
i-mobile 的信息中心界面使用日语文本作为其标签、按钮和说明。本指南中的屏幕截图尚未翻译。不过,在本指南的说明和说明中,标签和按钮经过翻译,对应的英语版本包含在括号中。
支持的集成和广告格式
Ad Manager i-mobile 中介适配器具有以下功能:
集成 | |
---|---|
出价 | |
瀑布 | |
表现形式 | |
横幅 | |
插页式广告 | |
已奖励 |
要求
- Unity 5.6 或更高版本
- 最新版 Google 移动广告 SDK
- 在 Android 上部署
- Android API 级别 19 或更高级别
- 在 iOS 上部署
- iOS 部署目标为 12.0 或更高版本
- 配置了 Google 移动广告 SDK 且处于有效状态的 Unity 项目。如需了解详情,请参阅开始使用。
- 完成中介 入门指南
第 1 步:在 i-mobile 界面中设置配置
Sign up or log in to your i-mobile account.
Add your app to the i-mobile dashboard by clicking the サイト/アプリ管理 (Site/Application Management) tab and the button for your app's platform.
Android
iOS
Fill out the form and click the 新規登録 (Sign up) button.
Android
iOS
To create a new Advertising Spot, select your app under the サイト/アプリ管理 (Site/Application Management) tab.
Android
iOS
Navigate to the 広告スポット管理 (Ad Spot Management) tab and click the 新規広告スポット (New Ad Spot) button.
Next, fill out the form by providing the 広告スポット名 (Ad Spot name), 広告スポットサイズ (Ad Spot size) and other details. Then, click the 新規登録 (Sign up) button.
Your new Ad spot is ready. To view its integration details, click the アプリ設定取得 (Get App settings) button.
Take note of the パブリッシャーID (Publisher ID), メディアID (Media ID), and スポットID (Spot ID). You'll need these parameters later when configuring i-mobile for mediation in the Ad Manager UI.
Android
iOS
第 2 步:在界面中设置 Ad Manager i-mobile 需求
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 步:导入 i-mobile SDK 和适配器
通过更新日志中的下载链接下载适用于 i-mobile 的最新版 Google 移动广告中介插件,并从 zip 文件中提取 GoogleMobileAdsIMobileMediation.unitypackage
。
在 Unity 项目编辑器中,依次选择 Assets > Import Package > Custom Package,然后找到您下载的 GoogleMobileAdsIMobileMediation.unitypackage
文件。确保选择所有文件,然后点击 Import。
然后,依次选择 Assets > Play Services Resolver > Android Resolver > Force Resolve。Unity Play 服务解析器库将从头开始执行依赖项解析,并将声明的依赖项复制到 Unity 应用的 Assets/Plugins/Android
目录中。
第 4 步:需要其他代码
Android
i-mobile 集成不需要额外的代码。
iOS
SKAdNetwork 集成
按照 i-mobile 的文档操作,将 SKAdNetwork 标识符添加到项目的 Info.plist
文件中。
第 5 步:测试您的实现
Enable test ads
Make sure you register your test device for Ad Manager. i-mobile provides test Spot ID, Media ID, and Publisher ID for testing, you can find them here.
Verify test ads
To verify that you are receiving test ads from i-mobile, enable single ad source testing in ad inspector using the i-mobile (Waterfall) ad source(s).
错误代码
如果适配器无法从 i-mobile 接收广告,发布商可以使用以下类下的 ResponseInfo
检查广告响应的根本错误:
Android
形式 | 类名称 |
---|---|
横幅 | com.google.ads.mediation.imobile.IMobileAdapter |
插页式广告 | com.google.ads.mediation.imobile.IMobileAdapter |
原生 | com.google.ads.mediation.imobile.IMobileMediationAdapter |
iOS
形式 | 类名称 |
---|---|
横幅 | IMobileAdapter |
插页式广告 | IMobileAdapter |
原生 | GADMediationAdapterIMobile |
以下是广告加载失败时 i-mobile 适配器抛出的代码及相应消息:
Android
错误代码 | 原因 |
---|---|
0-99 | i-mobile SDK 返回错误。如需了解详情,请参阅代码。 |
101 | i-mobile 需要 Activity 上下文才能加载广告。 |
102 | 在界面中配置的 Ad Manager i-mobile 服务器参数缺失/无效。 |
103 | 请求的广告尺寸与 i-mobile 支持的横幅广告尺寸不匹配。 |
104 | i-mobile 的原生广告加载成功回调返回了一个空的原生广告列表。 |
iOS
错误代码 | 原因 |
---|---|
0-10 | i-mobile SDK 返回错误。如需了解详情,请参阅代码。 |
101 | 在界面中配置的 Ad Manager i-mobile 服务器参数缺失/无效。 |
102 | 请求的广告尺寸与 i-mobile 支持的横幅广告尺寸不匹配。 |
103 | i-mobile 无法显示广告。 |
104 | i-mobile 返回了一个空的原生广告数组。 |
105 | i-mobile 无法下载原生广告素材资源。 |
106 | i-mobile 不支持使用同一 Spot ID 请求多个插页式广告。 |
i-mobile Unity 中介插件更新日志
版本 1.3.2
- 将适配器内容移到了
GoogleMobileAds/Mediation/IMobile/
。 - 支持 i-mobile Android 适配器版本 2.3.1.1。
- 支持 i-mobile iOS 适配器版本 2.3.2.0。
- 使用 Google 移动广告 Unity 插件 8.1.0 版进行构建和测试。
版本 1.3.1
- 支持 i-mobile Android 适配器版本 2.3.0.0。
- 支持 i-mobile iOS 适配器版本 2.3.0.1。
- 使用 Google 移动广告 Unity 插件 7.4.1 版进行构建和测试。
版本 1.3.0
- 支持 i-mobile Android 适配器版本 2.3.0.0。
- 支持 i-mobile iOS 适配器版本 2.3.0.0。
- 使用 Google 移动广告 Unity 插件 7.3.1 版进行构建和测试。
版本 1.2.2
- 支持 i-mobile Android 适配器版本 2.0.23.1。
- 支持 i-mobile iOS 适配器版本 2.2.0.1。
- 使用 Google 移动广告 Unity 插件 7.0.2 版进行构建和测试。
版本 1.2.1
- 支持 i-mobile Android 适配器版本 2.0.23.0。
- 支持 i-mobile iOS 适配器版本 2.2.0.1。
- 使用 Google 移动广告 Unity 插件 7.0.0 版进行构建和测试。
版本 1.2.0
版本 1.1.0
版本 1.0.2
版本 1.0.1
版本 1.0.0
- 首个版本!
- 支持 i-mobile Android 适配器版本 2.0.20.1。
- 支持 i-mobile iOS 适配器版本 2.0.29.0。