---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/ios/applovin-third.md
  - https://ads.yandex.com/helpcenter/ru/dev/ios/applovin-third.md
  - https://ads.yandex.com/helpcenter/zh/dev/ios/applovin-third.md
  - href: https://ads.yandex.com/helpcenter/en/dev/ios/applovin-third.md
    type: text/markdown
    title: Markdown version
  - href: https://ads.yandex.com/helpcenter/en/llms.txt?revision=r22385960
    rel: describedby
---
> **Documentation capabilities:** Search, read sources, and browse this documentation: [agent guide](https://ads.yandex.com/helpcenter/docs-api/agent/overview?project=common%2Fmobile-ads&lang=en).

> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/en/llms.txt?revision=r22385960

# AppLovin MAX mediation

{% note info %}

Follow this guide if you're already using AppLovin MAX mediation and want to add the Yandex Advertising Network to it as a Custom Network.

If you want to manage external ad networks through the Yandex Advertising Network interface, use [Yandex Mobile Mediation](https://ads.yandex.com/helpcenter/en/easy/index.md).

{% endnote %}

To add the Yandex Advertising Network to AppLovin MAX mediation, follow these steps:

1. Integrate the Yandex adapter into your app.
2. Create ad units in the [Yandex Advertising Network interface](https://ads.yandex.com/helpcenter/en/monetization/formats.yaml).
3. Add Yandex as a custom network in the AppLovin MAX web interface.
4. Connect the network to your MAX ad units.
5. Test the integration.

## Connecting the adapter {#sdk-adapter}

You can connect the Yandex Advertising Network to MAX via the AppLovin adapter or the Yandex adapter. The adapter you choose determines the class names you need to specify in the custom network settings.

### AppLovin adapter {#applovin-adapter}

For AppLovin MAX SDK version 13.6.4, use the AppLovin adapter for Yandex. It's added via CocoaPods (`AppLovinMediationYandexAdapter`) or Swift Package Manager (`AppLovin-MAX-Swift-Package-Yandex`). For more information, see the [AppLovin guide](https://dash.applovin.com/documentation/mediation/ios/mediation-adapters?network=YANDEX_NETWORK).

Adapter class name: `ALYandexMediationAdapter`.

{% note warning %}

Starting with Yandex Mobile Ads SDK 8.7.1, you must use the Yandex adapter. See [below](#yandex-adapter) for how to integrate it.

{% endnote %}

### Yandex adapter {#yandex-adapter}

For newer AppLovin MAX SDK versions, use the Yandex adapter. When switching to it, remove the AppLovin adapter for Yandex from your app.

Adapter class name: `YMAAppLovinMediationAdapter`.

{% list tabs %}

- CocoaPods

  Add the dependency to your project's Podfile:

  ```ruby
  pod 'YandexMobileAdsAppLovinAdapters', '8.7.1.0'
  ```

- Swift Package Manager

  1. In Xcode, select **File** → **Add Package Dependencies** and enter the repository URL `https://github.com/yandexmobile/yandex-ads-sdk-mediation-ios`.
  1. Select package version 8.7.1 or later.
  1. Select the `YandexMobileAdsAppLovinAdapters` product and add it to your app target.

     {% note warning %}

     Don't use the `AppLovinYandexMobileAdsAdapters` product from the same package: it's intended for Yandex mediation.

     {% endnote %}

  1. In **Build Settings** → **Linking**, add `-ObjC` to **Other Linker Flags**. Keep the existing values and `$(inherited)`.
  1. In the target settings, open **Link Binary With Libraries** and make sure the product is linked.

{% endlist %}

{% note warning %}

Adapter class names are set in the custom network for the whole MAX account. If you replace them in an existing network, app versions with the AppLovin adapter will stop receiving Yandex ads. To keep older app versions working, create a separate custom network for the Yandex adapter and connect it to the same ad units.

{% endnote %}

## Adding the Yandex Advertising Network in the AppLovin MAX web interface {#max-add}

### 1. Create Yandex ad units {#yandex-ad-units}

In MAX, a custom network works only in the waterfall. To set several price levels, [create](https://ads.yandex.com/helpcenter/en/monetization/formats.yaml) several ad units of the same format with different eCPM floors in the Yandex Advertising Network interface for each MAX ad unit.

Save the IDs of the created ad units in the `R-M-XXXXXX-Y` format: you'll need to specify them in MAX as Placement IDs.

### 2. Add the Yandex custom network {#custom-network}

1. In the AppLovin web interface, go to **MAX** → **Mediation** → **Manage** → **Networks**.
1. At the bottom of the network list, click **Click here to add a Custom Network**.
1. Fill out the form:

   - **Network Type**: `SDK`.
   - **Custom Network Name**: The network name, such as `YAN Custom`. The network is displayed under this name in MAX ad units and reports.
   - **iOS Adapter Class Name** and **Android / Fire OS Adapter Class Name**: The class names of the [integrated adapter](#sdk-adapter):

     | Adapter | iOS Adapter Class Name | Android / Fire OS Adapter Class Name |
     |---|---|---|
     | AppLovin | `ALYandexMediationAdapter` | `com.applovin.mediation.adapters.YandexMediationAdapter` |
     | Yandex | `YMAAppLovinMediationAdapter` | `com.applovin.mediation.adapters.YandexCustomMediationAdapter` |

1. Click **Save**.

{% list tabs %}

- AppLovin adapter

  ![Creating a custom network in AppLovin MAX](../../../_images/applovin-custom-network-create.png){style="border: solid 1px #cccccc; max-width: 700px;"}

- Yandex adapter

  ![Creating a custom network in AppLovin MAX](../../../_images/applovin-custom-network-create-yandex.png){style="border: solid 1px #cccccc; max-width: 700px;"}

{% endlist %}

The network is created once per account and becomes available in all apps and ad units.

{% note warning %}

Class names are case-sensitive and must not contain spaces. If the app has no class with the specified name, MAX skips the network in the waterfall with the `adapter not loaded` error.

{% endnote %}

### 3. Connect the network to a MAX ad unit {#ad-unit}

1. Go to **MAX** → **Mediation** → **Manage** → **Ad Units** and open the ad unit.
1. In the **Custom Networks** section, expand the row with your custom network, such as **Custom Network (SDK) - YAN Custom**.
1. Turn on the **Status** toggle.
1. Fill in the fields:

   - **App ID (optional)**: Leave empty. The adapter doesn't use this field.
   - **Placement ID**: The Yandex ad unit ID in the `R-M-XXXXXX-Y` format.
   - **CPM Price**: The price in USD at which MAX places the network in the waterfall.
   - **Custom Parameters**: Leave empty.
   - **Country Targeting**: Limit countries if needed.

1. To add another price level, click **Add New Placement ID** and specify another Yandex ad unit and its CPM.
1. Click **Save**.

![Yandex custom network in a MAX ad unit](../../../_images/applovin-custom-network-ad-unit.png){style="border: solid 1px #cccccc; max-width: 700px;"}

Repeat these steps for each MAX ad unit that should serve Yandex Advertising Network ads.

{% note warning %}

The **CPM Price** value must match the eCPM floor set for the ad unit in the Yandex Advertising Network interface. MAX accepts prices only in USD, so convert a floor set in another currency to USD.

If the ad unit uses the **Maximum revenue** strategy in the Yandex Advertising Network interface and has no floor, enter the expected eCPM or the eCPM for previous periods.

{% endnote %}

{% note info %}

MAX calculates custom network impression revenue from the **CPM Price** value: in MAX revenue callbacks and reports, a Yandex impression is worth CPM Price / 1000 with `publisher_defined` precision. See the actual revenue in the [Yandex Advertising Network statistics](https://ads.yandex.com/helpcenter/en/monetization/statistics/index.md).

{% endnote %}

### 4. Test the integration {#test}

MAX doesn't apply settings changes immediately: the network may appear in the waterfall 15–30 minutes after you save.

1. To test ad display, temporarily set **Placement ID** to a [demo ad unit](https://ads.yandex.com/helpcenter/en/dev/ios/demo-blocks.md) of the required format:

   - banner ads: `demo-banner-yandex`;
   - interstitial ads: `demo-interstitial-yandex`;
   - rewarded ads: `demo-rewarded-yandex`.

   After testing, switch back to your production ad unit ID.

1. Open MAX Mediation Debugger, go to **Ad Units**, and select the ad unit. The **WATERFALL** section should list your custom network with your Placement ID and CPM.
