Open Bidding Mediation Beta

This guide is intended to help you integrate Open Bidding mediation into your Unity app via an early access build of the Google Mobile Ads SDK.

Download early build of GMA Unity plugin

Download early build for Android

If you normally use the Unity plugin with native ads, Download early build of GMA Unity plugin for Native Ads instead.

Prerequisites

  • Contact your account manager to get your app whitelisted to use open bidding.
  • Set up AdMob mediation groups configured with open bidding networks.
  • Download and import the early build of the GMA Unity plugin from the link above.
  • Download the early Android build from the link above, and install it using these instructions. The Android version you'll use in the dependency file is 16.7.1. On iOS, you don't need to follow the EAP installation instructions, as you can get this feature through the public iOS SDK version 7.42.2 or higher.

Initialize the Mobile Ads SDK

Before loading ads, have your app initialize the Mobile Ads SDK, as well as your mediation partners’ SDKs by calling MobileAds.Initialize(), with an Action<InitializationStatus> object. This needs to be done only once, ideally at app launch.

Upon initialization completion, the Action<InitializationStatus> provided to MobileAds.Initialize() is invoked. The InitializationStatus argument is an immutable snapshot of the Mobile Ads SDK's initialization status, as well as the initialization status of each adapter your app is mediating to.

Call getAdapterStatusMap() on the InitializationStatus object to get the initialization status of each mediation ad network available to the Mobile Ads SDK, identified by the adapter class name.

using GoogleMobileAds.Api;
using System.Collections.Generic;
...

public class GoogleMobileAdsDemoScript : MonoBehaviour
{
    ...

    public void Start()
    {
        // Initialize the Mobile Ads SDK.
        MobileAds.Initialize((initStatus) =>
        {
            Dictionary<string, AdapterStatus> map = initStatus.getAdapterStatusMap();
            foreach (KeyValuePair<string, AdapterStatus> keyValuePair in map)
            {
                string className = keyValuePair.Key;
                AdapterStatus status = keyValuePair.Value;
                switch (status.InitializationState)
                {
                case AdapterState.NotReady:
                    // The adapter initialization did not complete.
                    MonoBehaviour.print("Adapter: " + className + " not ready.");
                    break;
                case AdapterState.Ready:
                    // The adapter was successfully initialized.
                    MonoBehaviour.print("Adapter: " + className + " is initialized.");
                    break;
                }
            }
        });
        ...
    }
}

Note that after 10 seconds, the SDK invokes the OnInitializationCompleteListener even if a mediation network still hasn't completed initialization.

It is a best practice to load an ad inside the callback of the OnInitializationCompleteListener. Even if a mediation network is not ready, the SDK will still ask that network for an ad. So if a mediation network finishes initializing after the timeout, it can still service future ad requests in that session.

You can continue to poll the initialization status of all adapters throughout your app session by calling MobileAds.getInitializationStatus().

If you would like to know why a particular mediation network isn't ready, call AdapterStatus.getDescription(), which describes why an adapter is not ready to service ad requests.

Choose your open bidding networks

Integrating open bidding requires changes in these places:

  1. Third-party ad network UI - Sign up for the third-party ad network and create a placement in their UI.
  2. AdMob UI - Update your ad unit's mediation settings to include the ad network.
  3. 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.

The ad network guides linked below walk you through each of these steps. Select an ad network below to get started.

Ad Network Banner Interstitial Rewarded Video
AppLovin
Tapjoy

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 are using the public version of the third-party ad network's adapter and forgot to install the beta version.
  • 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 Action<InitializationStatus> 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.

Send feedback about...

Need help? Visit our support page.