AdMob (Android)

Introduction

This topic provides step-by-step instructions for integrating and monetizing the InMobi SDK with AdMob.

You have access to the following ad types from InMobi via AdMob mediation:

  • Banner
  • Interstitial (Static Interstitial and Full-screen Video Ads)
  • Rewarded Interstitial
  • Native

Before you begin setting up InMobi as an ad source on AdMob dashboard, it’s important that you create an InMobi account, register your app, configure placements and complete the payment information. You can learn more about it here.

If you have completed the above steps, then you are all good to begin setting up InMobi as an ad source on AdMob. Let’s begin!

Note

  • The latest version of InMobi SDK supports iOS 9 or higher. Also, this version of iOS SDK requires XCode 11 or higher.
  • The latest version of InMobi SDK supports Android 4.1 (API level 16) or higher.
  • If you have not integrated with AdMob before, you can refer to AdMob documentation.

Configure InMobi as an Ad Source

Logon to your AdMob account and navigate to the specific ad-unit that you want to monetize via the InMobi SDK. Under mediation, navigate to “ad-sources” (if you have integrated solely with AdMob, the number of ad sources will be one).

  1. Select new ad network and add InMobi as ad source

  2. In the Network Settings page for InMobi, insert your InMobi account ID and placement ID.

  3. Follow the instructions in Step 1: Set up configurations in InMobi UI.

Adding the SDK and Adapter

Follow the instructions in Step 3: Import the InMobi SDK and adapter.

Test the Integration

To ensure AdMob SDK relays the ad request to InMobi for testing, you can do the following.

  1. Set manual Ad network optimization for every network including AdMob. Uncheck the “Ad network optimization” checkbox.
  2. Set manual eCPM floors for all networks keeping the eCPM floor for InMobi higher than other networks, this will ensure that the ad request gets relayed to InMobi for testing. In the example below, InMobi floor is set to $5 and AdMob is set to $0.01.

After performing the abovementioned steps, you can test and relay the requests to InMobi SDK for ad loads.

Enabling Key SDK Logs

You can enable key SDK logs by adding the following line to your Activity where you are integrating the ad units.

Java

InMobiSdk.setLogLevel(LogLevel.DEBUG);

Kotlin

InMobiSdk.setLogLevel(LogLevel.DEBUG)
https://support.inmobi.com/monetize/mediation-guidelines/mopub/android-mopub-guidelines

You can also leverage feedback available on the diagnostics tab on the ad unit and ad request if you have enabled “Test Mode” on the InMobi portal.

Advanced Configurations

Providing Location and Demographics Data

Recommended

If your app collects location from the user, we recommend passing it up, as impressions with location signals have higher revenue potential. InMobi SDK will automatically pass the location signals if available in the app. If you use location in your app but would like to disable passing location signals to InMobi, TURN OFF the “Location Automation” for your property on the InMobi dashboard.

Otherwise: You can pass the location signals in the mediation ad request object by calling the setLocation() API of MediationAdRequest class of the Admob SDK.

InMobi supports passing the following user demographic parameters:

Key Name Value Description

InMobiNetworkKeys.AGE_GROUP

InMobiNetworkValues.ABOVE_55,

InMobiNetworkValues.BELOW_18,

InMobiNetworkValues.BETWEEN_18_AND_20,

InMobiNetworkValues.BETWEEN_25_AND_34,

InMobiNetworkValues.BETWEEN_35_AND_54,

InMobiNetworkValues.BETWEEN_21_AND_24

The age group of the user

InMobiNetworkKeys.EDUCATION

InMobiNetworkValues.EDUCATION_HIGHSCHOOLORLESS,

InMobiNetworkValues.EDUCATION_COLLEGEORGRADUATE,

InMobiNetworkValues.EDUCATION_POSTGRADUATEORABOVE

The education level

  • High school, or less
  • College, or graduate
  • Postgraduate, or above

InMobiNetworkKeys.AGE

Any String

The age of the user

InMobiNetworkKeys.INTERESTS

Any String

Any additional relevant description of the user, or their preferences, separated by commas. Valid acceptable values are mentioned below

InMobiNetworkKeys.POSTAL_CODE

Any String

The postal code (usually a 5 digit number)

InMobiNetworkKeys.AREA_CODE

Any String

The area code (part of the telephone number)

InMobiNetworkKeys.LANGUAGE

Any String

The native language of the user (if known)

InMobiNetworkKeys.CITY

Any String

City

InMobiNetworkKeys.STATE

Any String

State

InMobiNetworkKeys.COUNTRY

Any String

Country

InMobiNetworkKeys.LOGLEVEL

InMobiNetworkValues.LOGLEVEL_NONE,

InMobiNetworkValues.LOGLEVEL_DEBUG,

InMobiNetworkValues.LOGLEVEL_ERROR

Log level for InMobi SDK

On This Page

Last Updated on: 06 Feb, 2025