---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/android/applovin-third.md
  - https://ads.yandex.com/helpcenter/ru/dev/android/applovin-third.md
  - https://ads.yandex.com/helpcenter/zh/dev/android/applovin-third.md
  - href: https://ads.yandex.com/helpcenter/en/dev/android/applovin-third.md
    type: text/markdown
    title: Markdown version
  - href: https://ads.yandex.com/helpcenter/en/llms.txt?revision=r22345382
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/en/llms.txt?revision=r22345382

# 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 Mоobile 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.7.0, use the AppLovin adapter for Yandex. It's added with the `com.applovin.mediation:yandex-adapter` dependency. For more information, see the [AppLovin guide](https://dash.applovin.com/documentation/mediation/android/mediation-adapters?network=YANDEX_NETWORK).

Adapter class name: `com.applovin.mediation.adapters.YandexMediationAdapter`.

### Yandex adapter {#yandex-adapter}

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

1. The adapter is published in the Yandex Mobile Ads repository. Add the repository to the `repositories` block of your project's `settings.gradle` or `build.gradle` file:

   ```groovy
   maven {
       url = uri("https://ads.maven.yandex.net/")
       content {
           includeGroup("com.yandex.android")
           includeGroupAndSubgroups("com.yandex.ads")
       }
   }
   ```

1. Add the adapter dependency to the `build.gradle` file of your app module, usually `app/build.gradle`:

   ```groovy
   dependencies {
       ...
       implementation 'com.yandex.ads.adapter:applovin-mobileads:8.7.0.0'
   }
   ```

Adapter class name: `com.applovin.mediation.adapters.YandexCustomMediationAdapter`.

{% 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/android/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.
