AdMob

This article guides publishers who want to use the DT FairBid SDK to load and display ads.

AdMob currently supports the following ad types:

  • Banner
  • Interstitial
  • Rewarded (with Google Play Services version 9.0.2+ integrated into your app)
  • MREC (available from FairBid SDK version 3.33.1)

To integrate AdMob as an Ad Network in DT FairBid:

  1. Create or log in to your AdMob Account.
  2. Create an application and AdZone within AdMob.
  3. Activate AdMob in your DT Setup.
  4. Retrieve the parameters from the AdMob.
  5. Insert the AdMob parameters into the DT Console.
  6. Add the AdMob SDK to your integration.

Step 1: Creating or Logging in to your AdMob Account

To access AdMob’s ad inventory through DT‘s Mediation platform, create an account or log in to your AdMob account.

To work with AdMob, you must have a valid AdSense Management and AdWords account. If you do not already have one, you can create one during the sign-up process and connect it to your Google account. 

Step 2: Creating an App and AdZone in AdMob

  1. Sign in to your AdMob account and click Apps on the dashboard.

  1. Either Search for your app, add your app manually or select an existing app to monetize.
  2. Click Add App.

  1. Click YES if your app has already been published in the Google Play or App Store or NO if it has not.

  1. If you answer YES, click Search to find your app, enter the App Name, Developer Name, or App ID, and follow the instructions on the screen.

  1. If you answer NO, the following window appears:

  1. In the App Name field, enter a name for the new app.

  2. Select the Platform for your app and click Add.
    Your app is has now added to the selected Platform.

Linking your App

You must link your app with the Google Play Store.

  1. Navigate to Apps/App Settings/App Info and click Edit.

  1. Click Link Your App with Google Play.


  1. Search for your app in the search window and click Select.


Note

The action cannot be undone, so ensure that you link the right app.

  1. Click Link App.


Adding Ad Units

  1. From the AdMob homepage, click Apps and select your app.
  2. In the App Overview window, click Add Ad Units.

  1. Select one of the following Ad Formats.

  1. From the Create Ad Unit window, under Banner, click Select.

 

  1. In the Ad unit name field, enter a name for the Ad Unit.
  2. Click Advanced Settings and enter the details as required.
  3. Click Create Ad Unit. 

Interstitial

  1. From the Create Ad Unit window, under Interstitial, click Select.

  1. In the Ad unit name field, enter a name for the Ad Unit.

  2. Click Advanced Settings and enter the details as required.

    Tip

    Ensure you select both Ad Type checkboxes, as DT supports text, image, video and rich media in interstitials.

  1. Click Create Ad Unit

Rewarded

  1. On the Create Ad Unit window, under Rewarded, click Select.

  1. Enter a name for the Ad Unit.

    Tip

    DT recommends naming the Ad unit to be easily recognized as the ad unit you are serving AdMob Rewarded ads through the DT FairBid Mediation platform.

  2. Click Advanced Settings and enter the details as required.

  3. Click Create Ad Unit.

  4. Your App ID and Ad Unit ID appear.
    DT recommends that you save these for use later in the process.

  1. Click Done.

Step 3: Activating AdMob in your DT Network Setup Module

Sign in to your Google account when setting up AdMob on the DT FairBid SDK Networks Setup.

With AdMob, the Account Credentials (Account ID, Refresh Token and Client ID) are retrieved automatically and remain the same for all your apps using AdMob as a mediated network.

Important

You must ensure that any Adblockers are deactivated to use this feature.

You can log in with your Google account or manually enter the credentials.

Logging in with Google

  1. Click Sign in with Google.
  2. Select the account details with which you want to log in and confirm access rights.
    Your account details are displayed in the AdMob Account Credentials.
  3. Click the uncover icon to view the Account ID and Refresh Token, valid for all your apps.

 

  1. If you want to switch the option and enter the credentials manually, click Revoke Access and enter the credentials manually into the relevant fields.

 

  1. If you enter an email which is not recognized in the system, the following error appears:

 

Important

If you change the credentials, the changes affect all AdMob apps.

Step 4: Retrieving the Parameters from the AdMob

You must insert several parameters from your AdMob account into the DT Console. Once you obtain this information, configure AdMob’s Parameters in your DT Account. By adding the above information correctly, you can take full advantage of AdMob’s ad inventory and reporting data on the DT FairBid Mediation platform.

Below are explanations of how to obtain these parameters.

AdMob Parameter Description DT App / Placement

AccountID

The identifier of the account associated with the Ad Unit. Both
ClientID This unique identifier details the relationship between your account and the ad unit. Both
Client Secret A unique identifier detailing the relationship between your account and the ad unit. Both
Refresh Token The refresh token the client application already received. Both

Retrieving the Account ID/Unit ID

To retrieve your Account ID/Ad Unit ID:

From the AdMob dashboard, click Apps and then click Ad Units.
The application Ad units and Ad Unit ID appear.

Retrieving the Client ID and Client Secret

The following steps describe how to obtain the Client ID and Client Secret.

Enabling AdMob API

The following steps describe how to enable the AdMob API.

  1. Navigate to the Google APIs Library

  1. In the search field, enter AdMob API and click AdMob API.

  1. Click Enable to use the AdMob API.

The AdMob API is now enabled.

Retrieving the Refresh Token

The following steps describe how to retrieve the Refresh Token:

  1. Navigate to OAuth 2.0 Playground and click Step 1: Select & Authorize APIs.

  1. In the Input your own Scopes field, enter the following URLs separated by a space.

  1. Click Authorize APIs.
  2. Click Step 2: Exchange authorization code for tokens

The Refresh token and Access token appear, which enables you to access OAuth-protected resources.
Once you have obtained the required parameters, you can complete the AdMob configuration in your DT Account. 

Step 5: Inserting the AdMob Parameters into the DT Console

To enter the parameters obtained from AdMob and insert them into the DT Console, follow these steps.

  1. Sign in to your DT account on the DT console.
  2. Select your app from the App Management window

  1. From the App Management window, click Mediated Networks and select AdMob.

  1. The AdMob Mediation configuration window appears.

  1. Enter the parameters you obtained earlier and your AdMob App ID, which appears on the AdMob dashboard. The example appears below.
    For additional information, see Find an app ID or ad unit ID.

    ca-app-pub-3940256099942544~1458002511
  1. Click Save.
  2. To complete the setup, you must associate the network instance you created with the relevant Placement setup on the DT Console. 

Step 6: Adding the AdMob SDK to your Integration

  1. To integrate the AdMob SDK, follow the instructions on the Supported Networks page.
  2. Select one of the following tabs for additional information when integrating AdMob with Android and iOS.
Android iOS

Important

As of V17.0.0 (Adapter version 4.3.1 onwards), for Android implementations, the AdMob SDK requires publishers to add their AdMob App ID to the app AndroidManifest as a child of the tag:

Replace the ADMOB_APP_ID with the AdMob App ID.

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

Back to Top ⇧