Skip to content

TopOn Mediation Integration

Supported Ad Formats

TopOn Ad FormatMinimum required version of Opera adapter
Native2.0.0.0
Banner2.0.0.0
Interstitial2.0.0.0
Rewarded2.0.0.0
Splash (App Open)2.5.0.0

Configure Custom Ad Network in TopOn Console

Refer to Custom Network on TopOn Mediation Network Guide for detailed information.

Add Custom Ad Network

  1. Sign in to the TopOn Console
  2. Navigate to MediationNetworkCustom Network
  3. Click Add Custom Network

Configure Adapter Class Names for Different Ad Formats

TopOn requires separate adapter classes for each ad format:

Ad FormatiOS Adapter Class Name
NativeOpAdxToponNativeAdapter
BannerOpAdxToponBannerAdapter
InterstitialOpAdxToponInterstitialAdapter
RewardedOpAdxToponRewardVideoAdapter
Splash (App Open)OpAdxToponAppOpenAdapter

Custom Parameters

For each ad unit, configure the custom data in JSON format:

json
{
  "app_id": "pub13423013211200/ep13423013211584/app14170937163904",
  "slot_id": "s14170965187264",
  "bundle_id": "1444253128"
}
KeyRequiredDescription
app_idYesOpera Ads Application ID (format: pub{}/ep{}/app{})
slot_idYesOpera Ads Placement ID (format: s{})
bundle_idYesYour iOS App Store ID

When adding an "Ad Source" for a Banner ad unit on TopOn console, set the correct size:

  • BANNER: 320x50 (in DP)
  • MREC: 300x250 (in DP)

Also, make sure Bottom Ads is enabled for Opera Ads network to be the backfill ad network for unbidded requests.

Add Dependencies

Add to your Podfile:

ruby
platform :ios, '13.0'

target 'YourApp' do
  use_frameworks!

  # TopOn SDK
  pod 'TPNiOS', '>= 6.5.34'

  # Opera Ads SDK
  pod 'OpAdxSdk', '~> 2.9.1'

  # Opera Ads TopOn Adapter
  pod 'OpAdxAdapterTopon', '~> 2.9.1.0'
end

Then run:

bash
pod install

Additional Code Required

The TopOn SDK automatically initializes the Opera Ads SDK through the adapter.

Initialize TopOn SDK

Swift:

swift
import AnyThinkSDK

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        // Initialize TopOn SDK
        ATAPI.initSDK(
            withAppID: "YOUR_TOPON_APP_ID",
            appKey: "YOUR_TOPON_APP_KEY"
        ) { error in
            if let error = error {
                print("TopOn initialization failed: \(error)")
            } else {
                print("TopOn SDK initialized")
            }
        }

        // Opera Ads SDK will be auto-initialized by the adapter

        return true
    }
}

Objective-C:

objective-c
#import <AnyThinkSDK/AnyThinkSDK.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Initialize TopOn SDK
    [[ATAPI sharedInstance] initSDKWithAppID:@"YOUR_TOPON_APP_ID"
                                      appKey:@"YOUR_TOPON_APP_KEY"
                           completionHandler:^(NSError *error) {
        if (error) {
            NSLog(@"TopOn initialization failed: %@", error);
        } else {
            NSLog(@"TopOn SDK initialized");
        }
    }];

    // Opera Ads SDK will be auto-initialized by the adapter

    return YES;
}

@end

Privacy Compliance

GDPR

Please refer to GDPR. The Opera Ads SDK reads the application's consent string automatically.

COPPA

Please refer to COPPA. You can set COPPA status via the SDK init config's .coppa() builder method.

CCPA (US Privacy)

Please refer to US Privacy. You can set the CCPA status via the SDK init config's .usPrivacy() builder method.