AdColony를 미디에이션과 통합

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

Supported integrations and ad formats

The AdMob mediation adapter for AdColony has the following capabilities:

Integration
Bidding
Waterfall
Formats
Banner
Interstitial
Rewarded
Native

Requirements

Step 1: Set up configurations in AdColony UI

Sign up and log in to your AdColony account. Add your app to the AdColony publisher dashboard by clicking the Setup New App button.

AdColony setup new app

Fill out the form and click Create at the bottom of the page to add your app to AdColony.

AdColony create app

Once your app is created you can obtain your App ID by navigating to Monetization > Apps under your app's Basic App Information section.

AdColony app id

Next, create a new Ad Zone by clicking the Setup New Ad Zone button in the Ad Zones section of your App's page. We recommend creating a new Ad Zone for mediation with AdMob even if you already have one.

AdColony set up zone

For additional instructions on creating an ad placement, select the tab corresponding to your preferred ad format.

  1. Set Zone is Active? to Yes.
  2. Enter a Name for your Ad Zone.

  3. Choose Banner as the Ad Zone Size.

  4. Enter a value for the Daily play cap.

Interstitial

  1. Set Zone is Active? to Yes.
  2. Enter a Name for your Ad Zone.

  3. Choose Preroll/Interstitial as the Zone Type.

  4. Enter a value for the Daily play cap.

Rewarded

  1. Set Zone is Active? to Yes.
  2. Enter a Name for your Ad Zone.

  3. Choose Value Exchange/V4VC as the Zone Type.

  4. Set Client Side Only? to Yes and enter a Virtual Currency Name, Daily Max Videos per User and Reward Amount.

  5. Enter a value for the Daily play cap.

Click the Create button when finished to create the Ad Zone.

Once the Ad Zone is created, you can locate your Zone ID under the Integration section of the Ad Zone. The Zone ID will be used in the next step.

AdColony zone id

Locate your AdColony API Key

Bidding

This step isn't required for bidding integrations.

Waterfall

You will need your AdColony API Key for setting up your AdMob ad unit ID. Navigate to Account Settings in your AdColony publisher dashboard to locate your API Key.

AdColony settings

Turn on test mode

To enable test ads on AdColony, go to your AdColony dashboard and navigate to Monetization > Apps. Select your Zone for which you would like to enable test ads under the Ad Zones section of your app. Test ads can be enabled by checking Yes to Show test ads only? under the Development section.

AdColony test

Step 2: Set up AdColony demand in AdMob UI

광고 단위에 대한 미디에이션 설정 구성

AdColony 를 광고 단위의 미디에이션 구성에 추가해야 합니다.

먼저 AdMob 계정에 로그인합니다. 그런 다음 미디에이션 탭으로 이동합니다. 수정할 기존 미디에이션 그룹이 있는 경우 해당 미디에이션 그룹의 이름을 클릭하여 수정한 후 AdColony 광고 소스로 추가로 건너뜁니다.

새 미디에이션 그룹을 만들려면 미디에이션 그룹 만들기를 선택합니다.

광고 형식과 플랫폼을 입력하고 계속을 클릭합니다.

미디에이션 그룹에 이름을 지정하고 타겟팅할 위치를 선택합니다. 미디에이션 그룹 상태를 사용으로 설정한 다음 광고 단위 추가를 클릭합니다.

이 미디에이션 그룹을 하나 이상의 기존AdMob 광고 단위와 연결합니다. 그런 다음 완료를 클릭합니다.

이제 광고 단위 카드가 선택한 광고 단위로 채워진 것을 볼 수 있습니다.

광고 소스로 AdColony 추가

입찰

광고 소스 섹션의 입찰 카드에서 광고 소스 추가를 선택합니다. 그런 다음 AdColony을 선택합니다.

파트너십 계약을 체결하는 방법을 클릭하고AdColony과(와) 입찰 파트너십을 설정합니다.

확인 및 동의를 클릭한 다음 계속을 클릭합니다.

이미 AdColony에 대한 매핑이 있는 경우 해당 매핑을 선택할 수 있습니다. 그렇지 않으면 매핑 추가를 클릭합니다.

그런 다음 이전 섹션에서 얻은 App ID and Zone ID를 입력합니다. 그런 다음 완료를 클릭합니다.

중요: App ID 는AdColony UI에서와 같이 타겟팅된 앱과 연결되어야 합니다.

폭포

광고 소스 섹션의 폭포식 구조 카드에서 광고 소스 추가를 선택합니다. 그런 다음 AdColony을 선택합니다.

AdColony를 선택하고 최적화 스위치를 사용 설정합니다. 이전 섹션에서 가져온 API Key을 입력하여AdColony에 대해 광고 소스 최적화를 설정합니다. 그런 다음AdColony 에 eCPM 값을 입력하고 계속을 클릭합니다.

이미 AdColony에 대한 매핑이 있는 경우 해당 매핑을 선택할 수 있습니다. 그렇지 않으면 매핑 추가를 클릭합니다.

그런 다음 이전 섹션에서 얻은 App ID and Zone ID를 입력합니다. 그런 다음 완료를 클릭합니다.

Add AdColony to GDPR and US state regulations ad partners list

GDPR 설정미국 주 규정 설정 AdColony 를 AdMob UI의 GDPR 및 미국 주 규정 광고 파트너 목록에 추가합니다.

Step 3: Import the AdColony SDK and adapter

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

    pod 'GoogleMobileAdsMediationAdColony'
    
  • From the command line run:

    pod install --repo-update
    

Manual integration

  • Download the latest version of the AdColony SDK, and link AdColony.framework in your project.
  • Download the latest AdColony adapter from the download link in Changelog, and link AdColonyAdapter.framework in your project.
  • Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:
    • libz.1.2.5.tbd
    • AdSupport
    • AudioToolbox
    • AVFoundation
    • CoreMedia
    • CoreTelephony
    • JavaScriptCore
    • MessageUI
    • MobileCoreServices
    • SystemConfiguration
    • EventKit (OPTIONAL)
    • Social (OPTIONAL)
    • StoreKit (OPTIONAL)
    • WatchConnectivity (OPTIONAL)
    • WebKit (OPTIONAL)

Step 4: Implement privacy settings on AdColony SDK

Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.

The AdColony adapter exposes an appOptions property to customize parameters to be sent to AdColony's SDK. Two methods relevant to GDPR on these options are -setPrivacyFrameworkOfType:isRequired: and -setPrivacyConsentString:forType:. The following sample code demonstrates how to pass consent information to the AdColony adapter, which are then used in AdColony's initialization method. These options must be set before you initialize the Google Mobile Ads SDK to ensure they get forwarded properly to AdColony's SDK.

Swift

import AdColonyAdapter
//...

let appOptions = GADMediationAdapterAdColony.appOptions
appOptions?.setPrivacyFrameworkOfType(ADC_GDPR, isRequired: true)
appOptions?.setPrivacyConsentString("1", forType: ADC_GDPR)

Objective-C

#import <AdColonyAdapter/AdColonyAdapter.h>
//...

AdColonyAppOptions *options = GADMediationAdapterAdColony.appOptions;
[options setPrivacyFrameworkOfType:ADC_GDPR isRequired:YES];
[options setPrivacyConsentString:@"1" forType:ADC_GDPR];

See AdColony's GDPR implementation details for more details about what values may be provided in these methods.

US states privacy laws

U.S. states privacy laws require giving users the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The U.S. states privacy laws compliance guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance.

The AdColony adapter exposes an appOptions property to customize parameters to be sent to AdColony's SDK. Two methods relevant to CCPA on these options are -setPrivacyFrameworkOfType:isRequired: and -setPrivacyConsentString:forType:. The following sample code demonstrates how to pass consent information to the AdColony adapter, which are then used in AdColony's initialization method. These options must be set before you initialize the Google Mobile Ads SDK to ensure they get forwarded properly to AdColony's SDK.

Swift

import AdColonyAdapter
//...

let appOptions = GADMediationAdapterAdColony.appOptions
appOptions?.setPrivacyFrameworkOfType(ADC_CCPA, isRequired: true)
appOptions?.setPrivacyConsentString("1", forType: ADC_CCPA)

Objective-C

#import <AdColonyAdapter/AdColonyAdapter.h>
//...

AdColonyAppOptions *options = GADMediationAdapterAdColony.appOptions;
[options setPrivacyFrameworkOfType:ADC_CCPA isRequired:YES];
[options setPrivacyConsentString:@"1" forType:ADC_CCPA];

See AdColony's CCPA implementation details for more details about what values may be provided in these methods.

Step 5: Add required code

SKAdNetwork integration

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

Step 6: Test your implementation

테스트 광고 사용 설정

AdMob 용 테스트 기기를 등록하고 AdColony UI에서 테스트 모드를 사용 설정해야 합니다.

테스트 광고 확인

AdColony에서 테스트 광고를 수신하고 있는지 확인하려면 광고 검사기에서 AdColony (Bidding) and AdColony (Waterfall) 광고 소스를 사용하여 단일 광고 소스 테스트를 사용 설정하세요.

Optional steps

Using interstitial and rewarded ads

The AdColony adapter supports additional request parameters which can be passed to the adapter using the GADMAdapterAdColonyExtras class. The GADMAdapterAdColonyExtras includes the following properties:

showPrePopup
Enable a reward dialog before showing the ad for a specific ad request in your app.
showPostPopup
Enable a reward dialog after showing the ad for a specific ad request in your app.

Here's a code example of how to set these parameters on the ad request:

Swift

let request = GADRequest()
let extras = GADMAdapterAdColonyExtras()
extras.showPrePopup = true
extras.showPostPopup = true
request.registerAdNetworkExtras(extras)

Objective-C

GADRequest *request = [GADRequest request];
GADMAdapterAdColonyExtras *extras = [[GADMAdapterAdColonyExtras alloc] init];
extras.showPrePopup = YES;
extras.showPostPopup = YES;
[request registerAdNetworkExtras:extras];

Verify your adapter and SDK versions

To log the adapter and SDK versions, use the following code snippet:

Class<GADMediationAdapter> adapterClass = NSClassFromString(@"GADMediationAdapterAdColony");
if (adapterClass != nil) {
  GADVersionNumber adapterVersion = [adapterClass version];
  GADVersionNumber sdkVersion = [adapterClass adSDKVersion];
  // Log the adapter patch version to 3 digits to represent the x.x.x.x versioning
  // used by adapters.
  NSLog(@"Adapter version: %zd.%zd.%03zd",
        adapterVersion.majorVersion,
        adapterVersion.minorVersion,
        adapterVersion.patchVersion);
  NSLog(@"SDK version: %zd.%zd.%zd",
        sdkVersion.majorVersion,
        sdkVersion.minorVersion,
        sdkVersion.patchVersion);
}

Logging the adapter version in Swift is not possible since the dynamic runtime feature does not exist in Swift, making it infeasible to dynamically create the class from the class name. If this is needed in Swift, it needs to be written in Objective-C and imported using a bridging header.

Error codes

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

GADMAdapterAdColony
GADMediationAdapterAdColony

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

Error code Reason
0 - 3 AdColony SDK returned an error. See documentation for more details.
101 Invalid server parameters (e.g. missing Zone ID).
102 Root view controller presenting the ad is nil.
103 The AdColony SDK returned an initialization error.
104 The AdColony SDK does not support being configured twice within a five second period.
105 Failed to show ad.
106 Zone used for rewarded is not a rewarded zone on AdColony portal.

AdColony iOS Mediation Adapter Changelog

Next Version

  • Removed support of the armv7 architecture.
  • Now requires minimum iOS version 11.0.
  • Now requires Google Mobile Ads SDK version 10.4.0 or higher.
  • Removed the deprecated willBackgroundApplication delegate method from the banner and interstitial renderers.
  • Replaced the deprecated childDirectedTreatment method with GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment.

Version 4.9.0.2

  • Updated the adapter to pass childDirectedTreatment information to the AdColony SDK.

Built and tested with

  • Google Mobile Ads SDK version 10.1.0.
  • AdColony SDK version 4.9.0.

Version 4.9.0.1

  • Updated the adapter to use the didRewardUser API.
  • Fixed an issue where UI related API methods are being called on a background thread.
  • Removed use of deprecated gender, birthday and location mediation APIs.
  • Now requires Google Mobile Ads SDK version 10.0.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 10.0.0.
  • AdColony SDK version 4.9.0.

Version 4.9.0.0

  • Verified compatibility with AdColony SDK 4.9.0.

Built and tested with

  • Google Mobile Ads SDK version 9.5.0.
  • AdColony SDK version 4.9.0.

Version 4.8.0.0

  • Verified compatibility with AdColony SDK 4.8.0.

Built and tested with

  • Google Mobile Ads SDK version 9.1.0.
  • AdColony SDK version 4.8.0.

Version 4.7.2.2

  • Added support for the arm64 simulator architecture.

Built and tested with

  • Google Mobile Ads SDK version 9.0.0.
  • AdColony SDK version 4.7.2.

Version 4.7.2.1

  • Verified compatibility with Google Mobile Ads SDK version 9.0.0.
  • Now requires Google Mobile Ads SDK version 9.0.0 or higher.
  • Now requires minimum iOS version of 10.0.

Built and tested with

  • Google Mobile Ads SDK version 9.0.0.
  • AdColony SDK version 4.7.2.

Version 4.7.2.0

  • Verified compatibility with AdColony SDK 4.7.2.

Built and tested with

  • Google Mobile Ads SDK version 8.10.0.
  • AdColony SDK version 4.7.2.

Version 4.7.1.0

  • Verified compatibility with AdColony SDK 4.7.1.

Built and tested with

  • Google Mobile Ads SDK version 8.9.0.
  • AdColony SDK version 4.7.1.

Version 4.7.0.0

  • Verified compatibility with AdColony SDK 4.7.0.
  • Relaxed dependency to Google Mobile Ads SDK version 8.0.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 8.8.0.
  • AdColony SDK version 4.7.0.

Version 4.6.1.0

  • Verified compatibility with AdColony SDK 4.6.1.
  • Now requires Google Mobile Ads SDK version 8.4.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 8.4.0.
  • AdColony SDK version 4.6.1.

Version 4.6.0.0

  • Updated the adapter to use the .xcframework format.
  • Added bidding capability for banner ads.
  • Verified compatibility with AdColony SDK 4.6.0.
  • Now requires Google Mobile Ads SDK version 8.3.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 8.3.0.
  • AdColony SDK version 4.6.0.

Version 4.5.0.0

  • Verified compatibility with AdColony SDK 4.5.0.
  • Now requires Google Mobile Ads SDK version 7.69.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 7.69.0.
  • AdColony SDK version 4.5.0.

Version 4.4.1.0

  • Verified compatibility with AdColony SDK 4.4.1.
  • Now requires Google Mobile Ads SDK version 7.66.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 7.66.0.
  • AdColony SDK version 4.4.1.

Version 4.4.0.0

  • Verified compatibility with AdColony SDK 4.4.0.
  • Now requires Google Mobile Ads SDK version 7.65.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 7.65.0.
  • AdColony SDK version 4.4.0.

Version 4.3.1.0

  • Verified compatibility with AdColony SDK 4.3.1.

Built and tested with

  • Google Mobile Ads SDK version 7.64.0.
  • AdColony SDK version 4.3.1.

Version 4.3.0.0

  • Verified compatibility with AdColony SDK 4.3.0.
  • Now requires Google Mobile Ads SDK version 7.64.0 or higher.

Built and tested with

  • Google Mobile Ads SDK version 7.64.0.
  • AdColony SDK version 4.3.0.

Version 4.1.5.0

  • Verified compatibility with AdColony SDK 4.1.5.
  • Updated the minimum required Google Mobile Ads SDK version to 7.60.0.

Built and tested with

  • Google Mobile Ads SDK version 7.60.0.
  • AdColony SDK version 4.1.5.

Version 4.1.4.1

  • Added standardized adapter error codes and messages.
  • Removed support for the i386 architecture.

Built and tested with

  • Google Mobile Ads SDK version 7.57.0.
  • AdColony SDK version 4.1.4.

Version 4.1.4.0

  • Verified compatibility with AdColony SDK 4.1.4.

Built and tested with

  • Google Mobile Ads SDK version 7.56.0.
  • AdColony SDK version 4.1.4.

Version 4.1.3.1

  • Fixed AdColony mediation network adapter version string.

Built and tested with

  • Google Mobile Ads SDK version 7.55.0.
  • AdColony SDK version 4.1.3.

Version 4.1.3.0 (Deprecated)

  • Known issue: Incorrectly reports the mediation adapter version as 4.1.2.0. Please use version 4.1.3.1 or higher.
  • Verified compatibility with AdColony SDK 4.1.3.
  • Adding code to re-request ads for OB requests when the AdColony ad expires.

Built and tested with

  • Google Mobile Ads SDK version 7.55.0.
  • AdColony SDK version 4.1.3.

Version 4.1.2.0

  • Verified compatibility with AdColony SDK 4.1.2.
  • Added support for banner ads.

Built and tested with

  • Google Mobile Ads SDK version 7.52.0.
  • AdColony SDK version 4.1.2.

Version 4.1.1.0

  • Verified compatibility with AdColony SDK 4.1.1.
  • Added support for banner ads.

Built and tested with

  • Google Mobile Ads SDK version 7.52.0.
  • AdColony SDK version 4.1.1.

Version 3.3.8.1.0

  • Updating AdColony adapter to version 3.3.8.1.
  • Linting the code to follow Google's Objective-C code-style and guard against potential crashes.

Built and tested with

  • Google Mobile Ads SDK version 7.51.0
  • AdColony SDK version 3.3.8.1

Version 3.3.7.3

  • Added checks to the credentials before initializing the AdColony SDK.

Version 3.3.7.2

  • Fixed an issue where the GADMediationAdapterAdColony header was not made public.

Version 3.3.7.1

  • Added bidding capability to the adapter for interstitial and rewarded ads.

Version 3.3.7.0

  • Verified compatibility with AdColony SDK 3.3.7.
  • Fixed a crash in case of failed to fetch rewarded ad.

Version 3.3.6.1

  • Updated the adapter to use the new rewarded API.
  • Now requires Google Mobile Ads SDK version 7.41.0 or higher.

Version 3.3.6.0

  • Verified compatibility with AdColony SDK 3.3.6.

Version 3.3.5.0

  • Verified compatibility with AdColony SDK 3.3.5.
  • Added adapterDidCompletePlayingRewardBasedVideoAd: callback to the adapter.

Version 3.3.4.0

  • Verified compatibility with AdColony SDK 3.3.4.

Version 3.3.0.0

  • Verified compatibility with AdColony SDK 3.3.0.

Version 3.2.1.1

  • Added testMode to extras. Publishers can use this property to mark AdColony requests as test requests.

Version 3.2.1.0

  • Verified compatibility with AdColony SDK 3.2.1.

Version 3.2.0.0

  • Verified compatibility with AdColony SDK 3.2.0.

Version 3.1.1.1

  • Removed support for the armv7s architecture.
  • Fixed an issue that caused the adapter to incorrectly invoke the rewarded callback when used with recent versions of the AdColony SDK.

Version 3.1.1.0

  • Verified compatibility with AdColony SDK 3.1.1.

Version 3.1.0.0

  • Verified compatibility with AdColony SDK 3.1.0.

Version 3.0.6.0

  • Changed the version naming system to [AdColony SDK version].[adapter patch version].
  • Updated the minimum required AdColony SDK to v3.0.6.

Earlier Versions