This topic provides step-by-step instructions for integrating and monetizing the InMobi SDK with AdMob.:
Before you begin setting up InMobi as an ad source on the AdMob dashboard, you must 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!
The latest version of InMobi SDK supports iOS 9 or higher. Also, this version of iOS SDK requires XCode 12 or higher.
Log on 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).
Select a new ad network and add InMobi as an ad source.
In the Network Settings page for InMobi, insert your InMobi account ID and placement ID.
Follow the instructions in Step 1: Set up configurations in InMobi UI.
Follow the instructions in Step 3: Import the InMobi SDK and adapter.
To ensure AdMob SDK relays the ad request to InMobi for testing, you can do the following.
Once you have completed the above steps, you can test and relay the requests to InMobi SDK for ad loads.
Enable debug logs by adding following to didFinishLaunchingWithOptions method within the app delegate's .m file, as shown below:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
//Initialize InMobi SDK with your account ID
[IMSdk initWithAccountID:@"Insert InMobi account ID here"];
//Set log level to Debug
[IMSdk setLogLevel:kIMSDKLogLevelDebug];
// Do your stuff.
return YES;
}
You can also use the feedback available on the diagnostics tab in the InMobi dashboard (for ad unit and ad request).
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, then select NO under the “Location Permission” section for your property on the InMobi Customer Interface.
Otherwise: Location can be passed using 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 kIMSDKAgeGroupBetween18And24 kIMSDKAgeGroupBetween25And29 kIMSDKAgeGroupBetween30And34 kIMSDKAgeGroupBetween35And44 kIMSDKAgeGroupBetween45And54 kIMSDKAgeGroupBetween55And65 kIMSDKAgeGroupAbove65 |
The age group of the user |
setEducationType |
kIMSDKEducationHighSchoolOrLess kIMSDKEducationCollegeOrGraduate kIMSDKEducationPostGraduateOrAbove |
The education level
|
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) |
setLocationWithCityStateCountry |
Any String |
Sets location with City, State, Country being passed |
setKeywords |
Any String |
Keywords to be passed in the ad request |
Here is a sample for setting up the InMobi SDK Demographic params. Publishers are requested to set the values of params as they want:
InMobiSdk.setAreaCode("080");
InMobiSdk.setEducation(Education.HIGH_SCHOOL_OR_LESS);
InMobiSdk.setGender(Gender.MALE);
InMobiSdk.setAge(23);
InMobiSdk.setPostalCode("122009");
InMobiSdk.setLogLevel(LogLevel.DEBUG);
InMobiSdk.setLocationWithCityStateCountry("blore", "kar", "india");
InMobiSdk.setLanguage("ENG");
InMobiSdk.setInterests("dance");
InMobiSdk.setYearOfBirth(1980);
For publishers running any audio or video media as the main content, we recommend listening to interruptions by observing AVAudioSessionInterruptionnotification posted by AVAudioSession. This will help preempt any content interruptions and help address user experience issues upfront. For more information, see these Apple documents: Article 1, Article 2.
Follow the additional instructions below about GDPR settings on your Google dashboard for higher monetization results. The following configuration applies to traffic from European Economic Area and publishers using AdMob/GAM CMP for GDPR consent purposes. Google CMP provides two ways of adding ad partners on their AdMob/GAM platform:
InMobi is not part of ‘Commonly used ad partners’ by default, and you must add it manually by selecting Custom ad partners.
Follow the instructions below to enable InMobi under Custom ad partners on your Google dashboard.
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.