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

[iOS]Google Ad Manager Custom Event for Pangle

NOTICE: Since AdMob v9.0.0 deprecated the custom event interface, in order to avoid problems, please use AdMob version below 9.0.0. For details, please refer to the link

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.49.03.png
  • Add adapter's class name to Class Name.
    • Class Name: the adapter class's name , for example,BUDAdmob_RewardCustomEventAdapter
  • Add {"placementID":"your slot ID"} to Parameter.
截屏2021-09-10 上午1.50.40.png
  • Please make sure to use JSON to set Parameter. Or you need to customize adapter yourself.


Class name for different ad formats

Ad Type

Class Name

Reward Video Ads

BUDAdmob_RewardCustomEventAdapter

Interstitial Ads

BUDAdmob_FullScreenVideoCustomEventAdapter

Banner Ads

BUDAdmob_BannerCustomEventAdapter

Native Ads

BUDAdmob_NativeFeedCustomEventAdapter


Initialize Pangle SDK and Adapter


Import and Init Pangle SDK

Add the information as follows in Podfile, and using pod update or pod install to intergrate.

Initialize Pangle with the APP ID as the argument. Unless there is a particular reason, stipulate asUIApplicationDelegate application(_:didFinishLaunchingWithOptions:)

We recommand to use asynchronize initialization method + (void)startWithAsyncCompletionHandler:(BUCompletionHandler)completionHandler; to init the SDK, and also set allowModifyAudioSessionSetting to true to not interrupt the background's audio playback.

Please refer to Integrate Pangle SDKand Initialize Pangle SDK for manual integration and more information.


Embed Pangle Adapters


CocoaPods (preferred)

From our adapter v1.4.1, we support CocoaPods integration, and this is the prerequisite for using it.

  • Pangle SDK 3.7.0.0 or higher
  • Google-Mobile-Ads-SDK 8.0.0 or higher

Add the information as follows in Podfile, and using pod update or pod install to intergrate.


Manual download

  • Click SDK Integration -> SDK download, you can download adapters for different ad formats from your Pangle platform.

Please unzip the file and add adapter files from iOS folder into your application project. They can be used with no code changes. Also you can customize it for your use case.

  • You need to add BUDAdmob_NativeFeedAd.h and BUDAdmob_NativeFeedAd.m into your project to support native ad's adapter mapping.

About Swift

  • If your project is based on Swift, please add adapter's header file into your bridge-header file.
bridge-header.png

Demo

  • You can find simple use cases from Demo.