MoPub

Android

Banners

Mediation with Mopub SDK requires adding mediation classes for 320x50 format to your project.

Mediation is configured at http://www.mopub.com/

To create a mediation network, go to the Networks section and add a Custom Native Network, specifying the following parameters:
Set AdSize:

myTarget SDK supported 320х50, 300х250 and 728х90 formats defined in MyTargetView.AdSize interface:
moPubView = new MoPubView(this);
         
Map<String, Object> localExtras = new HashMap<>();
...
localExtras.put("mytarget_adsize", MyTargetView.AdSize.BANNER_320x50);
 
moPubView.setLocalExtras(localExtras);
For better ad targeting, you can optionally specify the user's gender and age:
moPubView = new MoPubView(this);
Map<String, Object> localExtras = new HashMap<>();
localExtras.put("mytarget_gender", 1); // 1 - male, 2 - female
localExtras.put("mytarget_age", 26); // age in years
moPubView.setLocalExtras(localExtras);

Interstitial Ads

Mediation with Mopub SDK requires adding mediation classes for Interstitial format to your project.

Mediation is configured at http://www.mopub.com/

Specify the following values in the Network settings:
For better ad targeting, you can optionally specify the user's gender and age:
moPubInterstitial = new MoPubInterstitial(this, MOPUB_INTERATITIAL_ADUNIT_ID);
Map<String, Object> localExtras = new HashMap<>();
localExtras.put("mytarget_gender", 1); // 1 - male, 2 - female
localExtras.put("mytarget_age", 26); // age in years
moPubInterstitial.setLocalExtras(localExtras);

Rewarded video

Mediation with Mopub SDK requires adding mediation classes for Rewarded Video format to your project.

Mediation is configured at http://www.mopub.com/

Specify the following values in the Network settings:

Native Ads

Mediation with Mopub SDK requires adding mediation classes for NativeAd format to your project.

Mediation is configured at http://www.mopub.com/

To create a mediation network, go to the Networks section and add a Custom Native Network, specifying the following parameters:

iOS

Banners

Mediation with Mopub SDK requires adding mediation classes for 320x50 format to your project.

Mediation is configured at http://www.mopub.com/

To create a mediation network, go to the Networks section and add a Custom Native Network, specifying the following parameters:

Interstitial Ads

Mediation with Mopub SDK requires adding mediation classes to your project.

Mediation is configured at http://www.mopub.com/

Specify the following values in the Network settings:

Rewarded video

Mediation with Mopub SDK requires adding mediation classes to your project.

Mediation is configured at http://www.mopub.com/

Specify the following values in the Network settings:

Нативная реклама

Mediation with Mopub SDK requires adding mediation classes to your project.

For Mopub SDK version 4.0 and higher you should add class name "MTRGMopubNativeCustomEvent" to supportedCustomEvents array of MPNativeAdRendererConfiguration object:
MPNativeAdRendererConfiguration *nativeAdConfig = [MPStaticNativeAdRenderer rendererConfigurationWithRendererSettings:nativeAdSettings];
nativeAdConfig.supportedCustomEvents = @[@"MTRGMopubNativeCustomEvent"];
Mediation is configured at http://www.mopub.com/

To create a mediation network, go to the Networks section and add a Custom Native Network, specifying the following parameters:
Was this article helpful?
Yes
No