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:
- Create or login to your AdMob Account
- Create an application and AdZone within AdMob
- Activate AdMob in your DT Setup
- Retrieve the parameters from the AdMob
- Insert the AdMob parameters into the DT Console
- 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
- Sign in to the AdMob account you created, here
- Click Apps on the dashboard
Adding a New App
Follow the steps below to begin the process of adding a new app:
If you answer Yes
- Click Search to find your app and follow the instructions on screen.
If you answer No the following window opens:
-
Enter a name for the new app
-
Select the Platform for your app
-
Click Add
You app has now been added to the selected platform.
Linking your App
You must link your app with Google Play Store.
The action cannot be undone, so make sure you link the correct app.
You app has now been linked to Google Play. The next step is to add Ad Units to your app.
- From the AdMob homepage click Apps and select your app
- In the App Overview window, click Add Ad Unit
Banner
- Enter a name for the Ad Unit
- Click Advanced Settings and enter the details, as required
- Click Create Ad Unit
Interstitial
-
Enter a name for the Ad Unit
-
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. -
Click Create Ad Unit
Rewarded
-
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. -
Click Advanced Settings and enter the details, as required
-
Click Create Ad Unit
-
Your App ID and Ad Unit ID are displayed, it is recommended to save these for use later in the process
- 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.
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
- Click Sign in with Google
- The Sign in with Google window opens.
- 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.
If you want to switch the option and enter the credentials manually, click Revoke Access and enter the credentials manually into the relevant fields.
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:
- 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.
- Go to the Google APIs Library
The AdMob API is now enabled.
Retrieving the Refresh Token
To retrieve the Refresh Token:
- Go to OAuth 2.0 Playground, here
- Enter the following two URLs in the Input your own Scopes field (separated by a space)
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.
- Sign-in to your DT account
- Select your app from the App Management window
- On the App Management page, click Mediated Networks
- Select AdMob from the list
-
The AdMob Mediation configuration window opens
-
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.
- Click Save
- 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.
<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,
- 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.
- add a GADIsAdManagerApp key with a boolean value set to YES.
<key>GADIsAdManagerApp</key>
<true/>
For more information, click here
This is specific to iOS configurations.