Add AdMob as an Ad Source

This topic details how to prepare Google AdMob as an Advertising Source for the Unity Arbitration platform.

Create an AdMob account and add together your app

To create an AdMob account and then add your app, complete the following steps.

  1. Create an AdMob account: https://apps.admob.com/signup.

  2. Sign in to your AdMob business relationship. In the left card, select Apps.

  3. Select Add together App, and then make full out the requested information.

    Note: AdMob requires ane unique app per platform.

  4. Select Add App.

Create ad units in the AdMob dashboard

Of import: The AdMob network allows up to three calls for the same advertizement asking. This means that you can gear up no more than three line items of the same advertising format within the aforementioned waterfall. For case, one waterfall tin only accept three Interstitial advertising line items with AdMob equally an Ad Source.

  1. When yous successfully add your app in your AdMob account, you are prompted to create an advertising unit.

    Alternatively, from the AdMob app overview page, in the left carte du jour, select Apps > Advert Units.

  2. Select an ad format.

  3. Name the advertizement unit equally contextually every bit possible so you can easily recognize it in the Unity Mediation platform (for example, mopub_interstitial), and then complete the rest of the fields and select CREATE Advertizing Unit.

When you create the Ad Unit, the App ID and Advert Unit of measurement ID are also generated. Save these IDs to use when you lot create waterfall line items for AdMob (or refer to them in the AdMob dashboard: in the left bill of fare, select Apps > Advertising Units).

Recall your AdMob credentials

When you lot fix your AdMob Ad Source in the Unity Dashboard for the showtime time in your project, you need to enter your AdMob publisher account credentials for the Customer ID, Client Underground ID, and Publisher ID. To do this, use one of the post-obit methods:

  • Sign in past using OAuth

  • Manually retrieve your AdMob credentials

Sign in by using OAuth

To sign in with your AdMob publisher account and pull in all the required credentials automatically into the Unity Dashboard, consummate the post-obit steps:

  1. On the Unity Monetization Dashboard, select Arbitration > Advertising Sources.

  2. Find Google AdMob in the list of ad networks, and then select Set up.

  3. Select Sign in with Google. A Google OAuth sign-in dialog opens so you can ostend what unity3d.com (the Unity Dashboard) tin can admission from your AdMob publisher account.

  4. Select a Google publisher account to sign in with.

  5. Ensure that unity3d.com (the Unity Dashboard) can access everything (this includes enabling the Run into your AdMob data checkbox), and and then select Proceed.

When you return to the AdMob Ad Source setup page in the Unity Dashboard, if the OAuth sign-in is successful, and then setup is complete.

However, if the OAuth sign-in fails, and then this could be due to whatever of the following reasons:

  • You did not enable the Run into your AdMob data checkbox when y'all signed in with your AdMob account.

  • Yous do non have a AdMob publisher account associated with the account that yous are using to sign in.

  • You have multiple AdMob publisher accounts.

    To troubleshoot this, manually enter the credentials of the AdMob publisher account that you want to utilize in the Unity Dashboard AdMob Advert Source setup.

  • There is a technical error with your AdMob publisher business relationship.

    To troubleshoot this, get to your selected AdMob publisher business relationship to verify the credentials, and then try again to manually enter the credentials into the AdMob Ad Source setup.

Manually think your AdMob credentials

  1. Go to Google's APIs & Services manager: https://console.cloud.google.com/apis.

  2. In the menu, select Select a project > New Project.

  3. Enter a project name, select the appropriate billing account and location, and so select Create.

  4. On the APIs & Services page, in the left menu, select Credentials, and so select OAuth consent screen.

  5. Select the External user type, and so select Create.

  6. Complete the App data section, App domain section, and Developer contact data sections, and so select Save and Continue.

  7. On the APIs & Services page, in the left menu, select Dashboard, and and so select Enable APIs and Services.

  8. In the API Library, enter AdMob API into the search bar to filter for the AdMob API. Select the AdMob API, and then enable information technology.

  9. On the APIs & Services AdMob API page, in the left carte, select Credentials, and so select + Create Credentials > OAuth client ID.

  10. From the dropdown menu, select the Spider web application application blazon.

    • Leave the field blank for the optional URL for the Authorized JavaScript origins field.

    • Optionally, enter your namespace (https://<YOUR_NAMESPACE>).

    • For the Authorized redirect fields, enter https://developers.google.com/oauthplayground.

    Select Create.

    A modal displays with your Client ID and Client Hole-and-corner.

Recall your Refresh Token

To think your Refresh Token, complete the following steps:

  1. Go to the OAuth 2.0 Playground: https://developers.google.com/oauthplayground/.

  2. Select the Gear to expand the OAuth ii.0 Configuration panel.

  3. Ensure that Apply your own OAuth credentials is enabled.

  4. Input your ClientID and Client Hugger-mugger, and then select Close.

  5. In the OAuth 2.0 Playground window, nether Footstep 1: Select & Authorize APIs, enter https://world wide web.googleapis.com/auth/admob.report into the text field, and then select Authorize APIs.

  6. Allow your project admission to your AdMob data.

  7. You are given an authorization code. Select Commutation say-so code for tokens to receive a Refresh Token and Access Token.

Call back your Publisher ID

To retrieve your Publisher ID, consummate the following steps:

  1. From the left card of your AdMob account, select Settings.

  2. Go to Account Information.

    Your Publisher ID is listed on this tab.

Configure the AdMob Advertising Source in the Unity Dashboard

To configure AdMob as a third-party Ad Source in Unity Mediation, complete the following steps.

  1. On the Unity Monetization Dashboard, select Arbitration > Advertising Sources.

  2. Find Google AdMob in the listing of Advertising Sources, and and so select Prepare.

  3. Consummate the fields with the credentials from your AdMob business relationship:

    • Enter the Client ID, Client Secret, Refresh Token, and Publisher ID in the respective fields.

    • Enable the Reporting Access Authorization checkbox.

  4. Select Consummate.

Add the AdMob Adapter to your Unity project

If your game is made with Unity, add the AdMob Adapter to your project:

  1. Open your project in the Unity Editor.

  2. Select Edit > Project Settings > Services > Mediation or Services > Mediation > Configure.

  3. In the Adapter Configuration section, notice the AdMob Adapter and enter the AdMob App ID for each platform.

    Circumspection: If you do not enter the AdMob app IDs before you install the AdMob Adapter, your game build will immediately crash.

    To retrieve your AdMob app IDs, on the AdMob dashboard, in the left menu, select Apps > VIEW ALL APPS. Find your app in the list, copy its app ID for each platform, and then enter them into the respective fields in the Unity Editor.

  4. Select Install.

    Note: Installing the network adapter through the Unity Editor also pulls in the network SDK.