Mediation Network Guides

Follow
AdMob Facebook UnityAds AppLovin Vungle Tapjoy AdColony Chartboost MoPub

In this part, we will instruct you step-by-step on how to set Admob as an Ad Network on the AdTiming Mediation platform.

Before You Start

  • Make sure you have correctly integrated AdTiming's Native, Interstitial, Rewarded Video or Banner  Ads in your application.
  • To serve AdMob's Rewarded Video, you must have Google Play Services version 9.0.2+ integrated in your app.

Important! We HAVE UPDATED AdTiming SDK to 6.0.  With the Android SDK Version 5.5.0 and above, you need to download Not Only the SDK of mediation networks  you choose to work with But Also the adapters for those ad networks. Be sure to follow this Guide to mediation AdMob‘s Ads.

Step 1. Create an AdMob Account

To access AdMob's ad inventory through AdTiming's Mediation platform, you must create an account with AdMob. You can do so here.

Please Note: 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 Unit in AdMob

Next, you must add your app and set up Ad Unit in your AdMob account.

1. Add Your App

  • Log into your AdMob account. On your dashboard, click the 'Apps' button.
  • A modal will appear where you can either search for your app, add your app manually or simply select an existing app to monetize.

 

Please Note: You will need a unique Admob application per platform (iOS + Android).

 

2. Add Ad Units

  • Select a specific app and click on 'Ad units' -> Click on 'ADD AD UNIT'.
  • Select Interstitial, Rewarded Video or Banner as your ad unit format and enter the relevant details.admob1.png

 

  • When you complete all these options, click 'Done' and you will get your App ID and Ad Unit ID.admob2.png

Step 3. Retrieve AdMob Parameters

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

1. App ID

App ID is the unique ID assigned to your app on AdMob’s dashboard. 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. 

admob3.png

 

2. Ad Unit ID

Ad Unit ID is the unique ID assigned to your app’s ad unit on Admob’s dashboard. 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.

admob4.png

 

3. API Key

API Key is a unique identifier for your AdMob account, which allows AdTiming Mediation Platform to import performance data from your AdMob account to use in reporting data.

  • 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.admob5.png

 

  • Go to 'APIs & Services' -> Select 'Credentials' admob6.png

 

  • Select 'Create credentials' and click on 'API Key' in the drop-down.admob7.png

 

  • Then an API Key will be automatically created and presented for you.admob8.png

 

Once you obtain the information of AdMob App ID and Ad Unit ID, you're supposed to configure AdMob’s Parameters in your AdTiming 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 AdTiming Mediation platform.

Step 4. Configure AdMob’s Parameters into AdTiming Account

  • Log in to your AdTiming account and go to 'Monetize' -> 'Mediation' -> 'Ad Network Setup'
  • Select AdMob from the list of Available Ad Networks and click on the 'Edit' icon.mceclip4.png

 

  • Insert the App ID and Ad Unit ID in the field of AdMob Unit ID.mceclip0.png

 

  • Save your ad unit and Click 'Grant Access' It will return two possible responses: 'Success!' or 'Granted Failed!’. Double check your integration and the information you entered above if Granted Failed. Click 'Grant Access' again until you see 'Success!’.

 

    • Turn on the switch of  'Mediation Status' status for AdMob. You will then see Report API Status of AdMob as is 'Working'.
mceclip0.png

Step 5. Add the AdMob SDK&Adapter to Your Build

Android

1.  Add the Admob SDK

  • Add the following in your project-level build.gradle file.
...
 allprojects {
   repositories {
       ...

       jcenter()
       maven {
           url "https://maven.google.com"
       }
    }
 }
  • Add the following in your application-level build.gradle file.
dependencies {
    ...
    implementation 'com.google.android.gms:play-services-ads:17.2.1'
 }

 

2. Add the Admob Adapter

    AdTiming supports both Gradle dependencies and Manual download mechanisms.

       Gradle dependencies

  • Add the following in your project-level build.gradle file.
...
 allprojects {
   repositories {
        ...

        jcenter()
        maven {
            url "https://dl.adtiming.com/android-sdk"
        }
   }
 }
  • Add the following in your application-level build.gradle file.
implementation 'com.adtiming.adapters:admob:3.1.2@aar'

       Manual download

  • Download the Admob Adapter from here.
  • Add the AdMob Adapter to Your Project
    Add the AdmobAdapter-x.x.x.aar to the libs folder in your Android Project.

mceclip0.png

  • Make sure you add the following to your Gradle build file under the dependencies section:
implementation (name:'AdmobAdapter-3.1.2', ext:'aar')

 

 

3. Update Android Manifest.xml

  • Configure Android Manifest.xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="admob_app_id" />

 

4. For Proguard Users Only
If you are using ProGuard with the AdMob adapter, you must add the following code to your ProGuard configuration (Android Studio: proguard-rules.pro or Eclipse: proguard-project.txt):

-keep public class com.google.android.gms.** {
 public *;
}
-keep public class com.google.ads.** {
 public *;
}

 

5. Tips for using AdMob Mediation Solutions 

  • If you use instances with AdTiming mediation, please remove the AdMob code form your project.
  • If you use Instances with AdMob for waterfall management, please make sure only one initialization method was called for a specific user.
if(useAdtiming){
     AdtAds.init(this, adtimingKey, new Callback() {
             @Override
             public void onSuccess() {

          }

          @Override
          public void onError(String message) {

          }
     });
   }else{
      MobileAds.initialize(context, admobKey);
   }

 

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

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.