AdColony

If you plan to use the MoPub SDK to load and display ads from AdColony via mediation, use this article for integration instructions and information unique to the ad network. To learn more about how MoPub mediation works, refer to our MoPub Network Mediation article.

Supported Ad Formats

AdColony currently supports the following ad formats. For support information, visit the AdColony homepage.

MoPub Formats AdColony Ad Formats
Banner (Advanced Bidding not supported) Banner
Medium Rectangle Medium Rectangle
Interstitial Interstitial
Rewarded Video Rewarded Video

Download and Integrate

To download the AdColony adapters, navigate to the Mediation Integration Tool. You must also download the AdColony SDK:

  • Download AdColony SDK for iOS

  • Download AdColony SDK for Android

    For Android, AdColony adapters are released as an Android Archive (AAR) file starting with version 3.3.8.1. The AAR includes the required Manifest data for AdColony. As a result, you no longer need to update your AndroidManifest manually for any generic data, such as permissions and Activities. Any other app-level placement configuration required by AdColony must be manually entered into the AndroidManifest.

For the latest download and integration instructions, consult AdColony’s tutorials before you integrate the SDK and adapters.

Set Up AdColony on the MoPub Dashboard

  • App ID and Zone ID are required. Each Zone ID must be unique per MoPub ad unit.

  • No field is provided for allZoneIds, but allZoneIds will be passed to the AdColony adapters. They will contain all of the Zone ID entries for that app.

  • clientOptions is optional and only applicable on Android.

Network Reporting and Auto CPM

The following setup is required to take advantage of Auto CPM. To enable AdColony network reporting and Auto CPM:

  1. Navigate to the MoPub UI’s Networks tab. (Refer to these additional instructions that provide more detail for the remaining steps.)

  2. In the Network settings page for AdColony:

    • enable reporting access

    • provide the API Key

      To find the API Key, in AdColony, navigate to Settings and look for Read-Only API Key.

      Ad Colony Reporting

  3. Navigate to the Auto CPM preferences page and turn on Auto CPM.

Migrate AdColony from Custom Native Setup

  1. Transfer the App IDs and Zone IDs (if applicable) from the old custom native connection to the supported AdColony instance.

  2. MoPub will initiate the following AdColony mediation adapter class names to render the ads:

    • iOS

      • AdColonyBannerCustomEvent
      • AdColonyInterstitialCustomEvent
      • AdColonyRewardedVideoCustomEvent
    • Android

      • com.mopub.mobileads.AdColonyBanner
      • com.mopub.mobileads.AdColonyInterstitial
      • com.mopub.mobileads.AdColonyRewardedVideo

    If you are manually entering these class names, migrate to the new network setup and pause the Custom Native Network. If you are using your own mediation adapter class names, make sure that both the old custom native network and the new AdColony network UI are set up for backward compatibility.

Important: During migration, make sure the custom native network and the AdColony network are not both live at the same time, because this may impact your revenue.

Test an Ad

As you test your SDK integrations and network setups, we recommend that you leverage test ad placements to ensure a consistent fill rate. To set up test mode, follow the instructions in AdColony’s dashboard setup tutorial, “Step 3: Toggle Test Ads.”

With test mode enabled, you can request ads using the ad unit ID you created earlier for this purpose and receive an AdColony test ad. Be sure to disable test mode after testing!

Initialization Network Configuration

AdColony requires your App Id and Zone Ids information to successfully initialize. This can be done on the spot on first ad request (also called lazy initialization), or during MoPub initialization, which will ensure AdColony initializes early on. Initializing early is a requirement for Advanced Bidding. So if you are using Advanced Bidding please make sure you follow these steps. If you’re only using AdColony on traditional line items, this is not a requirement.

  • iOS:
    • 4.3.0.2 and higher: You can enter your App Id (appId) as a String parameter, and all your Zone Ids (allZoneIds) as an NSArray. Example below:
      // Your MoPub SDK initialization code
      let sdkConfig = MPMoPubConfiguration(adUnitIdForAppInitialization: YOUR_MOPUB_AD_UNIT_ID)
      // sdkConfig setup...
      sdkConfig.mediatedNetworkConfigurations = [String(describing: AdColonyAdapterConfiguration.self):
      ["appId": "YOUR_AD_COLONY_APP_ID", "allZoneIds" : ["ZONE_ID_1","ZONE_ID_2","ZONE_ID_3"]]]
      
    • Below 4.3.0.2: You can enter your App Id (appId) as a String parameter, and all your Zone Ids (allZoneIds) as a string of JSON Object. Example below:
      // Your MoPub SDK initialization code
      let sdkConfig = MPMoPubConfiguration(adUnitIdForAppInitialization: YOUR_MOPUB_AD_UNIT_ID)
      // sdkConfig setup...
      sdkConfig.mediatedNetworkConfigurations = [String(describing: AdColonyAdapterConfiguration.self):
      ["appId": "YOUR_AD_COLONY_APP_ID", "allZoneIds" : "{\"zoneId\": \"ZONE_ID_1\", \"zoneId\": \"ZONE_ID_2\"}"]]
      
  • Android:
      // Your MoPub SDK initialization code
      final SdkConfiguration.Builder configBuilder = new SdkConfiguration.Builder("YOUR_MOPUB_AD_UNIT_ID");
      // configBuilder setup...
      Map<String, String> adColonyConfigs = new HashMap<>();
      adColonyConfigs.put("appId", "YOUR_AD_COLONY_APP_ID");
      String[] allZoneIds = new String[]{"ZONE_ID_1", "ZONE_ID_2"};
      adColonyConfigs.put("allZoneIds", Arrays.toString(allZoneIds));
      configBuilder.withMediatedNetworkConfiguration(AdColonyAdapterConfiguration.class.getName(), adColonyConfigs);
    

AdColony Pre Initialization Requirement

On Android, AdColony SDK depends on Google Play Services dependencies to gather the Advertising ID of the Android device. Without this identifier, the AdColony ad server cannot bid on Advanced Bidding requests. Refer to additional AdColony documentation.

Tthe following dependencies must be installed on your Android (and Unity to Android) projects:

  • com.google.android.gms.play-services-ads-base
  • com.google.android.gms.play-services-ads-identifier
  • com.google.android.gms.play-services-ads-lite
  • com.google.android.gms.play-services-basement
  • com.google.android.gms.play-services-measurement-base
  • com.google.android.gms.play-services-measurement-sdk-api

Note that the Advertising ID value is not obtained if the user opts out of ads personalization and limits ad tracking. In this case, AdColony ad server will not bid on Advanced Bidding requests.

For Unity to Android, an additional step is required to ensure that the AdColony SDK initializes early, to serve Advanced Bidding requests. Pass your AdColony app id and zone ids information to MoPub’s initialization sequence:

  • If you’re initializing MoPub automatically by using MoPub Manager Prefab, refer to the Network Configuration section here.

  • If you’re initializing MoPub manually, follow the example here.

Additional Support

For inquiries and support, email AdColony at support@adcolony.com.

Last updated August 24, 2020

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)