ドキュメント

サポート

LevelPlay SDK - React Native

Google Bidding integration

Integrate Google Bidding as a mediation network in your React Native app using the LevelPlay SDK.
読み終わるまでの所要時間 6 分最終更新 3日前

This guide instructs you step-by-step on how to set Google as a bidder network on LevelPlay Mediation. For the Google bidder, the auto-setup tool is available to use when you complete step 1 below. The auto-setup tool will create an app and bidder placement and retrieve placement details from AdMob—so you don't need to switch between the LevelPlay and AdMob platforms. Alternatively, you can complete the whole setup manually.

Prerequisites

Make sure you have correctly integrated LevelPlay's Rewarded Video, Interstitial, or Banner ads into your application.

Create an AdMob Account

  1. To access Google's ad inventory through LevelPlay Mediation, you need to create an account with AdMob.
  2. It's recommended to adjust the time zone of your AdMob account to UTC to align with the LevelPlay platform. This will ensure accurate reporting. Learn more.
重要
When you have completed step 1, you can skip to step 3 and use the auto bidder setup tool to get up and running with Google bidding on LevelPlay. If you'd rather continue with a manual setup, continue with step 2.

Create an Application and Ad Unit in AdMob

Add Your App

  1. Log into your AdMob account. On your dashboard, select Apps then Add app.
  2. A modal will appear where you can either search for your app, add your app manually or simply select an existing app to monetize.
You'll need a unique AdMob application per platform (iOS + Android), just like your LevelPlay account.
  1. Select interstitial, rewarded video, or banners as your ad unit format and enter the relevant details.

Configure Ad Unit Settings

Interstitial
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform
Step 2 - Interstitial ad unit configuration
Rewarded Video
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform
Step 2 - Rewarded video ad unit configuration
Step 2 - Partner bidding checkbox
Banners
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform
Interstitial
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform
Rewarded Video
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform
Banners
  • Ad unit name: Name the ad unit intuitively so it will be easy to recognize as the ad unit you'll be serving
  • Partner bidding: Check the box to indicate that you are using bidding on another mediation platform

Activate Google in Your LevelPlay Network Setup Module

Auto-setup

  1. Log into your LevelPlay account and go to the LevelPlay side nav bar > Setup > Networks
  2. Select Google AdMob from the list of available ad networks
Step 3 - LevelPlay Setup Networks
  1. Select Login with Google and log in with your approved Google account
  2. If you're already logged in, select reset login (a new log-in is required)
Step 3 - Login with Google
  1. When you're logged in, toggle on Google auto-setup bidder
Step 3 - Google auto-setup bidder toggle
  1. Now go to the Instances page, and select the app where you'd like to run interstitial, rewarded, or banner ads from Google.
Step 3 - Instances page selection
  1. Select the Add Bidder button to automatically create new apps and bidding placements on the AdMob platform, and import the Ad Unit ID. If there is an App ID already attached to the app, you will be able to use the auto-setup tool if there is at least 1 placement without the Ad unit ID parameter value. In this case, a new bidding placement will be created.
  2. Select Save to approve and accept all configurations. If you close the module without saving, the assets will be created on the AdMob platform without importing the data onto the LevelPlay platform.
Step 3 - Add Bidder button
重要
The status of Google bidder instances will be the same as the status of the LevelPlay Ads bidder, by ad format. For example, if you're not using the LevelPlay Ads bidder for rewarded videos, it will not be automatically activated for the Google network.

Manual Setup

  1. Log into your LevelPlay account and go to the LevelPlay side nav bar > Setup > Networks
  2. Select Google AdMob from the list of available ad networks
There are a few pieces of data from your AdMob account that need to be inserted into your LevelPlay Network Setup Module in order for AdMob to work correctly with the LevelPlay SDK:

Parameter

Description

App IDThe unique ID assigned to your app on AdMob's dashboard.
Ad Unit IDThe unique ID assigned to your app's ad unit on AdMob's dashboard.
Client IDThis is the unique identifier that specifies the relationship between your account and the ad unit.
Client SecretThe secret key that pairs with the Client ID
Refresh TokenThis is the refresh token the client application already received.
When you obtain this information, you must configure AdMob's Parameters into LevelPlay.

App ID

To retrieve your App ID, go to Apps tab on the left side bar on AdMob's platform and select App Settings. You will then see the application's settings, as well as the App ID.

Ad Unit ID

To retrieve your Ad Unit ID, go to Apps tab on the left side bar on AdMob's platform and select Ad Units. You will then see the application's ad units, as well as the Ad Unit ID.

Client ID and Client Secret

  1. To retrieve your Client ID & Client Secret, go to Google's API Manager.
  2. Select the API Project drop-down at the upper-left of the page, select Create a project or select the project you already created for this app. If you are creating a new project for this purpose, provide a Project name, Billing account, and Location in the dialog box that appears and select Create.
  3. In the left sidebar, select Credentials, then select the OAuth consent screen tab. Provide a Product Name and select Save.
  4. In the left sidebar, select Dashboard, and go to Enable APIs and services.
  5. Next, enable the AdMob API.
  6. Select the Credentials tab in the left sidebar. Select the Create Credentials drop-down and select OAuth client ID
  7. Select Web application, and provide a name for your app. In the fields below, you must enter
    https://developers.google.com/oauthplayground
    for at least one Authorized redirect URI. For example:
    • Authorized JavaScript origins:
      https://YOUR_NAMESPACE
      (Optional)
    • Authorized redirect URI:
      https://developers.google.com/oauthplayground
  8. Select Create, and you will be presented with your Client ID and Client Secret.

Refresh Token

  1. To retrieve your Refresh Token, go to the OAuth 2.0 Playground.
  2. Select the settings icon in the upper right corner. Uncheck the box labeled Force approval prompt and check Use your own OAuth credentials. Input your Client ID and Client Secret.
  3. Next, in Step 1: Select & Authorize APIS, enter
    https://www.googleapis.com/auth/admob.report
    and select Authorize APIs.
  4. Grant your project access to your AdMob data
  5. You should then receive the Authorization Code from Step 1 and will be able to select the Exchange authorization code for tokens button. Then you will get a Refresh token as well as an Access Token.
When you have all of these parameters, enter them into the Google AdMob account settings on LevelPlay
  1. Next, go to the Instances page. Select the app at the top of the page for which you'd like to run LevelPlay's Mediation with Google bidding.
  2. Select Google from the setup list of Ad Networks and select the Define icon. Then insert the App ID and Ad Unit ID under Interstitial, Rewarded Video or Banner Settings.

Add the AdMob Adapter to Your Build

Continue your integration using native adapters for Android and iOS.

Verify Your Ad Network Integration

The LevelPlay SDK provides an easy way to verify that your mediation integration was completed successfully. To verify your LevelPlay and additional Ad Networks' integration, follow this document. You are now all set to deliver AdMob Ads within your application!

Next steps

To leverage additional mediation ad networks, integrate the adapters and follow our integration guides.