# AdMob/Google Bidding

| | Mediation Support | Ad Formats Supported |
|--|--|--|
| **AdMob** | {::nomarkdown}❌ Bidding <br>✅ Waterfall{:/} | {::nomarkdown}<ul><li>Adaptive Banner</li><li>Banner</li><li>Rewarded Video</li><li>Interstitial</li><li>Rewarded Interstitial</li></ul>{:/}|
| **Google Bidding** | {::nomarkdown}✅ Bidding <br>❌ Waterfall {:/} | {::nomarkdown}<ul><li>Adaptive Banner</li><li>Banner</li><li>Rewarded Video</li><li>Interstitial</li></ul>{:/}|


## Set up AdMob/Google Bidding app and ad unit

### Create an AdMob account
1. Create an account with [AdMob](https://admob.google.com/home/){:target="_blank"}.
2. Once your account is verified, log in to [AdMob dashboard](https://apps.admob.com/){:target="_blank"}.

### Add an app and ad unit to your AdMob dashboard
App(s) must be set up on your AdMob account before connecting the partner to Chartboost Mediation because each ad placement is specific to an app.

1. Navigate to **Apps** > **Add App**.
2. Complete the process to add an iOS or Android app.
3. Once your app is created, create Ad Units to the app. Navigate to **Apps** > Select the app > **Add ad unit**.
4. Select an **ad format**.
5. Enter an **Ad unit name**.
6. For **Partner bidding**, 
	- Do not check this to enable **waterfall** with Chartboost Mediation.
	- Check this to enable **bidding** with Chartboost Mediation.
7. Click **Create ad unit.**
8. You will need the **Ad unit name** and **Ad unit ID** to connect AdMob/Google Bidding into Chartboost Mediation.

For more information, see Google AdMob’s documentation on [adding an app](https://support.google.com/admob/answer/9989980?visit_id=638272180220979026-3050063431&rd=1){:target="_blank"} and [ad units](https://support.google.com/admob/answer/6128738?hl=en&ref_topic=7384409&sjid=7820604746817592116-NA){:target="_blank"}.

## Retrieve your AdMob/Google Bidding credentials
There are 5 pieces of data from your AdMob/Google Bidding account required to connect with Chartboost Mediation.

To simplify the process, you can **Sign in with Google** using the AdMob App ID and your AdMob account credentials. For this option, skip to the next section once you’ve obtained your AdMob App ID.

- To find the **AdMob App ID** and/or **Google Bidding App ID**, go to **Apps** > **Select the app** > **App Settings**.
- To generate the **API Key**, 
	1. Create a new project on the [Google API Console page](https://console.developers.google.com/apis/credentials){:target="_blank"}.
	2. Navigate to **Credentials**.
	3. Click **+Create Credentials** > **API Key**.
- To find the **Client ID** and **Client Secret**,
	1. Make sure you have a project created on the [Google API Console](https://console.developers.google.com/apis/credentials){:target="_blank"} page.
	2. Navigate to **Credentials**.
	3. Click **+Create Credentials** > **OAuth client ID**.
	4. Select **Web application** type.
	5. **Name** the OAuth client.
	6. Click **Create**.
	7. Your **Client ID** and **Client Secret** should automatically display. If not, navigate to **Credentials** and click on the client name under **OAuth 2.0 Client IDs**.
- To get the Refresh Token, go to the OAuth 2.0 Playground page.
	1. In **Step 1: Select & authorize APIs**, select **AdSense Management API v2** then select `https://www.googleapis.com/auth/adsense.readonly`.
	2. At the bottom of Step 1, enter `https://www.googleapis.com/auth/admob.report` into the provided field and click **Authorize APIs**.
	3. Verify your Google AdMob login account if prompted.
	4. In **Step 2: Exchange authorization code for tokens**, the authorization code field should be auto-populated.
	5. Click **Exchange authorization code for tokens**. Your **Refresh Token** will be provided. Please note the token expiration time.

For additional information on API authentication and OAuth2 credentials, please refer to [Google Ad Manager Authentication](https://developers.google.com/ad-manager/api/authentication#webapp){:target="_blank"} documentation.


## Set up Google Bidding network and placement with Chartboost Mediation

### Connect Google bidding to Chartboost Mediation
1. Log in to your [Chartboost platform](https://platform.chartboost.com/){:target="_blank"}.
2. Navigate to **Mediation** > **Networks**.
3. Under Bidding Networks, select **Google Bidding** from the **Select network** dropdown.
4. Enter the **AdMob App ID**, API Key, Client ID, Client Secret, and Refresh Token.
5. Click the + button next to the AdMob button.
6. Alternatively, you can Sign in with Google using the AdMob App ID and your AdMob account credentials.

### Add the Google bidding placement to Chartboost Mediation
1. Navigate to **Mediation** > **Placements**.
2. Select the app from the top-right dropdown.
3. Below your metrics graph, select the placement.
4. Under **Bidding** section, click **Select network**.
5. Select **Google Bidding** as the Network.
6. Enter the **Ad Unit ID**.
7. Click the **+** icon next to **Google Bidding**.


## Set up AdMob waterfall network and placement with Chartboost Mediation

### Connect AdMob waterfall to Chartboost Mediation
1. Log in to your [Chartboost platform](https://platform.chartboost.com/){:target="_blank"}.
2. Navigate to **Mediation** > **Networks**.
3. Under Mediation Networks, select **AdMob** from the **Select network** dropdown.
4. Enter the **Google bidding App ID**, **API Key**, **Client ID**, **Client Secret**, and **Refresh Token**.
5. Click the **+** button next to the **AdMob** button.
6. Alternatively, you can **Sign in with Google** using the **AdMob App ID** and your **AdMob account credentials**.

### Add the AdMob placement to Chartboost Mediation
1. Log into [Charboost platform](https://platform.chartboost.com/){:target="_blank"} and navigate to **Mediation** > **Placements**.
2. Select the app from the top-right dropdown.
3. Below your metrics graph, click **New Placement**.
4. Select an **Ad Format**.
5. Set an **Ad Placement Name**.
6. Under **Waterfall** > **Ad Groups**, click **Add**.
7. Select from existing or **Create a new Ad Group**.
8. Set a **Name** and **Country List**.
9. Click **Add New Line Item**.
10. Select **AdMob** as the Network.
11. Add the **AdMob Ad unit name** to the **Name** field.
12. Add the **AdMob Ad unit ID** to the **Partner Placement Name**.
13. Set a **CPM**.
14. Make sure **Add to Ad Group** is selected.
15. Click **Create New**.
16. A new line item will be added. Make sure the line item’s **Add to Ad Group** checkbox is selected and click **+Add Selected Items** on the bottom right.


## Integrate the AdMob/Google Bidding adapter
Refer to our [Chartboost Mediation Adapter Integration Manager](https://adapters.chartboost.com/){:target="_blank"} for the latest supported adapter version and integration instructions.