Google Ad Manager Integration Guide

Follow these instructions to set Google Ad Manager live as an ad network on the Unity LevelPlay mediation.

Before you start Make sure you have correctly integrated ironSource SDKĀ  interstitial, rewarded video orĀ banner mediation in your application.

Google Ad Manager ads are served using the AdMob SDK.


Step 1. Create a Google Ad Manager account

  1. To access Google Ad Manager ad inventory through Unity LevelPlay’s mediation, create an Ad Manager account.
  2. In order to monetize with Google ad manager, Google AdSense account need to be created
  3. Connect your AdSense account to your Ad Manager account

Step 2. Create Inventory in Google Ad Manager

  1. Google AdManager guide can be found here
  2. Orders:
    1. Add at least one order
    2. Connect your AdSense as an Advertiser to the order
  3. Line Items
    1. Inside the desired order, Add a Line Item for each ad unit you are looking to monetize (Int / RV / BN / NTV BN)
    2. Select video Line item
    3. Line item type = Ad exchange
  4. Apps
    1. The application should be added automatically from your Admob account
    2. If not, create a new application (Inventory > Apps > Add app)
  5. Ad unit
    1. Add ad unit for each price point

Step 3. Activate Google Ad Manager in your ironSource account

Sign in to your Google account when setting up Ad Manager on the ironSource SDK Networks Setup page. This will ensure that all of the necessary parameters to run Ad Manager’s interstitials, rewarded videos, and banners will be automatically retrieved.

  1. In your Google Ad Manager account, obtain the following information:Ā 
App ID The unique ID assigned to your app on the Ad Manager dashboard
API Key The unique identifier for your Ad Manager account. This allows the Unity LevelPlay Mediation to import performance data from your Ad Manager account to use in reporting and optimization
Ad Unit ID The unique ID assigned to your app’s ad unit on the Ad Manager dashboard
Client ID The unique identifier that specifies the relationship between your account and the ad unit
Client Secret The secret key that pairs with the Client ID
Refresh Token The refresh token the client application already received

Ā  Ā  Ā 2. Configure Google Ad Manager’s parameters in your ironSource account.

  • Log in to your ironSource account and go to ‘Monetize‘ āž£ ‘SETUP‘ āž£ ‘SDK Networks‘.

  • Select Google Ad Manager from the list of Available Networks and enter the Ad Manager’s API Key, Client ID, Client Secret, and Refresh Token; or click the Login with Google option.

Ā  Ā  Ā Login with Google

Ā  Click Save. Ad Manager will be enabled and listed in the Available Ad Networks table.

  • Select the app on which you’d like to run Unity LevelPlay’s Mediation with Ad Manager.
  • Select Ad Manager from the setup list of ad networks and click on the tool Define button. Insert the App ID and Ad Unit IDĀ  under interstitial, rewarded video or banner settings.

Ā  Ā  Ā  Ā  Ā  Ā 

  • 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. If you do not see Verified, double check your integration and the information you entered, then click Retry until you see Verified.

Step 4. Add the Admob Adapter to Your Build

Adobe Air – Add theĀ AdMob Adapter to Your Build

Download theĀ AdMob ANE
Add theĀ AdMob Adobe Native Extension to your build. You can find the latestĀ Admob ANEĀ here.

Download the Google Play Services
Add the Google Play Services Extension to your build. You can find supported version for Android 18.3.0 hereĀ and iOS 7.42.2 here.

[iOS only] Download the required frameworks
Add the Google App Measurements, Google Utilities and nanopb extensions to your build.Ā 

[Android only] Download Google Play Services Base
Add the Google Play Services Base extension to your build. You can find the supoerted version for 18.3.0 here.

Add theĀ all relevantĀ ANEs to your project

  1. To addĀ an ANE, simply add it to your project by clicking on projectĀ propertiesĀ āž£Ā FlexĀ buildĀ pathĀ āž£Ā NativeĀ ExtensionĀ Tab. Click onĀ add ANEĀ and choose file you have downloaded in the previous step.
  2. Make sure you mark the ANE to be packaged into your application onĀ Flex Build PackagingĀ āž£Ā Native ExtensionĀ Tab, selectĀ the checkbox of ‘package‘.
  3. Make sure to add the following extensions:
    Android:
    <extensionID>com.ironsource.adobeair.admob</extensionID>
    <extensionID>com.ironsource.adobeair.google</extensionID>
    <extensionID>com.ironsource.adobeair.googlebase</extensionID>
    <extensionID>com.ironsource.adobeair.androidx</extensionID>
    

    iOS:

    <extensionID>com.ironsource.adobeair.google</extensionID>
    <extensionID>com.ironsource.adobeair.googleappmeasurement</extensionID>
    <extensionID>com.ironsource.adobeair.googlemobileads</extensionID>
    <extensionID>com.ironsource.adobeair.googlegutilities</extensionID>
    <extensionID>com.ironsource.adobeair.nanopb</extensionID>
    <extensionID>com.ironsource.adobeair.promisesobjc</extensionID>
    <extensionID>com.ironsource.adobeair.googleusermessagingplatform</extensionID>
    
    
    
  4. For Android Only
    Update AndroidManifest.xmlĀ Manifest Activities
    Add the following activities inside theĀ <application>Ā tag on yourĀ manifest:
            <meta-data
                android:name="com.google.android.gms.version"
                android:value="@integer/google_play_services_version" />
            <activity
                android:name="com.google.android.gms.ads.AdActivity"
                android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
                android:theme="@android:style/Theme.Translucent" />
    

    As of V17.0.0, AdMob’s SDK requires publishersĀ to add their AdMob App ID to the app’s AndroidManifest as a child of theĀ <application></application>Ā tag:

    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
               android:value="[ADMOB_APP_ID]"/>
    

    Replace the “[ADMOB_APP_ID]” with the APP ID value you retrieved in step 3.
    Not doing so results in crashes originated with AdMob’s SDK. For more information please refer toĀ AdMob’s guide.

  5. ForĀ iOSĀ Only
    As of V7.42.0Ā (Adapter version 4.3.3 onwards), AdMob’s SDK requires publishersĀ to add their AdMob App ID to the app’sĀ plistĀ as describedĀ here.
    Alternatively, you can make this changeĀ programmatically
    <key>GADApplicationIdentifier</key>
    <string>[APP_ID]</string>

    Replace the ā€œGADApplicationIdentifierā€ value with the APP ID value you retrieve in step 3.
    Not doing so results in crashes originated with AdMob’s SDK.Ā For more information please refer toĀ AdMob’s guide.

Note:

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 SDK and additional Ad Networks’ integration, follow this .

Done!
You are now all set to deliver Google Ad Manager within your application!


What’s Next?

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