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
The YandexMobileAdsAdMobAdapters
library has been adapted to work with the CocoaPods dependency management system and supports a static integration method.
To connect the library, add the dependency to the project's Podfile:
pod 'YandexMobileAdsAdMobAdapters', '7.8.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.
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:
YMAAdMobCustomEventBanner
for banner ads.YMAAdMobCustomEventInterstitial
for interstitial ads.YMAAdMobCustomEventRewarded
for rewarded ads.YMAAdMobCustomEventNative
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.