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:
- Create or log in 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.
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
- Sign in to your AdMob account and click Apps on the dashboard.
- Either Search for your app, add your app manually or select an existing app to monetize.
- Click Add App.
- Click YES if your app has already been published in the Google Play or App Store or NO if it has not.
- 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.
- If you answer NO, the following window appears:
-
In the App Name field, enter a name for the new app.
-
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.
- Navigate to Apps/App Settings/App Info and click Edit.
- Click Link Your App with Google Play.
- 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.
- Click Link App.
Adding Ad Units
- From the AdMob homepage, click Apps and select your app.
- In the App Overview window, click Add Ad Units.
- Select one of the following Ad Formats.
- From the Create Ad Unit window, under Banner, click Select.
- In the Ad unit name field, enter a name for the Ad Unit.
- Click Advanced Settings and enter the details as required.
- Click Create Ad Unit.
Interstitial
- From the Create Ad Unit window, under Interstitial, click Select.
-
In the Ad unit name field, enter a name for the Ad Unit.
-
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.
-
Click Create Ad Unit.
Rewarded
- On the Create Ad Unit window, under Rewarded, click Select.
-
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.
-
Click Advanced Settings and enter the details as required.
-
Click Create Ad Unit.
-
Your App ID and Ad Unit ID appear.
DT recommends that you save these for use later in the process.
- 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
- Click Sign in with Google.
- 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. - Click the uncover icon to view the Account ID and Refresh Token, valid for all 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 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 |
---|---|---|
|
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.
- Navigate to the Google APIs Library
- In the search field, enter AdMob API and click AdMob API.
- 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:
- Navigate to OAuth 2.0 Playground and click Step 1: Select & Authorize APIs.
- In the Input your own Scopes field, enter the following URLs separated by a space.
- Click Authorize APIs.
- 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.
- Sign in to your DT account on the DT console.
- Select your app from the App Management window
- From the App Management window, click Mediated Networks and select AdMob.
-
The AdMob Mediation configuration window appears.
-
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
- Click Save.
- 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
- To integrate the AdMob SDK, follow the instructions on the Supported Networks page.
- Select one of the following tabs for additional information when integrating AdMob with Android and 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.
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Info.plist
- Add a
GADApplicationIdentifier
key with a string value of your AdMob App ID to the appinfo.plist
file. - Add a
GADIsAdManagerApp
key with a boolean value set to YES.
<key>GADIsAdManagerApp</key>
<true/>
For more information, see Update your Info.plist.