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
val adPlacementSettings = TeadsAdPlacementSettings.Builder()
.enableDebug()
.build()
val adRequestSettings = TeadsAdRequestSettings.Builder()
.pageUrl(Uri.parse("https://example.com/article"))
.build()
val mediaPlacement = TeadsAdPlacementMedia(this, 84242, adPlacementSettings, this)
mediaPlacement.requestAd(adRequestSettings)
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
val adPlacementSettings = TeadsAdPlacementSettings.Builder()
.enableDebug()
.build()
val adRequestSettings = TeadsAdRequestSettings.Builder()
.pageUrl(Uri.parse("https://example.com/article"))
.build()
val mediaNativePlacement = TeadsAdPlacementMediaNative(this, 124859, adPlacementSettings, this)
mediaNativePlacement.requestAd(adRequestSettings)
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 | null | Optional user identifier |
| Dark Mode | true | Enable dark mode for testing |
Usage Example
- Kotlin
- Java
val config = TeadsAdPlacementFeedConfig(
articleUrl = Uri.parse("https://test-demo.outbrain.com"),
widgetId = "MB_1",
installationKey = "NANOWDGT01",
widgetIndex = 0,
userId = null,
darkMode = true,
testDisplay = false,
extId = null,
extSecondaryId = null,
obPubImpl = null
)
val feedPlacement = TeadsAdPlacementFeed(this, config, this) // context (this) MUST be an Activity
val feedView = feedPlacement.loadAd()
TeadsAdPlacementFeedConfig config = new TeadsAdPlacementFeedConfig(
Uri.parse("https://test-demo.outbrain.com"), // articleUrl
"MB_1", // widgetId
"NANOWDGT01", // installationKey
0, // widgetIndex
null, // userId
true, // darkMode
false, // testDisplay
null, // extId
null, // extSecondaryId
null // obPubImpl
);
TeadsAdPlacementFeed feedPlacement = new TeadsAdPlacementFeed(this, config, this); // context (this) MUST be an Activity
FrameLayout feedView = feedPlacement.loadAd(); // real method is loadAd() — the Kotlin sample's .load() doesn't exist on TeadsAdPlacementFeed
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 | null | Optional user identifier |
| Dark Mode | true | Enable dark mode for testing |
Usage Example
- Kotlin
- Java
val config = TeadsAdPlacementRecommendationsConfig(
Uri.parse("https://test-demo.outbrain.com"),
"SDK_1" // Your unique Placement ID
)
val recommendationsPlacement = TeadsAdPlacementRecommendations(config, this)
recommendationsPlacement.loadAd().subscribe { recommendations ->
// Handle the loaded recommendations
}
TeadsAdPlacementRecommendationsConfig config = new TeadsAdPlacementRecommendationsConfig(
Uri.parse("https://test-demo.outbrain.com"),
"SDK_1" // Your unique Placement ID
);
// TeadsAdPlacementRecommendations has no Context parameter (unlike the other placements)
// and no .load() method — real API is .loadAd().subscribe(...)
TeadsAdPlacementRecommendations recommendationsPlacement = new TeadsAdPlacementRecommendations(config, this);
recommendationsPlacement.loadAd().subscribe(recommendations -> {
// Handle the loaded recommendations
});
Interstitial Placement Test Configuration
Use this configuration to test interstitial fullscreen ads — it applies both to the direct integration and to AdMob / Google Ad Manager 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
- Kotlin
- Java
val config = TeadsAdPlacementInterstitialConfig(
articleUrl = "https://mobile-demo.outbrain.com",
widgetId = "INT_APP_1",
installationKey = "NANOWDGT01"
)
val interstitial = TeadsAdPlacementInterstitial(this, config, this) // this must be an Activity
interstitial.loadAd()
TeadsAdPlacementInterstitialConfig config = new TeadsAdPlacementInterstitialConfig(
"https://mobile-demo.outbrain.com", // articleUrl
"INT_APP_1", // widgetId
"NANOWDGT01" // installationKey
);
TeadsAdPlacementInterstitial interstitial = new TeadsAdPlacementInterstitial(this, config, this); // this must be an Activity
interstitial.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"}
- Kotlin
- Java
MobileAds.initialize(context)
val adRequest = AdRequest.Builder().build()
InterstitialAd.load(
context,
"YOUR_AD_UNIT_ID", // Ad unit id obtained from Google mediation platform
adRequest,
object : InterstitialAdLoadCallback() {
override fun onAdLoaded(ad: InterstitialAd) {
// Ad loaded successfully
}
override fun onAdFailedToLoad(error: LoadAdError) {
// Handle error
}
}
)
MobileAds.initialize(context);
AdRequest adRequest = new AdRequest.Builder().build();
InterstitialAd.load(
context,
"YOUR_AD_UNIT_ID", // Ad unit id obtained from Google mediation platform
adRequest,
new InterstitialAdLoadCallback() {
@Override
public void onAdLoaded(InterstitialAd ad) {
// Ad loaded successfully
}
@Override
public void onAdFailedToLoad(LoadAdError error) {
// Handle error
}
}
);
Banner Placement Test Configuration
Use this configuration to test the anchored Banner — 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 | MB_10 | Test widget identifier |
| Installation Key | NANOWDGT01 | Test installation key |
Usage Example - Direct Integration
- Kotlin
- Java
val config = TeadsAdPlacementBannerConfig(
articleUrl = "https://mobile-demo.outbrain.com/".toUri(),
widgetId = "MB_10",
installationKey = "NANOWDGT01",
widgetIndex = 0
)
val banner = TeadsAdPlacementBanner(this, config, this) // context (this) MUST be an Activity
findViewById<FrameLayout>(R.id.banner_container).addView(banner.loadAd())
TeadsAdPlacementBannerConfig config = new TeadsAdPlacementBannerConfig(
Uri.parse("https://mobile-demo.outbrain.com/"), // articleUrl
"MB_10", // widgetId
"NANOWDGT01", // installationKey
0 // widgetIndex
);
TeadsAdPlacementBanner banner = new TeadsAdPlacementBanner(this, config, this); // context (this) MUST be an Activity
((FrameLayout) findViewById(R.id.banner_container)).addView(banner.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":"MB_10","installationKey":"NANOWDGT01"}