Pangle: A global platform dedicated to developer growth.|Integration Docs
Knowledge Center

[Unity]Google Ad Manager Custom Event for Pangle

Please set Google Ad Manager in your app first.

Setup Pangle Platform

Create a Pangle account

Create an application and placements in Pangle

  • Click Apps -> + Add App to create a app for mediation.


  • You will get an app with its app ID.


Create Ad Placement

  • Click Ad Placements -> + Add Ad Placement to create the placement for mediation.
  • Select the ad's type for your app and finish the create.


  • You will get a placement with its placement ID.


Add Pangle to Google Ad Manager


Create Mediation

  • Open Delivery section, click Yield Group -> New Yield GROUP to create a mediation group.
截屏2021-09-10 上午1.15.55.png
  • Select the same ad format which created on Pangle side and Mobile App for Inventory type,
截屏2021-09-10 上午1.16.47.png
  • After select the ad unit you created on Google Ad Manger which you want to embed mediation, click ADD Yield Partner to set with Pangle.
截屏2021-09-10 上午1.18.15.png
  • Enter the yield partner (create a new yield partner for Pangle if you do not have one), then select Custome Event on integration type and platform based on your OS.
截屏2021-09-10 上午1.35.48.png


Set Class Name and Parameter

Set Label, Class Name and Parameter in the mediation setting.

截屏2021-09-10 上午1.20.25.png


Class Name

Copy the contents below to Class Name based on your needs.

Ad Type

Class Name for Android Adapter

Reward Video Ads

com.google.ads.mediation.sample.customevent.adapter.AdmobRewardVideoAdapter

Interstitial Ads

com.google.ads.mediation.sample.customevent.adapter.AdmobFullScreenVideoAdapter

Banner Ads

com.google.ads.mediation.sample.customevent.adapter.AdmobTemplateBannerAdapter

Native Ads

com.google.ads.mediation.sample.customevent.adapter.AdmobNativeFeedAdAdapter


Ad Type

Class Name for iOS Adapter

Reward Video Ads

BUDAdmob_RewardCustomEventAdapter

Interstitial Ads

BUDAdmob_FullScreenVideoCustomEventAdapter

Banner Ads

BUDAdmob_BannerCustomEventAdapter

Native Ads

BUDAdmob_NativeFeedCustomEventAdapter


Parameter

Add {"placementID":"your slot ID"} to Parameter.

  • Parameter: Add {"placementID":"your placement ID on Pangle"} to Parameter , for example,{"placementID":"1234567"}
  • Please make sure to use JSON to set Parameter. Or you need to customize adapter yourself.


Import Pangle SDK and Adapter (3.7.0.1 and later)

Download the Unity and Google Admob Adapter SDKs


Import SDK and admob adapter to Unity Project

0b58714a-16f6-4946-ac47-a793772615cc.png

Google Admob Adapter Import

3f74a7fd-be60-4aaa-a9f9-787ffa2ac0a7.png

Pangle SDK Import

6ce3e1c6-55c1-4932-a4b4-042a14217f4c.png

Add Pangle Init function to project

The Pangle init should called on ui threadMake sure the Pangle init has success before request Ads

Test with test ads

Now you have finished the integration. If you wanna test your apps, make sure you use test ads rather than live, production ads. The easiest way to load test ads is to use test mode. It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging.

Refer to the How to add a test device? to add your device to the test devices on Pangle platform.