AdMob

Introduction

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

This is a six-step process:

  1. Download the AdMob SDK
  2. Create an AdMob Account
  3. Create an application and AdZone within AdMob
  4. Activate AdMob in your Fyber Setup]
  5. Configure AdMob within Fyber
  6. Add the AdMob Adapter to your build

Supported Formats

AdMob currently supports the following ad formats:

  • Banner
  • Interstitial
  • Rewarded (with Google Play Services version 9.0.2+ integrated in your app)

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

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

Note

This is specific to iOS configurations. 

Downloading the AdMob SDK

To download the AdMob SDK and view the configuration settings, click here

Creating an AdMob Account

To access AdMob’s ad inventory through Fyber‘s Mediation platform, create an account with AdMob. 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. 

Creating an Application and AdZone in AdMob

  1. Sign in to your AdMob account
  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

Note

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 Fyber 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: Fyber recommends naming the ad unit so it can be easily recognized as the ad unit you are serving AdMob Banners through the 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.

Activating AdMob in your Fyber Network Setup Module

Sign in to your Google account when setting up AdMob on the 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

  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.

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.

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

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

The parameters required depend on whether you are configuring the network at the App Level or Placement Level in the Fyber Console.

AdMob Parameter Description Fyber 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:

Obtaining the Account 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.

Obtaining 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.

Obtaining 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 Fyber Account. 

Configuring AdMob with Fyber

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

  1. Sign-in to your Fyber account.
  2. Select your app from the App Management window.

  1. On the App Management page, click Mediated Networks.
  1. Select AdMob from the list.

The AdMob Mediation window opens:

  1. Enter the parameters you obtained earlier, together with your Bundle ID and App ID.
  1. For each ad format, enter the Instance Name and your Ad Unit ID.

Instance name should be distinguishable in case you have multiple AdMob Instances.

Note

If you are configuring the mediated network at app level, fewer credentials may be required.

  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 Fyber dashboard. For a detailed guide click here

Adding the AdMob Adapter to your Build

To download the AdMob Adapter to your build and view the configuration settings, click here.

You have now successfully integrated AdMob into the console.

AdMob Reporting API

The AdMob Reporting API allows you to obtain information about your AdMob account.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request