Integrate Mintegral with mediation

本指南介绍了如何使用 Google 移动广告 SDK 通过中介加载和展示 Mintegral 提供的广告,其中涵盖广告瀑布流和出价集成。其中介绍了如何将 Mintegral 添加到广告单元的中介配置中,以及如何将 Mintegral SDK 和适配器集成到 Flutter 应用中。

支持的集成和广告格式

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

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

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

2 此格式的瀑布流集成目前为封闭式 Beta 版。

3 此格式的瀑布流集成目前为公开 Beta 版。

要求

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

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

Sign up or Log in to your Mintegral account.

Locate the App Key

Navigate to the APP Setting tab and take note of the APP Key.

Add a new application

From the APP Setting tab, click the Add APP button.

Select the Platform and fill out the rest of the form. Then, click Save.

Android

iOS

Take note of your application's APP ID.

Android

iOS

Create an ad placement

Once your application has been created, navigate to the Placements & Units tab and click on the Add Placement button as shown below to create your ad placement.

Android

iOS

Enter a Placement Name and AD Format.

Bidding

Select Header Bidding as the Bidding Type. Fill out the rest of the form and click Save.

Waterfall

Select Traditional as the Bidding Type. Fill out the rest of the form and click Save.

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

Android

iOS

Click the 1 AD Units drop down and take note of the AD Unit ID.

Android

iOS

Locate your Mintegral Reporting API Key

Bidding

This step isn't required for bidding integrations.

Waterfall

You will need your Mintegral Reporting API Key for setting up your AdMob ad unit ID. Navigate to Account > API Tools. Take note of your Skey and Secret.

第 2 步:在界面中设置 Mintegral 需求 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.

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

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

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

Integration through pub.dev

Add the following dependency with the latest versions of the Mintegral SDK and adapter in your package's pubspec.yaml file:

dependencies:
  gma_mediation_mintegral: ^1.0.0

Manual Integration

Download the latest version of Google Mobile Ads mediation plugin for Mintegral, extract the downloaded file, and add the extracted plugin folder (and its contents) to your Flutter project. Then, reference the plugin in your pubspec.yaml file by adding the following dependency:

dependencies:
  gma_mediation_mintegral:
    path: path/to/local/package

第 4 步:添加所需的代码

Android

Mintegral 集成不需要其他代码。

iOS

SKAdNetwork 集成

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

第 5 步:测试实现效果

Enable test ads

Make sure you register your test device for AdMob.

To get Mintegral test ads for banners, interstitials, rewarded and native ad formats, Mintegral recommends using the App Keys, App IDs, Placement IDs and Ad Unit IDs provided in the Mintegral Test ID page.

Verify test ads

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

错误代码

如果适配器未能接收来自 Mintegral 的广告,发布商可以使用以下类下的 ResponseInfo 检查广告响应中的底层错误:

Android

com.mbridge.msdk
com.google.ads.mediation.mintegral.MintegralMediationAdapter

iOS

GADMediationAdapterMintegral

当广告加载失败时,Mintegral 适配器会抛出以下代码和随附的消息:

Android

错误代码 网域 原因
101 com.google.ads.mediation.mintegral 服务器参数无效(例如,缺少应用 ID 或展示位置 ID)。
102 com.google.ads.mediation.mintegral 请求的广告尺寸与 Mintegral 支持的横幅广告尺寸不匹配。
103 com.google.ads.mediation.mintegral 出价响应缺失或无效。
104 com.google.ads.mediation.mintegral Mintegral SDK 返回了“未填充”错误。

iOS

错误代码 网域 原因
101 com.google.mediation.mintegral 服务器参数无效(例如,缺少应用 ID 或展示位置 ID)。
102 com.google.mediation.mintegral Mintegral SDK 返回了“未填充”错误。
103 com.google.mediation.mintegral Mintegral SDK 未能展示广告。
104 com.google.mediation.mintegral 请求的广告尺寸与 Mintegral 支持的横幅广告尺寸不匹配。

Mintegral Flutter 中介适配器更新日志

1.0.0

  • 初始版本。
  • 已验证与 Mintegral Android 适配器版本 16.7.21.0 的兼容性。
  • 已验证与 Mintegral iOS 适配器版本 7.6.3.0 的兼容性。
  • 使用 Google 移动广告 Flutter 插件 5.1.0 版进行构建和测试。