Google Ad Manager integration guide

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

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

Google Ad Manager ads are served using the AdMob SDK.

As of AdMob SDK 7.69.0+, AdMob are using XCFramework. If you are using CocoaPods for your AdMob integration, make sure you have CocoaPods Version 1.9.0+.

AdMob Supports Android Operating Systems Version 4.1 (API level 16) and up. The required Gradle Build Tool is 3.5.4.
You can learn about the support for AndroidX here.


Step 1. Create a Google Ad Manager account

To access Google Ad Manager ad inventory through ironSource‘s mediation platform, create an Ad Manager account.

Step 2. Create an application and ad units in Google Ad Manager

Add your app and set up Ad units in your Ad Manager account. You can find all the information you need here.

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 ironSource Mediation Platform 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 unique identifier that specifies the relationship between your account and the ad unit
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 ironSource’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

Unity Integration Manager (Recommended)

Once you’ve completed SDK integration, you can download AdMob Adapter, using the Unity Integration Manager.

In your Unity Development platform, go to ironSource > Integration Manager.

If you already have the latest version of the adapters, the action button will be changed to “Updated”, and will be disabled.

Android (Manual Resolve)

To apply your changes, make sure you use the “Resolve” process. This will download all relevant artifacts, according to your choices. For detailed information see instructions here

Add AdMob App ID

Android
As of V17.0.0 (Adapter version 4.3.1 onwards), 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.

iOS
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.

Android Plugin Manual Integration

  1. Download the Admob Adapter for Android:
    Download AdMob adapter and AdMob SDK (AAR) from here.
  2. Add the Admob files to your Unity project:
    Import the files into Assets/Plugins/Android/.
  3. Add the manifest activities noted in the Android documentation.
  4. Add 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.

iOS Plugin Manual Integration

  1. Download the AdMob iOS Adapter:
    Download AdMob adapter and  AdMob SDK from here.
  2. Add the AdMob adapter to your Unity project:
    Import AdMob adapter file into Assets/Plugins/iOS.
  3. Add the SDK to your Xcode project:
    As Unity3D do not support XCFrameworks, please ad the SDK XCFrameworks directly to your Xcode project.
  4. Add your 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.

Step 5. Update Info.plist (For iOS)

As of AdMob SDK V7.42.0 for iOS (Adapter version 4.3.3 + iOS / Unity ), 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.

Step 6. Additional Steps

Child-directed setting – COPPA

ironSource’s mediation platform lets publishers communicate AdMob Child-directed settings directly to the AdMob network.
This feature is enabled using ironSource SDK 6.14.0+, AdMob Unity Adapter 4.3.12+.

Use the following syntax, to set AdMob setTagForChildDirectedTreatment with the parameter “True”:

 IronSource.Agent.setMetaData("AdMob_TFCD","true");

Use the following syntax, to set AdMob setTagForChildDirectedTreatment with the parameter “False”:

 IronSource.Agent.setMetaData("AdMob_TFCD","false");

To learn more about Child-directed settings Under AdMob network visit here.
here.

ironSource’s mediation platform lets publishers communicate with AdMob network, a Tag For Users under the Age of Consent in Europe (TFUA) request.
This feature is enabled using ironSource SDK 6.14.0+, AdMob Unity Adapter 4.3.12+.

Use the following syntax, to set setTagForUnderAgeOfConsent with “True”:

 IronSource.Agent.setMetaData("AdMob_TFUA","true");

Use the following syntax, to set setTagForUnderAgeOfConsent with “False”:

 IronSource.Agent.setMetaData("AdMob_TFUA","false");

To learn more about Child-directed settings Under AdMob network visit here.
here.

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 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.