Appearance
TopOn Mediation Integration
Supported Ad Formats
| Ad Format | Supported |
|---|---|
| Banner (320×50) | ✅ |
| MREC (300×250) | ✅ |
| Interstitial | ✅ |
| Rewarded | ✅ |
| Native | ✅ |
| Splash (App Open) | ✅ |
Integration Mode
Opera Ads is integrated into TopOn as a custom network and serves through the waterfall: Opera Ads competes with the manual eCPM you configure for the Opera ad source in the TopOn console. Opera Ads is not currently available as an official bidding network on TopOn.
Looking for bidding?
To run your own auction with Opera Ads, see Client Bidding or Server Bidding. Those are a separate integration and are independent of mediation.
Configure Custom Ad Network in TopOn Console
Refer to Custom Network on TopOn Mediation Network Guide for detailed information.
Add Custom Ad Network
- Sign in to the TopOn Console
- Navigate to Mediation → Network → Custom Network
- Click Add Custom Network
Configure Adapter Class Names for Different Ad Formats
TopOn requires separate adapter classes for each ad format:
| Ad Format | iOS Adapter Class Name |
|---|---|
| Native | OpAdxToponNativeAdapter |
| Banner | OpAdxToponBannerAdapter |
| Interstitial | OpAdxToponInterstitialAdapter |
| Rewarded | OpAdxToponRewardVideoAdapter |
| 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"
}| Key | Required | Description |
|---|---|---|
app_id | Yes | Opera Ads Application ID (format: pub{}/ep{}/app{}) |
slot_id | Yes | Opera Ads Placement ID (format: s{}) |
bundle_id | Yes | Your iOS App Store ID (numeric, not the app's bundle identifier) |
Banner Size Configuration
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.15.0'
# Opera Ads TopOn Adapter
pod 'TPNiOSOperaSDKAdapter', '~> 2.15.0.0'
endThen run:
bash
pod installAdditional 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;
}
@endContent URL
Available from v2.15.0.
If the ad sits next to identifiable content, pass that page's URL as a TopOn local extra under the opera_content_url key. The adapter forwards it to the Opera Ads SDK, which sends it as OpenRTB app.content.url so advertisers can map their ads to the surrounding content.
Objective-C:
objective-c
[[ATAdManager sharedManager] loadADWithPlacementID:placementId
extra:@{ @"opera_content_url": @"https://www.opera.com/news/some-article" }
delegate:self];Swift:
swift
ATAdManager.shared().loadAD(withPlacementID: placementId,
extra: ["opera_content_url": "https://www.opera.com/news/some-article"],
delegate: self)The adapter also exports the key as the kOpAdxToponContentUrl constant. It works for every format the adapter supports; non-string values and blank strings are ignored. Pass it in the same extra dictionary whichever load method the format uses — splash, for example, takes loadADWithPlacementID:extra:delegate:containerView:. See Content URL for background.
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.
