Google AdMob (ex. AdMob) mediation
Google AdMob (ex. AdMob) mediation can be used to connect to the Yandex Advertising Network. Here's how to add the Yandex Advertising Network to Google AdMob (ex. AdMob) mediation:
- Integrate Google AdMob (ex. AdMob) mediation.
- Add the adapter for the Yandex Mobile Ads SDK.
- Create AdUnitId for the ad type you want in the Yandex partner interface.
- Add the Yandex Advertising Network in the Google AdMob (ex. AdMob) web interface.
- Synchronize the ad unit settings in both web interfaces.
Adding the adapter for the Yandex Mobile Ads SDK
To integrate the Yandex Advertising Network with Google AdMob (ex. AdMob) mediation, add the adapter dependency to the build.gradle file of your project's module:
dependencies {
...
implementation 'com.yandex.ads.adapter:admob-mobileads:7.7.0.0'
}
Adding the Yandex Advertising Network in the Google AdMob (ex. AdMob) mediation web interface
For each ad placement created in Google AdMob (ex. AdMob) mediation (AdMob AdUnitId), create an ad unit in the Yandex partner interface (Yandex AdUnitId).
Then add the Yandex Advertising Network in the Google AdMob (ex. AdMob) mediation web interface:
1. Create an Google AdMob (ex. AdMob) ad unit
- Go to your app section.
- Create an ad unit for the selected ad format, configuring ad unit parameters like the name.
- After creating the ad unit, save its ID.
Screenshots from the Google AdMob (ex. AdMob) interface
2. Create a Yandex ad unit
Instructions for creating an ad unit in the Yandex partner interface.
3. Set up Google AdMob (ex. AdMob) mediation
-
Go to Mediation and click Create Mediation Group.
-
Select a platform.
-
Set the parameters of the mediation group (name, region, and so on) and proceed to adding the ad unit.
-
Select your app, select the ad unit you created, and add it. The ad unit you added should appear in the Ad Units section.
-
The Yandex Advertising Network can only be added to Google AdMob (ex. AdMob) mediation as a custom event. Go to adding a custom event (the Add Custom Event button). You need to set up/repeat your custom event for each adUnitId created in the Yandex partner interface.
-
Configure a custom event for accessing the Yandex Advertising Network by setting the event name and eCPM floor. The eCPM floor value must match the threshold in the Yandex partner interface for the ad unit.
-
Set up mapping of the custom event to the Yandex adapter:
- Set the mapping name.
- Set an adapter class name that corresponds to the ad format you selected.
- Set the event parameters.
Each ad format has a corresponding Yandex adapter class:
- com.admob.mobileads.YandexBanner for banner ads.
- com.admob.mobileads.YandexInterstitial for interstitial ads.
- com.admob.mobileads.YandexRewarded for rewarded ads.
- com.admob.mobileads.YandexNative for native ads.
In Parameter, configure the custom event settings in JSON format. You must set the Yandex ad unit ID for the ad unit.
-
Save the changes.