Mediation

AdMob Mediation is a feature that lets you serve ads to your apps from multiple sources, including the AdMob Network, third-party ad networks, and AdMob campaigns. AdMob Mediation helps maximize your fill rate and increase your monetization by sending ad requests to multiple networks to ensure you find the best available network to serve ads. Case study.

This guide is your one stop shop for integrating mediation into your AdMob app.

Prerequisites

Initialize the Mobile Ads SDK

The quick start guide shows you how to initialize the Mobile Ads SDK. During that initialization call, mediation and open bidding adapters also get initialized. It is important to wait for initialization to complete before you load ads in order to ensure full participation from every ad network on the first ad request.

The sample code below shows how you can check each adapter's initialization status prior to making an ad request.

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;
                }
            }
        });
        ...
    }
}

Choosing your mediation networks

Google mediation supports over 30 third-party ad networks. Integrating mediation requires changes in these places:

Third-party ad network UI
Sign up for the third-party ad network and create a placement in their frontend.
AdMob UI
Update your ad unit's mediation settings to include the ad network. It is also recommended that you set up ad network optimization for ad networks that support it.
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.

To begin, select an ad network from the below, and it will guide you through these changes.

Ad Network Banner Interstitial Rewarded Open Bidding1 ANO support
No third-party SDKs required
Liftoff Bidding only
Pubmatic Bidding only
Open source and versioned
AdColony Country-specific
AppLovin Country-specific
Chartboost Country-specific
Facebook Country-specific
Fyber Marketplace Country-specific
InMobi Country-specific
ironSource Country-specific
maio Global
MoPub Country-specific
myTarget Country-specific
nend Global
Tapjoy Country-specific
Unity Ads Country-specific
Verizon Media Country-specific
Vungle Country-specific
Non-open source
AdFalcon Country-specific
Flurry Country-specific
i-mobile Global
Leadbolt Country-specific
LG U+AD None
MobFox Global
Tencent GDT None
Vpon None
Zucks Country-specific

1 Open Bidding is currently in a limited beta. Please reach out to your account manager for more information.

Open source and versioned adapters

If an adapter is labeled with "Open source and versioned" in the above table, it means the adapter source code is open-sourced in Google's GitHub repository (Android | iOS), enabling you to debug issues yourself should you choose to do so.

It also means that there are versioned adapter builds in Google's bintray repository (Android | iOS), built against a specific version of the third-party ad network SDK. Click on a specific ad network's guide for more details.

Adapter versioning

The adapter versioning scheme for versioned adapters is <third-party SDK version>.<adapter patch version>. For example, if an ad network releases a new SDK version 1.2.3, a new adapter version 1.2.3.0 will be released to Bintray after being tested against that new SDK.

If an adapter needs updating outside the lifecycle of a third-party SDK release, the patch version will increase. A bug fix for adapter version 1.2.3.0 will be released in version 1.2.3.1.

ANO support

When you configure multiple ad networks for mediation, you have to specify what order to request these networks by setting their respective CPM. This can be difficult to manage, since ad network performance changes over time.

Ad network optimization (ANO) is a feature that enables you to generate the highest CPM from the ad networks in your mediation chain by automating the process of ordering the mediation chain to maximize revenue.

The mediation networks table above has the following values for ANO support:

ANO support What it means
Bidding only The ad network only participates in Open Bidding. ANO support is not applicable.
Country-specific eCPM values are automatically updated on your behalf on a per-country basis. This is the optimal type of optimization.
Global A single global eCPM value is automatically updated on your behalf.
None You must manually configure an eCPM value for that ad network.

Click on a specific ad network's guide for details on how to configure ANO for that network.

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.

Open Bidding troubleshooting

When integrating an Open Bidding partner that requires their SDK, the following symptons indicate an improper integration:

  • The Open Bidding Report shows significantly fewer ad requests to that partner than you expect.
  • The a3p parameter in your ad requests is missing or is short (30 characters or less).

Follow this checklist to make sure your setup is correct:

  • In the AdMob UI, your AdMob ad unit targets a mediation group that has an Open Bidding entry configured for that third-party ad network.
  • In the AdMob UI, your AdMob ad unit belongs to the same AdMob app ID that you passed to the Google Mobile Ads SDK.
  • You initialized the mobile ads SDK, and verified the adapter status is READY prior to loading an ad.