Open Bidding Mediation Beta

This guide is intended to help you integrate Open Bidding mediation into your iOS app.

Prerequisites

Open Bidding partners

There are two types of open bidding integrations: those that require a third-party SDK and those that don't.

  • An integration with a partner that doesn't require a separate third-party SDK or adapter library won't require an app update. You just need to add an Open Bidding ad source in the AdMob UI.

  • For partners that require an SDK, additional Google Mobile Ads SDK integration instructions are provided below.

SDK 1 & SDK-less Open Bidding partners
Partner Banner Interstitial Rewarded Video Native
Aarki
AdColony 1
AppLovin 1
Facebook 1
Fluct
Index Exchange
Liftoff
OpenX
PubMatic
RhythmOne
Rubicon
Smaato
TripleLift

1 Partner requires third-party SDK.

Verify that your AdMob app ID is in your Info.plist

If you've completed the prerequisites, you should already have your AdMob app ID in your Info.plist file:

Property List Editor

Load ads only after initialization completes

The quick start guide shows you how to initialize mobile ads. Open bidding adapters must complete initialization before they can participate in an ad request. It is important to wait for the initialization completionHandler to be invoked before you load ads in order to ensure full participation from every ad network on the first ad request. Sample code for how to do this is shown below:

Swift

import GoogleMobileAds

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  func application(_ application: UIApplication,
      didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    let ads = GADMobileAds.sharedInstance()
    ads.start { status in
      // Optional: Log each adapter's initialization latency.
      let adapterStatuses = status.adapterStatusesByClassName
      for adapter in adapterStatuses {
        let adapterStatus = adapter.value
        NSLog("Adapter Name: %@, Description: %@, Latency: %f", adapter.key,
        adapterStatus.description, adapterStatus.latency)
      }

      // Start loading ads here...
    }

    return true
  }

}

Objective-C

@import GoogleMobileAds;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  GADMobileAds *ads = [GADMobileAds sharedInstance];
  [ads startWithCompletionHandler:^(GADInitializationStatus *status) {
    // Optional: Log each adapter's initialization latency.
    NSDictionary *adapterStatuses = [status adapterStatusesByClassName];
    for (NSString *adapter in adapterStatuses) {
      GADAdapterStatus *adapterStatus = adapterStatuses[adapter];
      NSLog(@"Adapter Name: %@, Description: %@, Latency: %f", adapter,
            adapterStatus.description, adapterStatus.latency);
    }

    // Start loading ads here...
  }];
  return YES;
}

@end

If ads are loaded before an open bidding adapter has finished initializing, that adapter won't participate in the ad request.

The initialization completionHandler is called once all open bidding adapters have been initialized, or after a 10 second timeout, whichever is sooner. If your first ad request is time sensitive, you can always check the initializationStatus property on GADMobileAds at any time to see which adapters have been initialized.

Choose your open bidding networks

For each open bidding partner, you'll need to make changes in these places:

Third-party ad network UI
Sign up for the third-party ad network and create a placement in their UI.
AdMob UI
Update your ad unit's mediation settings to include the ad network.
App code
Update your app to include the third-party ad network's SDK, and an adapter library that communicates between Google and the third-party ad network to request and serve ads.

Click on the link of a network in the table for detailed instructions on how to incorporate its SDK.

Troubleshooting

The presence of the a3p parameter in the ad request to Google indicates that at least one open bidding network is properly integrated into your app. If a3p isn't in the ad request, here are potential reasons why:

  • You did not initialize the mobile ads SDK using the new initialization method.
  • You loaded the ad before the third-party ad network's SDK was initialized. To ensure all open bidding partners can participate, we recommend waiting to load an ad until after your the completion handler you passed into startWithCompletionHandler: gets called.
  • Your AdMob ad unit doesn't target a mediation group that has an open bidding entry configured for that third-party ad network.
  • Your AdMob ad unit belongs to a different AdMob app than the one you initialized with. When initialization occurs, the Google Mobile Ads SDK only pulls down information about the ad units from the AdMob app ID you initialized.

Make sure to disable refresh in all third-party ad networks UI for banner ad units used in AdMob mediation. This will prevent a double refresh since AdMob also triggers a refresh based on your banner ad unit's refresh rate.

Rewarded ads mediation

We recommend that you override all default reward values by setting reward values in the AdMob UI. To do this, select the Apply to all networks in Mediation groups box so that the reward is consistent across all networks. Some ad networks don't provide a reward value or type at all. By overriding the reward value, the reward is consistent no matter which ad network served the ad.

For more information on setting reward values in the AdMob UI, refer to create a rewarded ad unit.

Native ads mediation

The following are some best practices to consider when implementing native mediation.

Native ad presentation policy
Each ad network has its own policies. When using mediation, it's important to remember that your app still needs to abide by the policies of the mediated network that provided the ad.
Avoid using the GADMultipleAdsAdLoaderOptions class when making requests
Requests for multiple native ads only serve Google ads. The multiple native ads feature does not support mediation.