Add AdMob App

In order to avoid your AdMob account being judged as Invalid traffic during the test, we strongly recommend that you use the test ID provided by AdMob to configure the following before the app is on the app store. After passing the test, change the parameters.

For test mode operation guidelines, please refer to AdMob Test Mode.

1. Click Apps → ADD YOUR FIRST APP.En-01.jpg

If you already have other apps under your AdMob account, please click Apps → ADD APP in the left navigation bar.En-02.jpg

2. Select your corresponding platform. If your app is not yet available in the app store, please select No.En-03.jpg

3. If your app is already available, please enter the app store URL, select your app below and click SEARCH.En-04.jpg

4. After creation, you will get the App ID.En-05.jpg


AdMob Ad Unit ID

1. Click AppsSelect your appAd unitsGET STARTED.En-06.jpg

2. Select and create the corresponding ad unit.En-07.jpg

  • BannerEn-08.jpg

  • InterstitialEn-09.jpg

  • RewardedEn-10.jpg

  • Native advancedEn-11.jpg

3. After the creation is complete, you will get the Ad unit ID, which will be used in the OpenMediation configuration later.En-12.jpg


The meaning of each field in the Ad unit

Field Description and Suggestions
Ad unit name

Enter a unique name and description that will help you find this ad unit later. we recommend that you name it:

Placement ID_Ad Network Name_ Country_Floor Price
E.g: 6539_AdMob_USA_40

Ad type

Choose the ad type(s) allowed for this ad unit. You can choose any combination.

  • Checking all boxes is recommended.
  • Unchecking any of the boxes might limit the revenue generated by the ad unit.
  • Unchecking all of the boxes will result in an error. You must choose at least one ad type for each ad unit.

The ad types available depend on the ad format you select.

Automatic refresh

Determines how often a new ad request is generated for this ad unit and a new ad is shown to the user.

Recommended: Google optimized.

Google optimized: Calculated using AdMob historical data. Learn more.

Custom: You can set it to refresh once within 30-150 seconds.

Disabled: It means there is no restriction on the refresh frequency.

eCPM floor

Define the minimum eCPM that the AdMob Network needs to meet to serve an ad.

Note: Setting a high eCPM floor may cause a decrease in overall fill rate.

Frequency capping

Limits the number of times ads are shown to the same person per minute, per hour, or per day. Learn more

Server-side verification

Adds an additional layer of validation when a user finishes viewing a video ad in addition to standard client-side callbacks.

Note: Post back may take a few minutes after it's triggered.

Learn more


OpenMediation Platform Configuration

Ad Network

1. Enter the OpenMediation publisher platform, click on Ad Network → click Edit behind Google AdMob.En-13.jpg

2. After filling in the relevant information, click Save.


  • App ID:You can get your App ID in AdMob background AppsApp settings.En-15.jpg
  • Currency: Select the corresponding currency unit in your AdMob reporting module.

You can click Sign in with Google to pull API data for Google login authorization (if you already have other apps under your account that have completed this step, you can directly select the corresponding Publisher ID).


You can also choose Manual to manually configure API data pull parameters (if you have logged in and authorized, you do not need to perform the following operations). 


Enter the Google Console Platform and log in to your Google account. If you log in to the Google Information Center for the first time, please select the country or region where your AdMob account is located.

  • API Key
    • Click Select Project NEW PROJECT.En-18.jpg 
    • The Project name and Location can use the default name and location, and can also be customized.En-19.jpg
    • In the Getting Started section below, click Explore and enable APIs.En-20.jpg
    • Click Credentials → CREATE CREDENTIALS API Key.En-21.jpg 
    • Get your API Key, and fill in the OpenMediation platform.En-22.jpg

  • Client ID & Client Secret
    • In the search box above, search for AdMob API, and then click ENABLE.61681620975227_.pic.jpg
    • Click on the navigation menu in the upper left corner and select API and Services OAuth consent screen.En-24.jpg
    • Select External and click CREATE.En-25.jpg
    • Save after entering the application name (no need to fill in other fields).En-26.jpg
    • Enter the credential interface, click Create credential OAuth client ID.En-27.jpg
    • Select Web Application for application type, and add redirect URI, click CREATE.En-28.jpg
    • Obtain the Client ID and Client Secret, and fill in the OpenMediation platform.En-29.jpg

  • Refresh Token
    • Enter OAuth 2.0 Playground, click the settings button on the right, check Use your own OAuth credentials, and enter your Client ID and Client Secret.En-30.jpg 
    • In Step 1, select AdMob APIv1
      , and click Authorize APIs. 61701620975228_.pic_hd.jpg
    • Log in to your account and authorize the project.
    • Click Exchange authorization code for tokens, get Refresh Token, and fill in OpenMediation platform.En-33.jpg


Add Instance

1.Click Mediation → Ad unit → Add Instance.En-34.jpg

2. After filling in the relevant information, click Save.En-35.jpg

  • Ad Netwrok: Select AdMob.

  • Instance Name: You can define the name of your ad unit yourself, we suggest you name it: Placement ID_Ad Network Name_ Country_Floor Price. (E.g: 6539_AdMob_USA_40)

  • Unit IDYou can enter the AdMob backend, enter the Ad units in the left navigation bar, find the AdMob Unit ID on the right side of the interface, and paste it into the OpenMediation platform.En-36.jpg


AdMob Test Mode

It’s important to enable test ads so that you can click on ads without charging Google advertisers. If you click on too many ads in non-test mode, your account may be reported for violating AdMob’s Invalid traffic policy.
Learn more, AdMob test ads for Android and AdMob test ads for iOS.

Configure the following AdMob test Unit ID on the OpenMediation platform.

  • AdMob Unit IDEn-37.jpg

Android-AdMob Unit ID for Test

Ad format AdMob Unit ID for Test
Rewarded Video ca-app-pub-3940256099942544/5224354917
Interstitial ca-app-pub-3940256099942544/1033173712
Native Advanced ca-app-pub-3940256099942544/2247696110
Banner ca-app-pub-3940256099942544/6300978111


iOS-AdMob Unit ID for Test

Ad format AdMob Unit ID for Test
Rewarded Video ca-app-pub-3940256099942544/1712485313
Interstitial ca-app-pub-3940256099942544/4411468910
Native Advanced ca-app-pub-3940256099942544/3986624511
Banner ca-app-pub-3940256099942544/2934735716


Add the AdMob SDK&Adapter to Your Build


1.  Add the AdMob SDK

  • Add the following in your application-level build.gradle file inside dependencies section.
implementation ''


2. Add AdMob Adapter

    OpenMediation supports both Gradle dependencies and Manual download mechanisms.

       Gradle dependencies

  • Add the following in your application-level build.gradle file inside dependencies section.
implementation 'com.openmediation.adapters:admob:+'

       Manual download

  • Download the AdMob Adapter from here.
  • Add the AdMob Adapter to Your Project.

3. Update Android Manifest.xml

  • Configure Android Manifest.xml
android:value="admob_app_id" />


4. For Proguard Users Only
If you are using ProGuard with the AdMob adapter, you must add the following code to your ProGuard configuration (Android Studio: or Eclipse: proguard-project.txt):

-keep public class** {
 public *;
-keep public class** {
 public *;



OpenMediation supports both Cocoapods and Manualdownload mechanisms.


To Integrate the AdMob SDK with Cocoapods, enter the following line in your podfile and you are good to go!

pod 'Google-Mobile-Ads-SDK'

Manual Download

1. Download the AdMob framework

  • you can find the lastest AdMob SDK here.

2. Add the AdMob frameworks to your Project

Update Info.plist

If you have added AdMob SDK in your project, you need to update your application Info.plist file, add string value your AdMob application ID GADApplicationIdentifier key. You can find your app ID in the AdMob interface.


Please Note: Be sure to use your actual AdMob app ID instead of the ID listed above .

Importrant! This step is required since the Google Mobile Ads SDK version 7.42.0. Failure to add this Info.plist entry will result in a crash with the following message: "The Google Mobile Ads SDK was initialized incorrectly."

You are now all set to deliver AdMob Ads within your application.

Was this article helpful?
8 out of 12 found this helpful



Article is closed for comments.