AdMob

The purpose of this article is to guide publishers who want to use the DT FairBid SDK to load and display ads from AdMob via DT FairBid mediation.

This is a six-step process:

  1. Create or login 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

Supported Formats

AdMob currently supports the following ad formats:

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

Refer to AdMob to learn about any additional formats they may now support.

Step 1: Create or Login to your AdMob Account

To access AdMob’s ad inventory through DT‘s Mediation platform, create or login to your AdMob account. For details on creating an account, click here.

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

Step 2: Creating an Application and AdZone in AdMob

  1. Sign in to the AdMob account you created, here
  2. Click Apps on the dashboard
    df208d0-Screen_Shot_2020-02-20_at_14.11.36.png
  1. Either search for your app, add your app manually or select an existing app to monetize

Adding a New App

Follow the steps below to begin the process of adding a new app:

  1. Click on Add App

  1. You are asked if your app has already been published in the Google Play or App Store

If you answer Yes

  1. Enter the App Name, Developer Name or App ID
  1. Click Search to find your app and follow the instructions on screen.

If you answer No the following window opens:

  1. Enter a name for the new app

  2. Select the Platform for your app

  3. Click Add
    You app has now been added to the selected platform.

Linking your App

You must link your app with Google Play Store.

  1. Go to App Settings >> App Info
  1. Click the Edit icon
  1. Click Link Your App with Google Play

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

The action cannot be undone, so make sure you link the correct app.

  1. Click Link App

You app has now been linked to Google Play. The next step is to add Ad Units to your app.

  1. From the AdMob homepage click Apps and select your app
  2. In the App Overview window, click Add Ad Unit
  1. Select the Ad Format you want

Banner

  1. On the Create Ad Unit window, under Banner, click Select
  1. Enter a name for the Ad Unit
  2. Click Advanced Settings and enter the details, as required
  3. Click Create Ad Unit 

Interstitial

  1. On the Create Ad Unit window, under Interstitial, click Select
  1. Enter a name for the Ad Unit

  2. Click Advanced Settings and enter the details, as required
    Ad Type: Leave the two boxes checked as DT supports text, image, video and rich media in interstitials.

  3. Click Create Ad Unit 

Rewarded

  1. On the Create Ad Unit window, under Rewarded, click Select
  1. Enter a name for the Ad Unit
    Ad unit name: DT recommends naming the ad unit so it can 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 are displayed, it is recommended to save these for use later in the process

  1. Click Done

Step 3: Activate 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 of your apps using AdMob as a mediated network.

Screen_Shot_2022-08-01_at_10.43.53.png

Important

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

You can either login with your Google account or enter the credentials manually.

Logging-In with Google

  1. Click Sign in with Google
  2. The Sign in with Google window opens.
  3. Select the account details with which you want to login and confirm access rights.

Your account details are displayed in the AdMob Account Credentials.

Click the uncover icon to view the Account ID and Refresh Token that is valid for all of your apps.

Screen_Shot_2022-08-01_at_10.43.53.png

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

Screen_Shot_2022-08-01_at_10.51.29.png

If you enter an email which is not recognised in the system, you receive the following error:

Important

If you make changes to the credentials, the changes affect all of the apps using AdMob.

Step 4: Retrieve the Parameters from the AdMob

There are a several parameters from your AdMob account you must insert 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.

Set out below are explanations of how to obtain these parameters.

AdMob Parameter Description DT App / Placement
Account ID The identifier of the account associated with the Ad Unit. Both
Client ID This is the unique identifier detailing 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

Alternatively, watch and listen to the video below to find out how to obtain the required parameters:

Retrieving the Account ID/Unit ID

To retrieve your Account ID/Ad Unit ID:

  1. Go to the Apps tab on the left side bar on AdMob’s platform
  1. Click Ad Units

The application’s ad units and Ad Unit ID are displayed.

Retrieving the Client ID and Client Secret

Follow these steps to obtain the Client ID and Client Secret.

Enabling AdMob API

Follow these steps to enable the AdMob API.

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

To retrieve the Refresh Token:

  1. Go to OAuth 2.0 Playground, here
  1. On the top left-hand corner, click Step 1 Select & Authorize APIs
  1. Enter the following two URLs in the Input your own Scopes field (separated by a space)

          

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

Your Refresh Token and Access Token are displayed. These are used for access to OAuth protected resources.

Now that you have obtained the required parameters, you can complete the configuration of AdMob in your DT Account. 

Step 5: Insert 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
  2. Select your app from the App Management window

  3. On the App Management page, click Mediated Networks

  4. Select AdMob from the list

  5. The AdMob Mediation configuration window opens
    Screen_Shot_2023-02-19_at_16.38.08.png

  6. Enter the parameters you obtained earlier, together with your AdMob App ID. The App ID can be found in the AdMob dashboard. It will look something like this:

    ca-app-pub-3940256099942544~1458002511

You can check AdMob documentation for additional information. 

  1. Click Save
  2. To complete the set up, you must associate the network instance that you just created to the relevant Placement set up on the DT Console. For a detailed guide click here. 

Step 6: Adding the AdMob SDK to your Integration

To add the AdMob SDK go to the Supported Networks page and follow the guide while selecting the Configuration for AdMob.

Important

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

Simply replace the “[ADMOB_APP_ID]” with the APP ID value you obtain here.

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

Info.plist

In your app's Info.plist file,

  1. add a GADApplicationIdentifier key with a string value of your AdMob app ID.

You can find your App ID in the AdMob UI. For more information, click here.

  1. add a GADIsAdManagerApp key with a boolean value set to YES.
XML
<key>GADIsAdManagerApp</key>
<true/>

For more information, click here

This is specific to iOS configurations. 

Back to Top ⇧