AdMob Network Integration in Mobile Application
AdMob is not just "add a banner." Incorrect integration leads to two consequences: low eCPM due to misconfigured targeting, and rejection in Google Play/App Store due to ad placement policy violations. Both are consequences of inattentive documentation reading.
Initialization and GDPR
Since 2023, AdMob requires integration of User Messaging Platform (UMP) for GDPR/CCPA compliance. Without requesting consent, ads in the EU are shown without personalization (non-personalized) — eCPM drops 3–5 times.
// Android
val params = ConsentRequestParameters.Builder()
.setTagForUnderAgeOfConsent(false)
.build()
ConsentInformation.getInstance(context).requestConsentInfoUpdate(
activity, params,
{
if (ConsentInformation.getInstance(context).isConsentFormAvailable) {
UserMessagingPlatform.loadAndShowConsentFormIfRequired(activity) { error ->
// After displaying the form — initialize AdMob
MobileAds.initialize(context)
}
} else {
MobileAds.initialize(context)
}
},
{ error -> /* error handling */ }
)
MobileAds.initialize must be called strictly after obtaining consent status, but only once during the app lifecycle. Calling before consent-flow → ads are shown without correct targeting.
Formats and Their Placement
Banners (AdaptiveBanner) — do not use fixed sizes BANNER (320x50). AdaptiveBanner adapts to screen width and provides eCPM 10–20% higher due to better fill:
val adSize = AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(
context, adContainerWidth
)
Google policy: banner must not overlap content and be fixed at the top or bottom of the screen. Floating banners, banners over buttons — causes ban.
Interstitial — show only in natural pauses: between levels, after task completion. Limit: no more than once per 60 seconds. Preload through InterstitialAd.load(), show when ready — interstitialAd.show(). Showing on button tap — violates policy, App Review catches it.
Rewarded — highest eCPM. User intentionally watches ads for reward (life in game, coins). Mandatory: award only in onUserEarnedReward, not in onAdDismissed.
rewardedAd.fullScreenContentCallback = object : FullScreenContentCallback() {
override fun onAdDismissedFullScreenContent() {
// Do NOT award here — user could have closed the ad early
}
}
rewardedAd.show(activity) { rewardItem ->
// Award only here
addReward(rewardItem.amount)
}
Mediation to Increase Fill Rate
Clean AdMob often does not provide 100% fill rate in some regions. Google Ad Manager with mediation allows connecting multiple networks (Meta Audience Network, Unity Ads, AppLovin) — AdMob selects the network with the highest eCPM for each impression.
Mediation setup — in AdMob Console, adapter integration for each network via Gradle/CocoaPods.
Timelines — 1–3 days depending on formats: basic integration with UMP and one format — 1 day; full mediation stack with multiple networks — 3 days.







