mediation-adapters | AdMob Adaptor iOS SDK Integration Guide

Introduction

The InMobi adapter for AdMob allows publishers to integrate with InMobi via the AdMob mediation platform. The adapter functions as a bridge between the AdMob mediation SDK and the InMobi SDK. For more information about AdMob Mediation platform, see AdMob Help pages.

Requirements

Creating a Google Account

You need to have a Google account to sign up for an AdMob account. If you already have a Google or an AdMob account, you can skip this step. This step is a one time action.

Ad Formats Supported

You can get the following ad types from InMobi via AdMob mediations. You can click the link below to view the integration instructions for the respective ad types.

Integrating with Banner Ads

To specify an adapter using the AdMob web user interface, complete the following steps:

  1. Log on to your AdMob account.
  2. Click the Monetize tab, and then select Monetize new app.

  3. Register your iOS app.

  4. Select Banner as ad format for monetization.

  5. Once you create the ad unit, AdMob will generate an “Ad Unit ID”. Please make a note of this ID.
  6. Under Mediation, select Ad Sources.
  7. Select New Ad Network, and then add InMobi as ad source.

  8. In the Network Settings page for InMobi, insert your InMobi account and placement id (Only for SDK > 5.0.0).

  9. AdMob can pull publisher reporting data automatically for automatic eCPM optimization. For this, the publisher must provide their InMobi reporting API credentials in the AdMob UI.
    To enable Ad Network optimization, select the Automatically pull the eCPM value from this ad Network check box, and then enter your InMobi login credentials.
    Please contact InMobi support to generate the secret key required for this feature.

Integrating with Interstitial Ads

To specify an adapter using the AdMob web user interface, complete the following steps:

  1. Log on to your AdMob account.
  2. Click the Monetize tab, and then select Monetize new app.

  3. Register your iOS app.

  4. Select Interstitial as ad format for monetization.

  5. Once you create the ad unit, AdMob will generate an “Ad Unit ID”. Please make a note of this ID.
  6. Under Mediation, select Ad Sources.
  7. Select New Ad Network, and then add InMobi as ad source.

  8. In the Network Settings page for InMobi, insert your InMobi account and placement id (Only for SDK > 5.0.0).

  9. AdMob can pull publisher reporting data automatically for automatic eCPM optimization. For this, the publisher must provide their InMobi reporting API credentials in the AdMob UI.
    To enable Ad Network optimization, select the Automatically pull the eCPM value from this ad network check box, and then enter your InMobi login credentials.
    Please contact InMobi support to generate the secret key required for this feature.

Integrating with Rewarded Interstitial Ads

To specify an adapter using the AdMob web user interface, complete the following steps:

  1. Log on to your AdMob account.
  2. Click the Monetize tab, and then select Monetize new app.

  3. Register your iOS app.

  4. Select Rewarded Interstitial as ad format for monetization.

  5. Publisher can opt to take a reward either from third party ad network like InMobi or from AdMob itself. If the publisher opts for “Use third-party ad network settings” then AdMob will pass back the reward set up by them on InMobi dashboard, otherwise publisher will be asked to set up a reward on AdMob.
  6. While setting up the rewards on InMobi dashboard, please make sure the reward value is in the form of Integer.
  7. Once you create the ad unit, Admob will generate an “Ad Unit ID”. Please make a note of this ID.
  8. Under Mediation, select Ad Sources.
  9. Select New Ad Network, and add then InMobi as ad source:

  10. In the Network Settings page for InMobi, insert your InMobi account and placement id (Only for SDK > 5.0.0).

  11. AdMob can pull publisher reporting data automatically for automatic eCPM optimization. For this, the publisher must provide their InMobi reporting API credentials in the AdMob UI.
    To enable Ad Network optimization, select the Automatically pull the eCPM value from this ad network check box, and then enter your InMobi login credentials.
    Please contact InMobi support to generate the secret key required for this feature.

Integrating with Native Ads

Native Mediation is only supported for AdMob Native Advanced functionality. To specify an adapter using the AdMob web user interface, complete the following steps:

  1. Log on to your AdMob account.
  2. Click the Monetize tab, and then select Monetize new app.

  3. Register your iOS app.

  4. Select Native as ad format for monetization, and then switch to Native Ads Advanced.

  5. Name the ad unit for native.

  6. Under Mediation, select Ad Sources.
  7. Select New Ad Network, and then add InMobi as ad source.

  8. In the Network Settings page for InMobi, insert your InMobi account and placement id (Only for SDK > 5.0.0).

  9. AdMob can pull publisher reporting data automatically for automatic eCPM optimization. For this, the publisher must provide their InMobi reporting API credentials in the AdMob UI.
    To enable Ad Network optimization, select the Automatically pull the eCPM value from this ad network check box, and then enter your InMobi login credentials.
    Please contact InMobi support to generate the secret key required for this feature.

Note: When integrating InMobi via AdMob, you can keep in mind the following points:

  • While creating native placements on InMobi dashboard, please make sure the key names are not changed.
  • InMobi supports only App Install ads and NO content ads. Publisher need to be careful while requesting ads from InMobi via AdMob. Please reach out to your Partner Manager to enable this setting.
  • InMobi Adapter doesn’t honor shouldRequestMultipleImages flag of AdMob SDK. So adapter doesn’t support multiple images.
  • InMobi Adapter doesn’t honor getImageOrientation/preferredImageOrientation flag of AdMob SDK.
  • Refer to Demographic Section on how to pass the extra parameters in the form of dictionary.

Integrating with the InMobi SDK

  1. Add the InMobi adapter bundle (.a library and .h class) into your Xcode project along with the InMobi SDK.
  2. Add the following frameworks and other linker flags associated with the InMobi SDK:

    i. AdSupport.framework

    ii. AudioToolbox.framework

    iii. AVFoundation.framework

    iv. CoreLocation.framework

    v. CoreTelephony.framework

    vi. EventKit.framework

    vii. EventKitUI.framework

    viii. MediaPlayer.framework

    ix. MessageUI.framework

    x. Security.framework

    xi. Social.framework

    xii. StoreKit.framework

    xiii. SystemConfiguration.framework

    xiv. UIKit.framework

    xv. SafariServices.framework

    xvi. libsqlite3.0.dylib

    xvii. libc++.dylib

    xviii. libz.tbd

    Add -ObjC to the Other Linker Flags to load all the classes when using Categories.

  3. Enable InMobi in the ad Network mediation UI.
  4. Make ad requests using the AdMob SDK. However, use the mediation ID for placement, instead of the publisher ID.
Note: InMobi only supports fixed-size ad units. Smart banners are not supported by InMobi. As such, requests for smart banners will not be sent to the InMobi network, resulting in a difference of request counts.

To integrate with InMobi, please create an ad unit of fixed size.

Providing Location and Demographics Data

Location can be passed using the following method under GADInMobiExtras.h.

- (void)setLocation:(CLLocation*)location;
		

All non-context specific parameters can be passed to InMobi for richer ad targeting. Please ensure that you pass on the values for the fields which you collect, and have user consent to share this data. Class "GADInMobiExtras" provides methods to set demographic information about the user. InMobi supports the following parameters:

Method Name Value Description

setAgeGroup

kIMSDKAgeGroupBelow18

kIMSDKAgeGroupBetween18 And20

kIMSDKAgeGroupBetween21And24

kIMSDKAgeGroupBetween25And34

kIMSDKAgeGroupBetween35And54,

kIMSDKAgeGroupAbove55

The age group of the user

setHouseholdIncome

kIMSDKHouseholdIncomeBelow5kUSD

kIMSDKHouseholdIncomeBetweek5kAnd10kUSD,

kIMSDKHouseholdIncomeBetween10kAnd15kUSD,

kIMSDKHouseholdIncomeBetween15kAnd20kUSD,

kIMSDKHouseholdIncomeBetween20kAnd25kUSD,

kIMSDKHouseholdIncomeBetween25kAnd50kUSD,

kIMSDKHouseholdIncomeBetween50kAnd75kUSD

kIMSDKHouseholdIncomeBetween75kAnd100kUSD

kIMSDKHouseholdIncomeBetween100kAnd150kUSD,

kIMSDKHouseholdIncomeAbove150kUSD

The house hold income of user in US Dollars

setEducationType

kIMSDKEducationHighSchoolOrLess

kIMSDKEducationCollegeOrGraduate

kIMSDKEducationPostGraduateOrAbove

The education level

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

setEthnicityType

kIMSDKEthnicityHispanic,

kIMSDKEthnicityCaucasian,

kIMSDKEthnicityAsian,

kIMSDKEthnicityAfricanAmerican,

kIMSDKEthnicityOther

Ethnic group of the user

  • Asian
  • Hispanic
  • Africanamerican
  • Caucasian
  • Other

setIncome

Integer

Approximate annual household income (in US Dollars)

setAge

Integer

The age of the user

setInterests

Any String

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

setPostalCode

Any String

The postal code (usually a 5 digit number)

setAreaCode

Any String

The area code (part of the telephone number)

setLanguage

Any String

The native language of the user (if known)

setNationality

Any String

Nationality of the user

setLoginId

Any String

Indicates a login ID in the publisher’s domain

setSessionId

Any String

Indicates a session ID in the publisher’s domain

setLocationWithCityStateCountry

Any String

Sets location with City, State, Country being passed

setKeywords


Any String

Keywords to be passed in the ad request

More Information

Please download the sample code from here.

The latest documentation and code samples for the AdMob SDK are available here.