Documentation

Support

Integrate PubMatic with LevelPlay

Learn how to integrate PubMatic with your LevelPlay-enabled Android app
Read time 2 minutesLast updated 6 days ago

Learn how to integrate PubMatic with your LevelPlay-enabled Android app. It walks through account setup, app configuration, ad unit creation, adapter installation, and network activation in LevelPlay. Follow the steps below to ensure your ad placements are correctly configured for PubMatic bidding.

Topic

Description

Create a PubMatic accountSet up your PubMatic publisher profile
Create an app and ad unitsAdd your app and configure monetization
Activate PubMatic in LevelPlayConnect PubMatic to your project
Add the PubMatic adapter (android)Add the Android Pubmatic SDK adapter
Handle user consentGDPR and GPP behavior

Prerequisites

Make sure you can access the PubMatic monetization dashboard and your LevelPlay project in the Unity Dashboard. You must also have an Android app ready to configure.

Create a PubMatic account

To create a PubMatic account, reach out to PubMatic at sdk-support@pubmatic.com. The PubMatic team will assist you with account creation and approval for Pubmatic inventory through LevelPlay. Once your account is approved, sign in to the Pubmatic monetization dashboard. If you already created ad units in your Pubmatic monetization dashboard, skip to Activate PubMatic in LevelPlay.

Create an app and ad units

Add your Android app and create ad units in the Pubmatic dashboard before you can activate PubMatic in LevelPlay.

Add your app

  1. Log in to the Pubmatic monetization dashboard.
  2. Select Set Up > Apps.
  3. Click Add App.
  4. In the General section:
    • Select Android as the platform.
    • Enter a valid Google Play URL.
    • Review or edit the auto-generated app name.
  5. In the Configuration section:
    • Select your Integration Path.
    • Set Sub-Integration Path to "LevelPlay - SDK Bidding".
    • Complete any additional fields that appear.
  6. In the Advanced section:
    • Ensure the currency is set to USD.
  7. Click Add App.

Create ad units

  1. Select Set Up > Ad Units.
  2. Select your app. The ad units associated with the app will display.
  3. Click Create Ad Unit.
  4. Enter an ad unit ID.
  5. Select an ad format and complete the required fields.
  6. Click Save or Save & Create Another.
PubMatic generates an ad unit ID, which appears in the Ad Units section.

Manage bidder partners

  1. Select Set Up > Bidder Partners.
  2. Select your app.
  3. Use the toggles to enable or disable ad units for each bidder partner.

Activate PubMatic in your LevelPlay setup

After configuring your app and ad units in PubMatic, activate Pubmatic inside LevelPlay to link your credentials to your placements.
  1. In LevelPlay, open Monetize > Setup > SDK Networks.
  2. Select Pubmatic from the list of available networks.
  3. Enter the required parameters, click Activate, then Save.
  4. Select Pubmatic again from your configured networks and click Setup.
  5. Enter the following values from your PubMatic dashboard:
    • Publisher ID: found in your PubMatic publisher account
    • Profile ID: found on the Apps page
    • Ad Unit ID: found in the Ad Units section
  6. Set the status to Active and click Save.
Pubmatic now appears as active for mediation on your LevelPlay Setup dashboard.

Add the PubMatic adapter (Android)

To complete the integration, add the PubMatic SDK and the LevelPlay PubMatic adapter to your Android project.

Add the PubMatic Maven repository

Add the following repository to the allprojects > repositories block of your project-level build.gradle file:
allprojects { repositories { maven { url "https://repo.pubmatic.com/artifactory/public-repos" } }}

Add the adapter dependencies

Add these dependencies to your app module’s build.gradle file (the adapter name will be finalized by the LevelPlay team):
dependencies { implementation 'com.unity3d.ads-mediation:pubmatic-adapter:1.0.0' implementation 'com.pubmatic.sdk:openwrap:4.10.+'}

Handle user consent

  • Pubmatic SDK retrieves GDPR values using the IAB TCF 2.0 standard through shared preferences or user defaults, ideally via a CMP SDK.
  • Pubmatic also supports the IAB GPP standard for retrieving GPP consent signals.
  • Refer to the Pubmatic SDK Advanced Topics for information on passing consent values.