Mediating MoPub through Google
Minimum required Google Mobile Ads SDK
iOS - 7.14.0
Android - 9.6.1
Minimum MoPub SDK - 4.10.0
Quick Guide for Mediating MoPub Using AdMob
Download and add MoPub SDK and Adapters
Add the Mediation Adapter in Your Project. Instructions are below
Quick Guide for Mediating MoPub Using DFP
Download and add the MoPub Adapters to Your Project. Instructions below.
Set up Mediation Group in DFP (Note: requires account linked to AdX ad exchange)
Within the mediation group, select Ad Format and define targeting
Add MoPub as a Mediation Network
For integration type, choose Mobile SDK
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:
Click the ‘Edit ad unit settings’ button on any ad unit
Set the refresh interval to zero.
Detailed Instructions for Integrating MoPub Adapter
Integrate Using Cocoapods
Add the following line to your project’s Podfile: pod 'GoogleMobileAdsMediationMoPub'.
Run pod install.
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;
Integrate the adapters
Add the compile dependency with the latest version of the MoPub adapter in the build.gradle file:
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()
Native Ads Notes
MoPub has 5 assets including icon, title, description, main image and CTA text.
Currently MoPub adapter is built to return app install ads via Google mediation. If you are requesting content ads only, there will be no ads returned.
Impressions and Click Tracking
MoPub and Google Mobile Ads SDKs will be tracking impressions in their own way, so please expect discrepancies. Clicks are matched between the two SDKs.
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.
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: August 2017