AdMob Mediation Integration Guide

This guide instructs you step-by-step on how to set Admob live as an Ad Network on the ironSource Mediation platform.

Before You Start

  • Make sure you have correctly integrated ironSource’s InterstitialRewarded Video or Banner Mediation in your application.
  • To serve Admob’s Rewarded Video, you must have Google Play Services version 9.0.2+ integrated in your app. 

Step 1. Create an AdMob Account

  1. To access AdMob’s ad inventory through ironSource‘s Mediation platform, you must create an account with AdMob. You can do so here.
    Note: AdMob requires you to have a valid AdSense and AdWords account. If you don’t have either of these accounts, you can create them during the sign-up process and connect them to your Google account.

Step 2. Create an Application and Ad Zone in Admob

Next, you must add your app and set up Ad Zones in your Admob account.

  1. Add Your App

    1. Log into your Admob account. On your dashboard, click the ‘Apps’ button. 
    2. A modal will appear where you can either search for your app, add your app manually or simply select an existing app to monetize.
      add-your-app
      Note: You will need a unique Admob application per platform (iOS + Android), just the same as in your ironSource account.
    3. Select Interstitial, Rewarded Video  or Banners as your ad unit format and enter the relevant details.
      create-ad-unit

      1. For Interstitial:
        Ad Type: You can leave the two boxes checked as we support text, image, video and rich media in interstitials.
        Ad unit name: we recommend naming the ad unit intuitively so it will be easy to recognize as the ad unit you’ll be serving Admob Interstitials through the ironSource Mediation platform.
        create-ad-unit-interstitial
      2. For Rewarded Video:
        Ad unit name: we recommend naming the ad unit intuitively so it will be easy to recognize as the ad unit you’ll be serving Admob’s Rewarded Video through the ironSource Mediation platform.
        create-ad-unit-rv
      3. For Banners:
        Ad Unit Name: we recommend naming the ad unit intuitively so it will be easy to recognize as the ad unit you’ll be serving Admob Banners through the ironSource Mediation platform
        Automatic refresh: Select the “Do not refresh” option. (Reminder – you can control the refresh rate on the mediation platform)
        create-ad-unit-banner
    4.  Now you will get your App ID and Ad Unit ID, before you exit we recommend saving these for later use. You can click ‘Done‘.
      app-id-ad-unit-id

Step 3. Activate AdMob in Your ironSource Network Setup Module

Serving Admob’s ads through the ironSource Mediation platform has never been this easy. Sign in to your Google account when setting up Admob on the ironSource SDK Networks Setup and we’ll retrieve all the necessary parameters to run Admob’s Interstitials, Rewarded Video and Banners for you!

admob-1

There are a few pieces of data from your AdMob account which need to be inserted into your ironSource Network Setup Module in order for AdMob to work correctly in connection with ironSource:

App ID
The unique ID assigned to your app on Admob’s dashboard.
API Key
This is a unique identifier for your Admob account, which allows ironSource Mediation Platform to import performance data from your Admob account to use in reporting & optimization.
Ad Unit ID
The unique ID assigned to your app’s ad unit on Admob’s dashboard.
Client ID
This is the unique identifier that specifies the relationship between your account and the ad unit.
Client Secret
This is the unique identifier that specifies the relationship between your account and the ad unit.
Refresh Token
This is the refresh token the client application already received.


Once you obtain this information, you must configure Admob’s Parameters in your ironSource Account. By adding the above information correctly, you will be able to take full advantage of Admob’s ad inventory and reporting data on the ironSource Mediation platform.

  1. App ID
    To retrieve your App ID, go to ‘Apps’ tab on the left side bar on Admob’s platform and click on ‘App Settings’ .  You will then see the application’s settings, as well as the App ID.
    app-id
  2. Ad Unit ID
    To retrieve your Ad Unit ID, go to ‘Apps’ tab on the left side bar on Admob’s platform and click on ‘Ad Units’. You will then see the application’s ad units, as well as the Ad Unit ID.
    ad-unit-id
  3. API KEY

    1. To retrieve your API KEY, you must first create a designated project for your app on the Google Cloud Console. If this is your first time creating a project, you will be asked to agree to the Terms of Service. Provide a name for the project and click ‘Create‘. It may take a few minutes to set set up your new project.
      create-new-project-admob
    2. Go to Getting Started, where you should select “Enable APIs and get credentials like keys:
      admob-api
    3. Next, go to ‘Credentials‘ in the left sidebar.
      admob-credetials
    4. Select ‘Create credentials‘ and click on ‘API Key‘ in the drop-down.
      api-key-2
    5. This will automatically create an API Key for you and present itironsource-platform-api-key
    6. If you need to retrieve it later on, you will find the API Key under API Keys in the Credentials section:api-keys
  4. Client ID & Client Secret
    1. To retrieve your Client ID & Client Secret, go to Google’s API Manager.
    2. Click on the API Project drop-down at the upper-left of the page, select ‘Create a project’ or select the project you already created for this app:1admob
      In the case you are creating a new project for this purpose,  provide a Project name in the dialog box that appears and click ‘Create’.admob-1
    3. In the left sidebar, select ‘Credentials’, then select the ‘OAuth consent screen’ tab. On this page, provide a Product Name. Click Save:admob-2
    4. In the left sidebar, select ‘Dashboard‘, and go to ‘ENABLE APIS AND SERVICES‘:2admob
    5. Next, ‘Enable‘ the AdSense APIadmob-3
    6. Select the Credentials tab in the left sidebar. Click the ‘Create Credentials’ drop-down and select ‘OAuth client ID’3admob
    7. Select Web application, and provide a name for your app.In the fields below, you must enter https://developers.google.com/oauthplayground for at least one Authorized redirect URI. For example:
      • Authorized JavaScript origins: https://YOUR_NAMESPACE (Optional)
      • Authorized redirect URI: https://developers.google.com/oauthplayground admob-6
    8. Click ‘Create‘ and you will be presented with your ‘Client ID‘ and ‘Client Secret‘:
      Supersonic Mediation AM Client ID Secret
  5. Refresh Token

    1. To retrieve your Refresh Token, go to the OAuth 2.0 Playground.
    2. Click the settings icon in the upper right corner. Uncheck the box labeled Force approval prompt and check Use your own OAuth credentials. Input your Client ID and Client Secret:
      Admob 18
    3. Next, in Step 1: Select & Authorize APIS, select ‘https://www.googleapis.com/auth/adsense.readonly’ and click ‘Authorize APIs‘:
      Admob 21
    4. Grant your project access to your AdSense data:
    5. You should then receive the Authorization Code from Step 1 and will be able to click the Exchange authorization code for tokens button. Then you will get a Refresh token as well as an Access Token:
      Admob 22

 

Configure Admob’s Parameters into ironSource Account

  • Once you have all of these parameters, log in to your ironSource account and go to ‘Monetize‘ ➣ ‘SETUP‘ ➣ ‘SDK Networks‘.admob-7
  • Select Admob from the list of Available Ad Networks and enter the Admob ‘API Key‘, ‘Client ID‘, ‘Client Secret‘ and ‘Refresh Token‘. If you’d like to activate this network in specific countries, you can select these from the dropdown.
    admob-1
  • Click ‘Save‘. Admob will then be enabled in the Available Ad Networks table.admob-2
  • Next, select the app on which you’d like to run ironSource’s Mediation with Admob.admob-3
  • Select Admob from the Setup list of Ad Networks and click on the tool Define icon. Then insert the App ID and Ad Unit ID‘  under Interstitial, Rewarded Video or Banner Settings.admob-4admob-5
  • Set your ad unit of choice status to Active. You will then see Admob as Active for Mediation on your Setup Dashboard.
    admob-6
  • Verify your integration with the Reporting API; this column will check your integration through the Reporting API and return three possible responses: Verified, Failed and No Response. Double check your integration and the information you entered above; then click ‘Retry‘ until you see ‘Verified’.

 

Step 4. Add the Admob Adapter to Your Build

iOS

ironSource supports both Cocoapods and Manual download mechanisms.

Cocoapods

To integrate the AdMob SDK with Cocoapods, enter the following line in your podfile and you’re good to go!

pod 'IronSourceAdMobAdapter','4.3.0.0'

Manual Download

  1. Download the AdMob Adapter
    Add the AdMob Adapter to your build. You can find the latest AdMob Adapter here.
    Important! The AdMob Adapter also contains the AdMob SDK. You DON’T need to add the AdMob SDK directly.
  2. Add the AdMob frameworks to your Project
    After you download the Adapter, drop the Adapter framework into your Xcode Project, i.e. drop ISAdmobAdapter.framework  into your Xcode project.
  3. Open TargetBuild SettingsArchitectures and confirm that your Xcode Project uses Base SDK version 6.0 or greater and that it does not use armv6 architecture.
  4. Linker Flags:
    Add two separate linker flags to TargetBuild SettingsLinkingOther Linker Flags:
    ObjC

Verify Your Ad Network Integration

The ironSource SDK provides an easy way to verify that your mediation integration was completed successfully. To verify your ironSource and additional Ad Networks’ integration, follow this document.

Done!
You are now all set to deliver Admob Ads within your application!


What’s Next?

To leverage additional mediation ad networks, integrate the adapters and follow our integration guides.