---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/ios/admob-third.md
  - https://ads.yandex.com/helpcenter/ru/dev/ios/admob-third.md
  - https://ads.yandex.com/helpcenter/zh/dev/ios/admob-third.md
  - href: zh/dev/ios/admob-third.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/zh/llms.txt

# Google AdMob (ex. AdMob) 聚合


Google AdMob (ex. AdMob) 聚合可用于对接到 Yandex Advertising Network。以下是将 Yandex Advertising Network 添加到 Google AdMob (ex. AdMob) 聚合的方法：

1. [集成](https://developers.google.com/admob/android/mediate?hl=en) Google AdMob (ex. AdMob) 聚合。
2. 添加 Yandex Mobile Ads SDK 的适配器。
3. 在 [Yandex Advertising Network 界面](https://ads.yandex.com/helpcenter/zh/quick-start.md)<!--[интерфейсе Yandex Advertising Network](../../monetization/ad-unit/)--> 中为您希望的广告类型创建 AdUnitId。
4. 在 [Google AdMob (ex. AdMob) 网络界面](http://apps.admob.com/) 中添加 Yandex Advertising Network。
5. 同步两个网络界面中的广告单元设置。

## 添加 Yandex Mobile Ads SDK 的适配器

`YandexMobileAdsAdMobAdapters` 库已经适配了 CocoaPods 依赖管理系统，并支持静态集成方法。

要连接库，请将依赖项添加到项目的 Podfile 中：

```
pod 'YandexMobileAdsAdMobAdapters', '8.0.0.0'
```

## 在 Google AdMob (ex. AdMob) 聚合网络界面中添加 Yandex Advertising Network{#admob-add}

对于在 Google AdMob (ex. AdMob) 聚合 (Google AdMob (ex. AdMob) AdUnitId) 中创建的每个广告版位，在 Yandex Advertising Network 界面 (Yandex AdUnitId) 中创建一个 [广告单元](https://ads.yandex.com/helpcenter/zh/quick-start.md)<!--[создайте рекламный блок](../../monetization/ad-unit/)-->。

然后在 Google AdMob (ex. AdMob) 聚合网页界面中添加 Yandex Advertising Network：

### 1. 创建 Google AdMob (ex. AdMob) 广告单元

1. 前往您的应用版块。
2. 为所选广告格式创建广告单元，配置名称等广告单元参数。
3. 创建广告单元后，保存其 ID。

### 2. 创建 Yandex 广告单元

有关在 Yandex Advertising Network 界面中创建广告单元的 [说明](https://ads.yandex.com/helpcenter/zh/quick-start.md)<!--[Инструкция](../../monetization/ad-unit/)-->。

### 3. 设置 Google AdMob (ex. AdMob) 聚合

1. 前往 **Yandex Mediation** 并点击 **Create mediation group**。
2. 选择平台。
3. 设置聚合组的参数（名称、区域等）并继续添加广告单元。
4. 选择您的应用，然后选择创建的广告单元，并添加该单元。您添加的广告单元应显示在 **Ad Units** 部分中。
5. Yandex Advertising Network 只能作为自定义事件添加到 Google AdMob (ex. AdMob) 聚合中。转到添加自定义事件（**Add Custom Event** 按钮）。您需要为在 Yandex Advertising Network 界面中创建的每个 adUnitId 设置/重复自定义事件。
6. 通过设置事件名称和 eCPM 底价，配置用于访问 Yandex Advertising Network 的自定义事件。eCPM 底价值必须与广告单元的 Yandex Advertising Network 界面中的阈值匹配。
7. 设置自定义事件到 Yandex 适配器的映射：
   - 设置映射名称。
   - 设置与您选择的广告格式相对应的适配器类名称。
   - 设置事件参数。

   每种广告格式都有相应的 Yandex 适配器类：
   - `YMAAdMobCustomEventBanner` 适用于横幅广告。
   - `YMAAdMobCustomEventInterstitial` 适用于插屏广告。
   - `YMAAdMobCustomEventRewarded` 适用于奖励广告。
   - `YMAAdMobCustomEventNative` 适用于原生广告

   在**Parameter**中，以 JSON 格式配置自定义事件设置。您必须为广告单元设置 Yandex 广告单元 ID。
8. 保存更改。

