Mediation

Stay organized with collections Save and categorize content based on your preferences.

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. It covers both bidding and waterfall integrations.

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

CCPA

If you need to comply with the California Consumer Privacy Act (CCPA), follow the steps in CCPA settings to add your mediation partners in AdMob Privacy & messaging's CCPA ad partners list. Failure to do so can lead to partners failing to serve ads on your app.

Learn more about enabling CCPA restricted data processing.