From 8ffaa1265aec83e6ccb584c51a5c2baeb62fa683 Mon Sep 17 00:00:00 2001 From: Marcin Komorski Date: Fri, 7 Nov 2025 16:39:31 +0100 Subject: [PATCH 1/2] bidResponseFilter: extend with mediaTypes --- dev-docs/modules/bidResponseFilter.md | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/dev-docs/modules/bidResponseFilter.md b/dev-docs/modules/bidResponseFilter.md index 85f753c272..bb295d1395 100644 --- a/dev-docs/modules/bidResponseFilter.md +++ b/dev-docs/modules/bidResponseFilter.md @@ -23,6 +23,7 @@ Fields that can be configured: - `cat` - Banned categories ids - `adv` - Banned advertiser domains - `attr` - Banned attributes +- `mediaTypes` - Banned bids of mediaTypes not present on adUnit ### Field configuration object @@ -46,7 +47,46 @@ Fields that can be configured: attr: { enforce: false, blockUnknown: false + }, + mediaTypes: { + enforce: true, + blockUnknown: true } } }); ``` + +### Media types configuration + +The new `mediaTypes` parameter allows you to block bids whose mediaType does not match any of the media types declared at the ad unit level. + +### Disabling In-Banner video + +To block bids containing In-Banner Video creatives [IAB Creative Attributes 6 and 7, as defined in the AdCOM 1.0 specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list_creativeattributes), configure the Bid Response Filter module to reject these responses. + +1. Restrict the ad unit to banner only and declare disallowed creative attributes (battr) directly in the ad unit definition: + +```javascript +const adUnit = { + code: 'banner-adunit', + mediaTypes: { + banner: { + battr: [6, 7] // Block In-Banner Video creative attributes + } + }, + bids: [ /* bidder configs */ ] +}; +``` + +2. Enable both the attr and mediaTypes filters in the bidResponseFilter configuration: + +```javascript +pbjs.setConfig({ + bidResponseFilter: { + attr: { enforce: true }, + mediaTypes: { + banner: { enforce: true } + } + } +}); +``` \ No newline at end of file From 99f9eefca89f20d0fe798d4d4d9a74f0cf64a7af Mon Sep 17 00:00:00 2001 From: Marcin Komorski Date: Fri, 7 Nov 2025 16:46:52 +0100 Subject: [PATCH 2/2] lint --- dev-docs/modules/bidResponseFilter.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/modules/bidResponseFilter.md b/dev-docs/modules/bidResponseFilter.md index bb295d1395..2330ead05a 100644 --- a/dev-docs/modules/bidResponseFilter.md +++ b/dev-docs/modules/bidResponseFilter.md @@ -64,7 +64,7 @@ The new `mediaTypes` parameter allows you to block bids whose mediaType does not To block bids containing In-Banner Video creatives [IAB Creative Attributes 6 and 7, as defined in the AdCOM 1.0 specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list_creativeattributes), configure the Bid Response Filter module to reject these responses. -1. Restrict the ad unit to banner only and declare disallowed creative attributes (battr) directly in the ad unit definition: +Restrict the ad unit to banner only and declare disallowed creative attributes (battr) directly in the ad unit definition: ```javascript const adUnit = { @@ -78,7 +78,7 @@ const adUnit = { }; ``` -2. Enable both the attr and mediaTypes filters in the bidResponseFilter configuration: +Enable both the attr and mediaTypes filters in the bidResponseFilter configuration: ```javascript pbjs.setConfig({ @@ -89,4 +89,4 @@ pbjs.setConfig({ } } }); -``` \ No newline at end of file +```