Share your feedback about the Google Mobile Ads SDK! Take the annual survey.

Integrating AdColony with Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from AdColony via mediation. It covers how to add AdColony to an ad unit's mediation configuration, how to set up Automatic data collection, and how to integrate the AdColony SDK and adapter into an iOS app.

Supported ad formats and features

The Ad Manager mediation adapter for AdColony has the following capabilities:

Rewarded Video
Rewarded Video (new APIs)
Native Ads - Custom Rendering
Smart Banners
Automatic data collection


  • Xcode 9.2 or higher
  • iOS Deployment target of 8.0 or higher
  • Google Mobile Ads SDK 7.42.2 or higher

Step 1: Set up AdColony

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 Ad Manager 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 Preroll/Interstitial as the Zone Type.

  4. Enter a value for the Daily play cap.

Rewarded Video

  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.

AdColony zone id

In addition to the App ID and the Zone ID you will also need your AdColony API Key for setting up your Ad Manager Ad Unit ID. Navigate to Account Settings in your AdColony publisher dashboard to locate your API Key.

AdColony settings

Step 2: Configure mediation settings for your Ad Manager ad unit

Sign in to your Ad Manager account. Navigate to Delivery > Yield groups and click the New yield group button.

Enter a unique Name for your yield group, set the Status to Active, select your Ad Format, and set the Inventory type to Mobile App. Under the Targeting > Inventory section, select the Ad Unit ID to which you want to add mediation.

Next, click the Add yield partner button.

If you already have a Yield partner for AdColony, you can simply select it. Otherwise, select Create a new yield partner.

Select AdColony as the Ad network and enter a unique Name. Enable Mediation and turn on Automatic data collection, and enter the API Key obtained in the previous section. You don't need to enter a Username and Password. Click Save when done.

Once the Yield partner is selected, choose Mobile SDK mediation as the Integration type, iOS as the Platform, and Active as the Status. Enter the App ID and Zone ID obtained in the previous section and a Default CPM value.

Click Save at the bottom of the page when done.

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Override reward settings from third-party ad networks when using mediation box.

If you don't apply this setting, the AdColony adapter passes back the reward specified in the AdColony dashboard.

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 version of the AdColonyAdapter, 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: Additional code required

No additional code is required for AdColony integration.

Step 5: Test your implementation

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

Optional steps

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 section below shows you how to enable or disable personalized ads for AdColony.

In version, the AdColony adapter has an appOptions property that is used when initializing the AdColony SDK. The following sample code sets gdprRequired to YES and gdprConsentString to 1. If you choose to call these methods, it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.

#import <AdColonyAdapter/AdColonyAdapter.h>

AdColonyAppOptions *options = [GADMediationAdapterAdColony appOptions];
[options setGdprRequired:YES];
[options setGdprConsentString:@"1"];

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

Using interstitial and rewarded video 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 application.
  • showPostPopup - Enable a reward dialog after showing the ad for a specific ad request in your application.

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


let request = DFPRequest()
let extras = GADMAdapterAdColonyExtras()
extras.showPrePopup = true
extras.showPostPopup = true


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


To ensure AdColony video ads are available as early as possible, you can optionally initialize the AdColony SDK at the beginning of the application lifecycle. To do so, insert the following code into the application:didFinishLaunchingWithOptions: method:


AdColony.configure(withAppID: "YOUR_ADCOLONY_APP_ID",
                     zoneIDs: ["Zone_ID_1", "Zone_ID_2"],
                     options: options) { _ in }


[AdColony configureWithAppID:@"YOUR_ADCOLONY_APP_ID"
                     zoneIDs:@[@"Zone_ID_1", @"Zone_ID_2"]

AdColony iOS Mediation Adapter Changelog


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


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


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


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


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


  • Verified compatibility with AdColony SDK 3.3.6.


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


  • Verified compatibility with AdColony SDK 3.3.4.


  • Verified compatibility with AdColony SDK 3.3.0.


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


  • Verified compatibility with AdColony SDK 3.2.1.


  • Verified compatibility with AdColony SDK 3.2.0.


  • 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.


  • Verified compatibility with AdColony SDK 3.1.1.


  • Verified compatibility with AdColony SDK 3.1.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

Send feedback about...

Mobile Ads SDK for iOS
Mobile Ads SDK for iOS
Need help? Visit our support page.