Test PIDs and Configurations
Use these IDs in development only.
Media Placement Test PIDs
Use these PIDs to test different creative formats and orientations:
| PID | Description | Creative Format |
|---|---|---|
| 84242 | Landscape creatives only | Landscape |
| 127546 | Vertical creatives only | Vertical |
| 127547 | Square creatives only | Square |
| 128779 | Carousel creatives only | Carousel |
| 128780 | Multiple creative sizes & formats | Mixed formats |
Usage Example
let config = TeadsAdPlacementMediaConfig(
pid: 84242,
articleUrl: URL(string: "https://example.com/article"),
enableValidationMode: true
)
let mediaPlacement = TeadsAdPlacementMedia(config, delegate: self)
do {
let adView = try mediaPlacement.loadAd()
// Add adView to your view hierarchy
} catch {
print("Failed to load ad: \(error)")
}
Media Native Placement Test PIDs
Media Native Ads
Use this PID to test Media Native with custom layouts:
| PID | Description | Creative Format |
|---|---|---|
| 124859 | Display creatives only | Native creatives with custom rendering |
Usage Example
let config = TeadsAdPlacementMediaConfig(
pid: 124859,
articleUrl: URL(string: "https://example.com/article")
)
let mediaNativePlacement = TeadsAdPlacementMediaNative(config, delegate: self)
do {
let binder = try mediaNativePlacement.loadAd()
binder(nativeAdView) // Your custom TeadsNativeAdView
} catch {
print("Failed to load native ad: \(error)")
}
Feed Placement Test Configuration
Use this configuration to test content recommendation widgets:
| Parameter | Value | Description |
|---|---|---|
| Article URL | https://test-demo.outbrain.com | Test article URL for content recommendations |
| Widget ID | MB_1, MB_2, TEST_FEED | Test widget identifiers |
| Installation Key | NANOWDGT01, TESTKEY01 | Test installation keys |
| User ID | nil | Optional user identifier |
| Dark Mode | true | Enable dark mode for testing |
Usage Example
let config = TeadsAdPlacementFeedConfig(
articleUrl: URL(string: "https://test-demo.outbrain.com")!,
widgetId: "MB_1",
installationKey: "NANOWDGT01",
widgetIndex: 0,
userId: nil,
darkMode: true,
extId: nil,
extSecondaryId: nil,
obPubImp: nil
)
let feedPlacement = TeadsAdPlacementFeed(config, delegate: self)
do {
let feedView = try feedPlacement.loadAd()
// Add feedView to your view hierarchy
} catch {
print("Failed to load feed: \(error)")
}
To show a placeholder without a live request, set TeadsAdPlacementFeed.testDisplay = true before creating the placement.
Recommendations API Test Configuration
Use this configuration to test programmatic content recommendations:
| Parameter | Value | Description |
|---|---|---|
| Article URL | https://test-demo.outbrain.com | Test article URL for content recommendations |
| Widget ID | SDK_1, RECS_1, TEST_RECS | Test recommendations identifiers |
| Installation Key | NANOWDGT01, TESTKEY01 | Test installation keys |
| User ID | nil | Optional user identifier |
| Dark Mode | true | Enable dark mode for testing |
Usage Example
let config = TeadsAdPlacementRecommendationsURLConfig(
articleUrl: URL(string: "https://test-demo.outbrain.com")!,
widgetId: "SDK_1"
)
let recommendationsPlacement = TeadsAdPlacementRecommendations(config, delegate: self)
recommendationsPlacement.loadAd { response in
for recommendation in response.recommendations {
print("Title: \(recommendation.content)")
}
}
Interstitial Placement Test Configuration
Use this configuration to test interstitial fullscreen ads — it applies both to the direct integration and to AdMob/GAM mediation:
| Parameter | Value | Description |
|---|---|---|
| Article URL | https://mobile-demo.outbrain.com | Test article URL |
| Widget ID | INT_APP_1 | Test widget identifier |
| Installation Key | NANOWDGT01 | Test installation key |
Usage Example - Direct Integration
import TeadsSDK
let config = TeadsAdPlacementInterstitialConfig(
articleUrl: URL(string: "https://mobile-demo.outbrain.com")!,
widgetId: "INT_APP_1",
installationKey: "NANOWDGT01"
)
let placement = Teads.createPlacement(with: config, delegate: self)
placement.loadAd()
Usage Example - AdMob / Google Ad Manager Mediation
Configure the following JSON as the custom event parameter on the Google mediation setup platform:
{"articleUrl":"https://mobile-demo.outbrain.com","widgetId":"INT_APP_1","installationKey":"NANOWDGT01"}
Swift-only: this sample uses only GoogleMobileAds' own Swift overlay API (Request, InterstitialAd), not the Teads SDK directly — these third-party class/selector names are not independently verified against GoogleMobileAds' Objective-C headers, so no Objective-C translation is provided here (see the ground-truth notes on GoogleMobileAds types).
import GoogleMobileAds
let request = Request()
InterstitialAd.load(
with: "YOUR_AD_UNIT_ID", // Ad unit id obtained from Google mediation platform
request: request
) { ad, error in
if let error = error {
print("Failed to load interstitial ad: \(error.localizedDescription)")
return
}
// Ad loaded successfully
}
Banner Placement Test Configuration
Use this configuration to test the anchored Banner — it applies both to the direct integration and to AdMob mediation:
| Parameter | Value | Description |
|---|---|---|
| Article URL | https://mobile-demo.outbrain.com/ | Test article URL |
| Widget ID | MB_10 | Test widget identifier |
| Installation Key | NANOWDGT01 | Test installation key |
Usage Example - Direct Integration
- Swift
- Objective-C
import TeadsSDK
let config = TeadsAdPlacementBannerConfig(
articleUrl: URL(string: "https://mobile-demo.outbrain.com/")!,
widgetId: "MB_10",
installationKey: "NANOWDGT01",
widgetIndex: 0
)
let placement = TeadsAdPlacementBanner(config, delegate: self)
let adView = try placement.loadAd()
view.addSubview(adView)
@import TeadsSDK;
// TeadsAdPlacementBannerConfig is a Swift struct and doesn't bridge to Objective-C;
// use the convenience initializer instead (it has no widgetIndex parameter, unlike Feed).
// Use getAdView() instead of loadAd() — the Swift loadAd() on this class returns a
// non-bridgeable existential type.
NSURL *articleUrl = [NSURL URLWithString:@"https://mobile-demo.outbrain.com/"];
TeadsAdPlacementBanner *placement = [[TeadsAdPlacementBanner alloc]
initWithArticleUrl:articleUrl
widgetId:@"MB_10"
installationKey:@"NANOWDGT01"
userId:nil
darkMode:NO
extId:nil
extSecondaryId:nil
obPubImp:nil
delegate:self];
UIView *adView = [placement getAdView];
[view addSubview:adView];
Usage Example - AdMob Mediation
Configure the following JSON as the custom event parameter on the Google mediation setup platform:
{"articleUrl":"https://mobile-demo.outbrain.com/","widgetId":"MB_10","installationKey":"NANOWDGT01"}