将 Pangle 与中介集成

This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Pangle using mediation, covering both waterfall and bidding integrations. It covers how to add Pangle to an ad unit's mediation configuration, and how to integrate the Pangle SDK and adapter into an iOS app.

Supported integrations and ad formats

The AdMob mediation adapter for Pangle has the following capabilities:

Integration
Bidding
Waterfall
Formats
App open  1
Banner
Interstitial
Rewarded
Rewarded Interstitial
Native
1 Bidding integration for this format is in closed beta.

Requirements

  • iOS deployment target of 10.0 or higher

Step 1: Set up configurations in Pangle UI

Sign up or Log in to your Pangle account.

Add a new application

Navigate to the Applications tab and click the Add App button.

Select the Operating System you wish to create an application for and fill out the rest of the form. Then, click Submit.

Take note of your application's App ID.

Create an ad placement

Once your application has been created, click the Add button to create your ad placement.

Bidding

Select your Ad Format and Ad Placement Name, and select In-App Bidding as the Pricing Type. Fill out the rest of the form and click Submit.

Once your ad placement is created, take note of the Ad Placement ID.

Waterfall

Select your Ad Format and Ad Placement Name, and Global CPM as the Pricing Type. Fill out the rest of the form and click Submit.

Once your ad placement is created, take note of the Ad Placement ID.

Locate Pangle Reporting API key

Bidding

This step isn't required for bidding integrations.

Waterfall

Take note of the User ID at the bottom left corner of the page.

Click Integrations > SDK & API > Pangle Reporting API 2.0. Take note of Role ID and Security Key.

Turn on test mode

Follow the instructions in Pangle's How to add a Test Ad guide on how to enable Pangle test ads.

Step 2: Set up Pangle demand in AdMob UI

为广告单元配置中介设置

您需要将 Pangle 添加到广告单元的中介配置。

首先,登录您的 AdMob 帐号。接下来,前往中介标签页。如果您想修改现有的中介组,请点击该中介组的名称进行修改,然后直接跳转到添加 Pangle 作为广告来源

要创建新的中介组,请选择创建中介组

输入您的广告格式和平台,然后点击继续

为中介组命名,然后选择要定位到的地理位置。接下来,将中介组的状态设置为已启用,然后点击添加广告单元

将此中介组与您的一个或多个现有AdMob 广告单元相关联。接着,点击完成

现在,您应该会看到广告单元卡片内填充了您选择的广告单元:

添加为广告来源 Pangle

出价

广告来源部分的出价卡片下,选择添加广告来源。然后选择 Pangle

点击如何签署合作伙伴协议,然后与Pangle设置出价合作伙伴关系

点击确认并同意,然后点击继续

如果您已有 Pangle的映射,则可以选择它。否则,请点击添加映射

接下来,输入在上一部分中获取的 App ID and Ad Placement ID。接着,点击完成

重要提示: App ID 必须与目标应用相关联,就像在Pangle 界面中一样。

瀑布

广告来源部分的广告瀑布流卡片下,选择添加广告来源。然后选择 Pangle

选择 Pangle。 然后,为Pangle 输入有效每千次展示费用值,并点击继续

如果您已有 Pangle的映射,则可以选择它。否则,请点击添加映射

接下来,输入在上一部分中获取的 App ID and Ad Placement ID。接着,点击完成

Step 3: Import the Pangle SDK and adapter

  • Add the following line to your project's Podfile:

    pod 'GoogleMobileAdsMediationPangle'
    
  • From the command line run:

    pod install --repo-update

Manual integration

  • Download the latest version of the Pangle SDK for iOS and link all the .framework files and bundles in your project.
  • Download the latest version of the Pangle adapter from the download link in the Changelog and link PangleAdapter.xcframework in your project.

Step 4: Add required code

SKAdNetwork integration

Follow Pangle's documentation to add the SKAdNetwork identifiers to your project's Info.plist file.

Step 5: Test your implementation

启用测试广告

请务必为AdMob 注册您的测试设备,并在 Pangle 界面中启用测试模式

验证测试广告

如需验证您收到的是来自Pangle的测试广告,请使用相应广告来源在广告检查器中启用单一广告来源测试Pangle (Bidding) and Pangle (Waterfall)

Optional Steps

Native ads

Ad rendering

The Pangle adapter returns its native ads as GADNativeAd objects. It populates the following fields for a GADNativeAd.

Field Assets always included by Pangle adapter
Headline
Image 1
Body
Icon
Call to action
Star rating
Store
Price
Advertiser

1 The Pangle adapter does not provide direct access to the main image asset for its native ads. Instead, the adapter populates the GADMediaView with a video or an image.

Error codes

If the adapter fails to receive an ad from Pangle, you can check the underlying error from the ad response using GADResponseInfo.adNetworkInfoArray under the following classes:

GADMediationAdapterPangle

Here are the codes and accompanying messages thrown by the Pangle adapter when an ad fails to load:

Error code Domain Reason
101 com.google.ads.mediation.pangle Invalid server parameters (e.g. Missing app ID or placement ID).
102 com.google.ads.mediation.pangle The requested ad size does not match a Pangle supported banner size.
-1-60000 Sent by Pangle SDK Pangle SDK returned an error. See Pangle's documentation for more details.

Pangle iOS Mediation Adapter Changelog

Version 5.8.0.8.0

  • Verified compatibility with Pangle SDK version 5.8.0.8.
  • Updated adapter to use new Pangle SDK signal collection API.

Built and tested with:

  • Google Mobile Ads SDK version 11.2.0.
  • Pangle SDK version 5.8.0.8.

Version 5.8.0.7.0

  • Verified compatibility with Pangle SDK version 5.8.0.7.
  • Now requires minimum iOS version 12.0.
  • Now requires Google Mobile Ads SDK version 11.0 or higher.
  • Included Info.plist in the frameworks within PangleAdapter.xcframework.

Built and tested with:

  • Google Mobile Ads SDK version 11.0.1.
  • Pangle SDK version 5.8.0.7.

Version 5.7.0.7.0

  • Verified compatibility with Pangle SDK version 5.7.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • Pangle SDK version 5.7.0.7.

Version 5.7.0.6.0

  • Verified compatibility with Pangle SDK version 5.7.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • Pangle SDK version 5.7.0.6.

Version 5.6.0.8.0

  • Verified compatibility with Pangle SDK version 5.6.0.8.
  • Refactored the +setCOPPA method by replacing the deprecated adConfiguration.childDirectedTreatment property with the new GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment property.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • Pangle SDK version 5.6.0.8.

Version 5.5.0.9.0

  • Verified compatibility with Pangle SDK version 5.5.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 10.13.0.
  • Pangle SDK version 5.5.0.9.

Version 5.5.0.7.0

  • Verified compatibility with Pangle SDK version 5.5.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 10.12.0.
  • Pangle SDK version 5.5.0.7.

Version 5.5.0.5.0

  • Verified compatibility with Pangle SDK version 5.5.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 10.11.0.
  • Pangle SDK version 5.5.0.5.

Version 5.4.1.1.0

  • Added bidding support for app open ad format.
  • Verified compatibility with Pangle SDK version 5.4.1.1.

Built and tested with:

  • Google Mobile Ads SDK version 10.10.0.
  • Pangle SDK version 5.4.1.1.

Version 5.4.0.9.0

  • Verified compatibility with Pangle SDK version 5.4.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 10.9.0.
  • Pangle SDK version 5.4.0.9.

Version 5.4.0.8.0

  • Fixed an issue where GADPangleNetworkExtras did not conform to GADAdNetworkExtras protocol.
  • Implemented adDidShowFail protocol method in interstitial, rewarded, and app open ads.
  • Verified compatibility with Pangle SDK version 5.4.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 10.9.0.
  • Pangle SDK version 5.4.0.8.

Version 5.3.1.2.0

  • Verified compatibility with Pangle SDK version 5.3.1.2.

Built and tested with:

  • Google Mobile Ads SDK version 10.8.0.
  • Pangle SDK version 5.3.1.2.

Version 5.3.1.0.0

  • Verified compatibility with Pangle SDK version 5.3.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 10.8.0.
  • Pangle SDK version 5.3.1.0.

Version 5.2.1.1.0

  • Verified compatibility with Pangle SDK version 5.2.1.1.

Built and tested with:

  • Google Mobile Ads SDK version 10.7.0.
  • Pangle SDK version 5.2.1.1.

Version 5.2.0.9.0

  • Verified compatibility with Pangle SDK version 5.2.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 10.5.0.
  • Pangle SDK version 5.2.0.9.

Version 5.2.0.8.0

  • Verified compatibility with Pangle SDK version 5.2.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 10.5.0.
  • Pangle SDK version 5.2.0.8.

Version 5.2.0.7.0

  • Added waterfall support for app open, banner (includes MREC), interstitial, rewarded and native ad formats.
  • Verified compatibility with Pangle SDK version 5.2.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 10.5.0.
  • Pangle SDK version 5.2.0.7.

Version 5.2.0.6.0

  • Verified compatibility with Pangle SDK version 5.2.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 10.5.0.
  • Pangle SDK version 5.2.0.6.

Version 5.1.1.0.0

  • Verified compatibility with Pangle SDK version 5.1.1.0.
  • Added support for the arm64 simulator architecture.
  • Now requires Google Mobile Ads SDK version 10.4.0 or higher.

Built and tested with:

  • Google Mobile Ads SDK version 10.4.0.
  • Pangle SDK version 5.1.1.0.

Version 5.1.0.6.0

  • Verified compatibility with Pangle SDK version 5.1.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 10.3.0.
  • Pangle SDK version 5.1.0.6.

Version 5.0.1.0.0

  • Verified compatibility with Pangle SDK version 5.0.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 10.2.0.
  • Pangle SDK version 5.0.1.0.

Version 5.0.0.8.0

  • Verified compatibility with Pangle SDK version 5.0.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 10.2.0.
  • Pangle SDK version 5.0.0.8.

Version 5.0.0.7.0

  • Verified compatibility with Pangle SDK version 5.0.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 10.1.0.
  • Pangle SDK version 5.0.0.7.

Version 5.0.0.6.0

  • Verified compatibility with Pangle SDK version 5.0.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 10.1.0.
  • Pangle SDK version 5.0.0.6.

Version 4.9.1.0.0

  • Removed support for the armv7 architecture.
  • Verified compatibility with Pangle SDK version 4.9.1.0.
  • Now requires minimum iOS version of 12.0.
  • Now requires Google Mobile Ads SDK version 10.0.0 or higher.

Built and tested with:

  • Google Mobile Ads SDK version 10.0.0.
  • Pangle SDK version 4.9.1.0.

Version 4.9.0.8.0

  • Verified compatibility with Pangle SDK version 4.9.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 9.14.0.
  • Pangle SDK version 4.9.0.8.

Version 4.9.0.7.0

  • Verified compatibility with Pangle SDK version 4.9.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 9.14.0.
  • Pangle SDK version 4.9.0.7.

Version 4.9.0.6.0

  • Verified compatibility with Pangle SDK version 4.9.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 9.14.0.
  • Pangle SDK version 4.9.0.6.

Version 4.8.1.0.0

  • Verified compatibility with Pangle SDK version 4.8.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 9.14.0.
  • Pangle SDK version 4.8.1.0.

Version 4.8.0.9.0

  • Verified compatibility with Pangle SDK version 4.8.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 9.13.0.
  • Pangle SDK version 4.8.0.9.

Version 4.8.0.7.0

  • Verified compatibility with Pangle SDK version 4.8.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 9.13.0.
  • Pangle SDK version 4.8.0.7.

Version 4.8.0.6.0

  • Verified compatibility with Pangle SDK version 4.8.0.6.
  • Fixed an issue where the main thread was blocked when loading native ad icon image.

Built and tested with:

  • Google Mobile Ads SDK version 9.13.0.
  • Pangle SDK version 4.8.0.6.

Version 4.7.0.7.0

  • Verified compatibility with Pangle SDK version 4.7.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 9.11.0.
  • Pangle SDK version 4.7.0.7.

Version 4.7.0.6.0

  • Verified compatibility with Pangle SDK version 4.7.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 9.11.0.
  • Pangle SDK version 4.7.0.6.

Version 4.7.0.5.0

  • Verified compatibility with Pangle SDK version 4.7.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 9.11.0.
  • Pangle SDK version 4.7.0.5.

Version 4.7.0.4.0

  • Verified compatibility with Pangle SDK version 4.7.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 9.10.0.
  • Pangle SDK version 4.7.0.4.

Version 4.6.2.2.0

  • Renamed the setGDPR() and setCCPA() methods from the GADMediationAdapterPangle class to setGDPRConsent() and setDoNotSell respectively.
  • Verified compatibility with Pangle SDK version 4.6.2.2.

Built and tested with:

  • Google Mobile Ads SDK version 9.10.0.
  • Pangle SDK version 4.6.2.2.

Version 4.6.1.8.0

  • Verified compatibility with Pangle SDK version 4.6.1.8.
  • Added bidding support for native ad format.
  • Updated the adapter to use the didRewardUser API.
  • Now requires Google Mobile Ads SDK version 9.8.0 or higher.

Built and tested with:

  • Google Mobile Ads SDK version 9.9.0.
  • Pangle SDK version 4.6.1.8.

Version 4.5.2.8.0

  • Verified compatibility with Pangle SDK version 4.5.2.8.

Built and tested with:

  • Google Mobile Ads SDK version 9.7.0.
  • Pangle SDK version 4.5.2.8.

Version 4.5.2.7.0

  • Verified compatibility with Pangle SDK version 4.5.2.7.

Built and tested with:

  • Google Mobile Ads SDK version 9.7.0.
  • Pangle SDK version 4.5.2.7.

Version 4.5.2.5.0

  • Verified compatibility with Pangle SDK version 4.5.2.5.

Built and tested with:

  • Google Mobile Ads SDK version 9.6.0.
  • Pangle SDK version 4.5.2.5.

Version 4.5.2.4.0

  • Verified compatibility with Pangle SDK version 4.5.2.4.

Built and tested with:

  • Google Mobile Ads SDK version 9.6.0.
  • Pangle SDK version 4.5.2.4.

Version 4.5.2.3.0

  • Verified compatibility with Pangle SDK version 4.5.2.3.

Built and tested with:

  • Google Mobile Ads SDK version 9.6.0.
  • Pangle SDK version 4.5.2.3.

Version 4.5.1.3.0

  • Verified compatibility with Pangle SDK version 4.5.1.3.

Built and tested with:

  • Google Mobile Ads SDK version 9.5.0.
  • Pangle SDK version 4.5.1.3.

Version 4.3.1.9.0

  • Verified compatibility with Pangle SDK version 4.3.1.9.

Built and tested with:

  • Google Mobile Ads SDK version 9.3.0.
  • Pangle SDK version 4.3.1.9.

Version 4.3.0.5.0

  • Verified compatibility with Pangle SDK version 4.3.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 9.2.0.
  • Pangle SDK version 4.3.0.5.

Version 4.3.0.4.0

  • Initial release!
  • Added bidding support for banner (includes MREC), interstitial and rewarded ad formats.

Built and tested with:

  • Google Mobile Ads SDK version 9.1.0.
  • Pangle SDK version 4.3.0.4.