Mediating MoPub through Google


Quick Guide for Mediating MoPub Using AdMob

  1. Download and add MoPub SDK and Adapters                     

  2. Add the Mediation Adapter in Your Project. Instructions are below                              

  3. Setup MoPub Mediation in the AdMob UI

Quick Guide for Mediating MoPub Using DFP

  1. Download and add the MoPub SDK   Android   iOS

  2. Download and add the MoPub Adapters ( iOS, Android )to Your Project. Instructions below.

  3. Set up Mediation Group in DFP (Note: requires account linked to AdX ad exchange)

  4. Within the mediation group, select Ad Format and define targeting

  5. Add MoPub as a Mediation Network

  6. For integration type, choose Mobile SDK

  7. Make sure you have an AdX line item targeting the same inventory as your Mediation Group


Important setting to confirm before going live:

The Google Mobile Ads SDK is expected to control the refresh rate. The MoPub SDK refresh has to be disabled.

To disable the MoPub refresh:

Detailed Instructions for Integrating MoPub Adapter


Integrate Using Cocoapods

Integrate Manually

Add or drag the MoPubAdapter.framework into your Xcode project.

Passing extra data to MoPub

You can optionally register a GADMoPubNetworkExtras class with the ad request to set the desired size for the MoPub privacy icon in points. Values can range from 10 to 30 inclusive, with a default size of 20.

GADRequest *request = [GADRequest request];
GADMoPubNetworkExtras *extras = [[GADMoPubNetworkExtras alloc] init];
extras.privacyIconSize = 20;
[request registerAdNetworkExtras:extras];


Integrate the adapters

Add the compile dependency with the latest version of the MoPub adapter in the build.gradle file:

dependencies {
 compile ''

Passing extra data to MoPub

The MoPubAdapter.BundleBuilder class can be used to create a bundle with optional information to be passed to the MoPub adapter in an AdRequest:

Bundle bundle = new MoPubAdapter.BundleBuilder()
 AdRequest adRequest = new AdRequest.Builder()
         .addNetworkExtrasBundle(MoPubAdapter.class, bundle)

Native Ads Notes

Ad Rendering

The latest documentation and code samples for the Google Mobile Ads SDK are available at the AdMob Developer Docs.

Note: Native mediation with DFP (native styles and custom rendering) is not currently supported by Google. For more information on this topic, please reach out to your Google contact.

Note: Mediation of MoPub Native Video is not currently supported by Google.

Rewarded Video Notes

Mediating MoPub Rewarded Video through Google is not currently not supported.


Q: Why am I seeing no fill resulting in blank ad slots?

A: We recommend working directly with DFP to resolve no fill (blank ad slot) issues. Fill rates will be impacted by your available inventory set up in the DFP dashboard. Additionally, MoPub Marketplace will not fill all impressions, if Marketplace does not have fill for an ad opportunity we will notify DFP to look to other sources such as AdX backfill.

Q: Why is the user agent being sent up in the DFP ad request invalid?  Resulting in the DFP ad request to fail with a 400 response.

A:The GADBannerView may have been instantiated inside of the mopub mediator before it was configured.  To fix, remove instantiation of GADBannerView inside of mopub before we creating an instance of bannerview for a banner.

Q: Can MoPub be mediated outside of DFP mediation/yield groups?  

A: Yes, MoPub can be trafficked as a line item creative, but only for banners and interstitials.  Native ad format mediation is only supported through Mediation/ Yield groups.

Q: Can I adjust the DFP timeout threshold for MoPub mediation to be greater than 5000ms?

A: If using mediation/yield groups it is not possible to change the timeout threshold, the default of 5000 ms will be used.

Updated: November 2017