Admob mediation - publisher ID vs Mediation ID

2020-07-17 16:15发布

问题:

I want to know what is the right paradigm for Admob mediation.
so far, I've got a normal AdView banner.

this is how think it should work:

  1. onFailedToReceiveAd - catch this event which mean admob cannot supply ads.
  2. create new AdView banner with the mediation id and make it VISIBLE

so, is this the best practice?
create two banners. one with the "regular" publisher ID
and the other one, with the mediation ID

回答1:

The correct approach is:

  1. Create a banner with a Mediation ID.
  2. When configuring that mediation placement on admob.com, configure AdMob as one of your ad networks within that mediation placement. If you want AdMob to be requested first every time, use an eCPM ordering and give AdMob the highest eCPM value.

This way, Mediation will always request an AdMob ad first. If it fails, Mediation will automatically try your next network for you. This saves you from having to do this retry logic on your own. onFailedToReceiveAd will only be invoked if all ad networks failed to return an ad.