---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.0
alternate:
  - https://boost.yandex.com/doc/en/ad-monetization/dev/flutter/admob.md
  - https://boost.yandex.com/doc/ru/ad-monetization/dev/flutter/admob.md
  - https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/admob.md
  - href: https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/admob.md
    type: text/markdown
    title: Markdown version
  - href: https://boost.yandex.com/doc/zh/llms.txt?revision=r21738064
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://boost.yandex.com/doc/zh/llms.txt?revision=r21738064

# Google 集成

 

## 支持的广告格式 {#formats}

- [自适应内联横幅](https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/adaptive-inline-banner.md)
- [自适应粘性横幅](https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/adaptive-sticky-banner.md)
- [插屏广告](https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/interstitial.md)
- [激励广告](https://boost.yandex.com/doc/zh/ad-monetization/dev/flutter/rewarded.md)

## 集成 {#integration}

{% list tabs %}

- Android

   <!-- source: zh/ad-monetization/dev/_includes/admob-android.md -->
   1. 在 Yandex Advertising Network 界面和您的广告网络账户中[配置聚合](https://boost.yandex.com/doc/zh/ad-monetization/monetization/yandex-mediation/setup.md)。

   2. 将依赖项添加到应用级别的 build.gradle 文件中：
      ```
      implementation 'com.yandex.android:mobileads:8.5.0'
      implementation 'com.yandex.ads.mediation:mobileads-google-nextgen:1.3.0.1'
      ```

      {% note warning "请注意：" %}

      `com.yandex.ads.mediation:mobileads-google` 不再受支持 — 已被替换为 `com.yandex.ads.mediation:mobileads-google-nextgen`。

      {% endnote %}

   3. 使用名为 `com.google.android.gms.ads.APPLICATION_ID` 的 `<meta-data>` 标签向应用的 **AndroidManifest.xml** 文件添加 `AdMob ID`（详细了解如何[查找 AdMob ID](https://support.google.com/admob/answer/7356431)）。
      ```xml
      <manifest>
          <application>
       ...
              <meta-data
                  android:name="com.google.android.gms.ads.APPLICATION_ID"
                  android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
       ...
          </application>
      </manifest>
      ```
   <!-- endsource: zh/ad-monetization/dev/_includes/admob-android.md -->

- iOS

   <!-- source: zh/ad-monetization/dev/_includes/admob-ios.md -->
   {% note info %}

   要在移动聚合中跟踪应用安装，您需要为适配器配置 Info.plist。请按照广告网络 [文档](https://developers.google.com/admob/ios/ios14) 进行操作。

   {% endnote %}

   要使用 [Google](https://admob.google.com/home/)，您需要添加 `GoogleYandexMobileAdsAdapters` 库。

   `GoogleYandexMobileAdsAdapters` 库已进行了修改。它现在可与 CocoaPods 依赖管理系统进行互操作并支持静态集成方法。

   1. 在 Yandex Advertising Network 界面和其他网络界面中 [设置聚合](https://boost.yandex.com/doc/zh/ad-monetization/monetization/yandex-mediation/setup.md)。

   2. 要连接库，请将依赖项添加到项目的 Podfile 中：
      ```
      pod 'GoogleYandexMobileAdsAdapters', '13.8.0.1'
      ```

   3. 在应用的 Info.plist 文件中，添加字符串值为 `AdMob ID` 的 `GADApplicationIdentifier` 键（详细了解如何 [查找 AdMob ID](https://support.google.com/admob/answer/7356431)）。
      ```xml
      <key>GADApplicationIdentifier</key>
      <string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
      ```
   <!-- endsource: zh/ad-monetization/dev/_includes/admob-ios.md -->

{% endlist %}
