> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Mintegral

> 使用本指南在 CloudX 中配置 Mintegral 竞价。

SDK 安装和广告加载方式请继续参考平台集成文档：

* [Android 集成指南](/zh/android/integration)
* [iOS 集成指南](/zh/ios/integration)

如需查看 iOS 平台特有的 Mintegral 适配器要求，请参阅 [Mintegral 适配器页面](/zh/ios/adapters/mintegral/overview)。

## 概览

请使用以下值：

* 在 CloudX 应用映射中填写 `Mintegral App ID` 和 `Mintegral App Key`
* 在 CloudX 广告单元映射中填写 `Mintegral Placement ID` 和 `Ad Unit ID`
* 在应用代码中使用 CloudX `app_key` 和 CloudX 广告单元标识符

CloudX 会在内部收集 Mintegral 的 bidder token，因此您无需在应用代码中自行获取 Mintegral bidder token。

## 第 1 步：完成 Mintegral 侧配置

1. 登录您的 Mintegral publisher 账号。
2. 添加您要变现的应用。
3. 复制该应用对应的 Mintegral App ID 和 App Key。
4. 为您要使用的每种广告格式创建 placement 和 ad unit。
5. 复制每个 Placement ID 和 Ad Unit ID。
6. 在预期接入正式流量前，先完成 Mintegral 审核和收款设置。

## 第 2 步：在 CloudX 中启用 Mintegral

前往 `Operations -> Bidder Configuration`，确认您的账号已启用 `Mintegral`。

<img src="https://mintcdn.com/cloudx-928dcb24/mEb6RRvbdMPGyZRg/images/bidders.png?fit=max&auto=format&n=mEb6RRvbdMPGyZRg&q=85&s=a55609ef5c846bdd0632e3b4ecafea11" alt="Bidders" width="2738" height="1567" data-path="images/bidders.png" />

如果 `Mintegral` 未启用，即使映射配置正确，CloudX 也不会发起竞价请求。

## 第 3 步：配置 CloudX 应用

前往 `Inventory -> Apps`，创建或打开与您的移动应用对应的应用。

| CloudX 字段           | 填写内容                 | 必填 |
| ------------------- | -------------------- | -- |
| `Mintegral App ID`  | 您的 Mintegral App ID  | 是  |
| `Mintegral App Key` | 您的 Mintegral App Key | 是  |

<img src="https://mintcdn.com/cloudx-928dcb24/mEb6RRvbdMPGyZRg/images/mintegral-app-id.png?fit=max&auto=format&n=mEb6RRvbdMPGyZRg&q=85&s=9788ab135440debd1b1504fc77aa73b7" alt="Mintegral App ID" width="2738" height="1567" data-path="images/mintegral-app-id.png" />

同时从应用详情页复制 CloudX `app_key`。在 Android 或 iOS 代码中使用 CloudX `app_key`。

## 第 4 步：配置 CloudX 广告单元

前往 `Inventory -> Ad units`，为每个可接入的广告单元添加如下映射。

| CloudX 字段                | 填写内容                                  | 必填 |
| ------------------------ | ------------------------------------- | -- |
| `Mintegral Placement ID` | 该广告单元和广告格式对应的 Mintegral placement ID  | 是  |
| `Ad Unit ID`             | 与该 placement 配对的 Mintegral ad unit ID | 是  |

<img src="https://mintcdn.com/cloudx-928dcb24/mEb6RRvbdMPGyZRg/images/mintegral-ad-unit-id.png?fit=max&auto=format&n=mEb6RRvbdMPGyZRg&q=85&s=e6d795724bdd95308068d9fe39740cad" alt="Mintegral Ad unit ID" width="2738" height="1567" data-path="images/mintegral-ad-unit-id.png" />

* 在移动端集成中，`Mintegral Placement ID` 和 `Ad Unit ID` 都应视为必填项。
* 让 Mintegral 的 placement 和 ad unit 组合与 CloudX 广告单元的广告格式完全匹配。
* 对于 Native 广告单元，请在 Mintegral 中使用 **Native (Custom Rendering)** 广告格式创建 placement。
* 根据需要，为每个 CloudX 广告单元或广告格式使用单独的 Mintegral placement 和 ad unit 组合。

## 第 5 步：添加 Mintegral line item

在每个需要让 Mintegral 参与竞争的 CloudX 广告单元上，为 bidder `Mintegral` 创建 line item。

<img src="https://mintcdn.com/cloudx-928dcb24/mEb6RRvbdMPGyZRg/images/line-item.png?fit=max&auto=format&n=mEb6RRvbdMPGyZRg&q=85&s=8ac42c9be5634f4a2f9283157e796f96" alt="Line item" width="2738" height="1567" data-path="images/line-item.png" />

* 使用 bidder `Mintegral`
* 让 line item 与正确的广告格式匹配
* 对每个需要 Mintegral 参与竞价的广告单元重复上述配置

## 第 6 步：完成应用集成

请结合 CloudX 平台文档和 iOS Mintegral 适配器页面完成集成：

* [Android 集成指南](/zh/android/integration)
* [iOS 集成指南](/zh/ios/integration)
* [Mintegral 适配器页面](/zh/ios/adapters/mintegral/overview)

在应用代码中：

* 使用 CloudX `app_key` 初始化 CloudX
* 使用 CloudX 广告单元标识符加载广告
* 不要在应用代码中传入 Mintegral App ID、App Key、Placement ID 或 Ad Unit ID
* 对于插屏和激励广告，仅在广告准备完成后再调用 `show()`

## 第 7 步：测试和验证

1. 在 CloudX 中为您的设备启用测试模式。
2. 使用 CloudX `app_key` 和正确的 CloudX 广告单元标识符构建并运行应用。
3. 从每个已映射的广告单元发起广告请求。
4. 确认广告能够正常加载，并且 Mintegral 会按预期参与竞价或胜出。

## 问题排查

### Mintegral 没有参与竞价

请先检查以下项目：

* `Mintegral` 已在 `Operations -> Bidder Configuration` 中启用
* 应用已配置有效的 `Mintegral App ID`
* 应用已配置有效的 `Mintegral App Key`
* 广告单元已配置有效的 `Mintegral Placement ID`
* 广告单元已配置有效的 `Ad Unit ID`
* 广告单元上已存在 `Mintegral` line item

### Mintegral 已出价但广告未正常展示

请检查以下项目：

* 您的应用使用的是 CloudX `app_key`，而不是 Mintegral ID
* 您的应用加载的是目标 CloudX 广告单元
* Placement ID 和 Ad Unit ID 属于同一个 Mintegral 应用和广告格式
* iOS 端已完成 [Mintegral 适配器页面](/zh/ios/adapters/mintegral/overview) 中的要求

### Placement 看起来正确，但仍然加载失败

当前移动端适配器在加载时需要 `Ad Unit ID`。即使后端 schema 将其标记为可选，您仍应重新检查 CloudX 中广告单元级别的 `Ad Unit ID` 映射。

## 映射参考

| CloudX 字段                | 内部 key         | 作用范围 |
| ------------------------ | -------------- | ---- |
| `Mintegral App ID`       | `app_id`       | App  |
| `Mintegral App Key`      | `app_key`      | App  |
| `Mintegral Placement ID` | `placement_id` | 广告单元 |
| `Ad Unit ID`             | `ad_unit_id`   | 广告单元 |
