Bid floors in AdMob

Setup in AdMob

Set up multiple Ad Units per Ad Format in the AdMob dashboard. one default ad unit per ad format and as many as possible additional ad units with a floor price set. These floor prices are determined and provided to you as described in the introduction.

Requesting user floor price insights

Via the SDK, partners will request user specific floor price insight key-values:

  • User value bid floor price: ._interstitial._floorPrice or ._rewarded._floorPrice.
  • Recommended AdMob AdUnit Id: ._interstitial._adUnit or ._rewarded._adUnit
NeftaPlugin._instance.GetInsights(Insights.Interstitial, callback: { insights in
  _dynamicInsight = insights._interstitial
  if let insight = _dynamicInsight, let recommendedAdUnit = insight._adUnit {
    GADNeftaAdapter.onExternalMediationRequest(with: insight, request: _dynamicRequest!, adUnitId: recommendedAdUnit)
    Task {
      do {
        _dynamicInterstitial = try await GADInterstitialAd.load(withAdUnitID: recommendedAdUnit, request: _dynamicRequest)
        ...
      }
    }
  }                                                            
}, timeout: TimeoutInSeconds)
NeftaPlugin._instance.GetInsights(Insights.INTERSTITIAL, _dynamicInsight, (Insights insights) -> {
  _dynamicInsight = insights._interstitial;
  if (_dynamicInsight != null && _dynamicInsight._adUnit != null) {
    final String recommendedAdUnitId = _dynamicInsight._adUnit;
    NeftaAdapter.OnExternalMediationRequestWithInsight(_dynamicInsight, _dynamicRequest, recommendedAdUnitId);
    InterstitialAd.load(_activity, recommendedAdUnitId, _dynamicRequest, ..);
), 5);
Adapter.GetInsight(Insights.Interstitial, previousInsight, (Insights insights) => {
  _dynamicInsight = insights._interstitial;
  var recommendedAdUnit = _dynamicInsight._adUnit;
  Adapter.OnExternalMediationRequest(_dynamicInsight, _dynamicRequest, recommendedAdUnit);
  
  InterstitialAd.Load(recommendedAdUnit, _dynamicRequest, (InterstitialAd ad, LoadAdError error) => {
    ..
  };
}, TimeoutInSeconds);
🚧

Validate returned values

It is crucial a partner checks the values received are valid. Only if a valid response is received, a partner should proceed with using the values.

You are guaranteed to receive the callback in the same thread with all keys that you specified in the request.

Log outcome of ad opportunity

After a partner has received user insights, validated the response and requested an ad in MAX using the recommended_*_ad_unit_id field, the partner should log the outcome of the ad opportunity in order to continuously maximise ad revenue uplift.

When the ad successfully loads, log the response using the following function:

GADNeftaAdapter.onExternalMediationRequestLoad(withInterstitial: _dynamicInterstitial, request: _dynamicRequest!)
@Override
public void onAdLoaded(@NonNull InterstitialAd ad) {
  NeftaAdapter.OnExternalMediationRequestLoaded(ad, _dynamicRequest);
}
Adapter.OnExternalMediationRequestLoaded(ad, _dynamicRequest);

When the ad fails to load, log the response using the following function:

GADNeftaAdapter.onExternalMediationRequestFail(_dynamicRequest!, error: error)
@Override
public void onAdFailedToLoad(@NonNull LoadAdError adError) {
  NeftaAdapter.OnExternalMediationRequestFailed(_dynamicRequest, adError);
}
Adapter.OnExternalMediationRequestFailed(_dynamicRequest, error);

When an ad successfully shows log the impression with this:

func onPaid(adValue: GADAdValue) {
  GADNeftaAdapter.onExternalMediationImpression(withInterstitial: _presentingInterstitial, adValue: adValue)
}
@Override
public void onPaidEvent(@NonNull AdValue adValue) {
  NeftaAdapter.OnExternalMediationImpression(_presentingInterstitial, adValue);
}
Adapter.OnExternalMediationImpression(_presentingInterstitial, adValue);

And when receiving click callback:

func adDidRecordClick(_ ad: GADFullScreenPresentingAd) {
  GADNeftaAdapter.onExternalMediationClick(withInterstitial: _presentingInterstitial)
}
@Override
public void onAdClicked() {
  NeftaAdapter.OnExternalMediationClick(_presentingInterstitial);
}
Adapter.OnExternalMediationClick(_presentingInterstitial);

Initial Ad Unit has no fill

If the initially recommended ad unit doesn't return an ad:

  • Re-request the bid floor price and recommended ad unit id: the new floor price takes into account the previous no-fill event and is adjusted in real time. You can repeat this process for each ad opportunity. However, latency should be considered if requesting multiple times per ad opportunity. Nefta will help in balancing fill %, revenue uplift and latency.
  • Request an ad from AdMob using an AdUnit without a floor price - a default ad unit.

Example code

Full example: