From 3d703e12a4fe65a8ee7e2d99db58f6cd131e8928 Mon Sep 17 00:00:00 2001 From: "asit.sahoo" Date: Fri, 18 Jul 2025 17:42:49 +0530 Subject: [PATCH 1/4] Updated the pubmatic.md file for gzip support --- dev-docs/bidders/pubmatic.md | 126 ++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 40 deletions(-) diff --git a/dev-docs/bidders/pubmatic.md b/dev-docs/bidders/pubmatic.md index 5e6c22a558..e77d5977a5 100644 --- a/dev-docs/bidders/pubmatic.md +++ b/dev-docs/bidders/pubmatic.md @@ -24,7 +24,6 @@ multiformat_supported: will-bid-on-one sidebarType: 1 endpoint_compression: true --- - ### Prebid Server Note {% include dev-docs/pbjs-adapter-required-for-pbs.md %} @@ -33,23 +32,24 @@ endpoint_compression: true {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|--------------------|------------------------------|----------| -| `publisherId` | required | Publisher ID | `'32572'` | `string` | -| `adSlot` | optional | Ad Slot Name (see below)| `'38519891'` | `string` | -| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | -| `lat` | optional | Latitude
(Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | -| `lon` | optional | Longitude
(Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | -| `yob` | optional | Year of Birth | `'1982'` | `string` | -| `gender` | optional | Gender | `'M'` | `string` | -| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | -| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | -| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on.
Values if present in subsequent adunits, will be ignored.) | `string` | -| `dctr` | optional | Deal Custom Targeting
(Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123|key2=345'` | `string` | -| `acat` | optional | Allowed categories
(List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `bcat` | optional | Blocked IAB Categories
(Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `deals` | optional | PMP deals
(Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | -| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | +| Name | Scope | Description | Example | Type | +| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | +| `publisherId` | required | Publisher ID | `'32572'` | `string` | +| `adSlot` | optional | Ad Slot Name (see below) | `'38519891'` | `string` | +| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | +| `lat` | optional | Latitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | +| `lon` | optional | Longitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | +| `yob` | optional | Year of Birth | `'1982'` | `string` | +| `gender` | optional | Gender | `'M'` | `string` | +| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | +| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | +| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on. `` Values if present in subsequent adunits, will be ignored.) | `string` | +| `dctr` | optional | Deal Custom Targeting`` (Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123 | key2=345'` | `string` | +| `acat` | optional | Allowed categories`` (List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `bcat` | optional | Blocked IAB Categories`` (Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `deals` | optional | PMP deals`` (Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | +| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | +| `gzipEnabled` | optional | Enable or disable gzip compression for the bid request | `'true'` | `string` | ### Configuration @@ -76,10 +76,10 @@ The adSlot parameter supports two different formats: {: .table .table-bordered .table-striped } -| Format | Example | -|----------------|----------------------| -| Without Size | `'38519891'` | -| With Size | `'38519891@300x205'` | +| Format | Example | +| ------------ | ---------------------- | +| Without Size | `'38519891'` | +| With Size | `'38519891@300x205'` | adSlot parameter is optional. To omit the adSlot parameter, your publisher account must have default site and tag enabled. Consult your account manager to find out if default site and tag is enabled on your account. If used, both formats are supported. Without Size is the recommended option. Both options will send the ad request with all sizes specified in the Prebid ad unit configuration. @@ -89,22 +89,22 @@ The PubMatic adapter supports video as of Prebid v1.16.0 {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | -| :----------------------| :------- | :---------------------------------------------------------- | :------ | -| `video.mimes` | required | Video MIME types | `['video/mp4','video/x-flv']` | -| `video.skippable` | optional | If 'true', user can skip ad | `true` | -| `video.minduration` | optional | Minimum ad duration in seconds | `5` | -| `video.maxduration` | optional | Maximum ad duration in seconds | `30` | -| `video.startdelay` | optional | Start delay in seconds for pre-roll, mid-roll, or post-roll ad placements | `5` | -| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off
Values:
`1`: Auto-play, sound on
`2`: Auto-play, sound off
`3`: Click-to-play
`4`: mouse-over | `1` | -| `video.api` | optional | API frameworks supported
Values:
`1`: VPAID 1.0
`2`: VPAID 2.0
`3`: MRAID-1
`4`: ORMMA
`5`: MRAID-2 | `[1, 2]` | -| `video.protocols` | optional | Supported video bid response protocols
Values
`1`: VAST 1.0
`2`: VAST 2.0
`3`: VAST 3.0
`4`: VAST 1.0 Wrapper
`5`: VAST 2.0 Wrapper
`6`: VAST 3.0 Wrapper | `[5, 6]` | -| `video.battr` | optional | Blocked creative attributes, See [OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.3 for values | `[3, 9]` | -| `video.linearity` | optional | Indicates if the impression is linear or nonlinear
Values:
`1`: Linear/In-Stream
`2`: Non-Linear/Overlay. | `1` | -| `video.placement` | optional | Video placement type. See [OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.9 for Values | `1` | -| `video.plcmt` | optional | Video placement type. See [OpenRTB 2.6 specification - github](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#327---object-video-), For values [plcmt subtypes](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | -| `video.minbitrate` | optional | Minimum bit rate in Kbps. | 50 | -| `video.maxbitrate` | optional | Maximum bit rate in Kbps. | 70 | +| Name | Scope | Description | Example | +| :----------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------ | +| `video.mimes` | required | Video MIME types | `['video/mp4','video/x-flv']` | +| `video.skippable` | optional | If 'true', user can skip ad | `true` | +| `video.minduration` | optional | Minimum ad duration in seconds | `5` | +| `video.maxduration` | optional | Maximum ad duration in seconds | `30` | +| `video.startdelay` | optional | Start delay in seconds for pre-roll, mid-roll, or post-roll ad placements | `5` | +| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off``Values:`1`: Auto-play, sound on`2`: Auto-play, sound off`3`: Click-to-play`4`: mouse-over | `1` | +| `video.api` | optional | API frameworks supported``Values:`1`: VPAID 1.0`2`: VPAID 2.0`3`: MRAID-1`4`: ORMMA`5`: MRAID-2 | `[1, 2]` | +| `video.protocols` | optional | Supported video bid response protocols``Values`1`: VAST 1.0`2`: VAST 2.0`3`: VAST 3.0`` `4`: VAST 1.0 Wrapper`5`: VAST 2.0 Wrapper`6`: VAST 3.0 Wrapper | `[5, 6]` | +| `video.battr` | optional | Blocked creative attributes, See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.3 for values | `[3, 9]` | +| `video.linearity` | optional | Indicates if the impression is linear or nonlinear``Values:`1`: Linear/In-Stream`2`: Non-Linear/Overlay. | `1` | +| `video.placement` | optional | Video placement type. See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.9 for Values | `1` | +| `video.plcmt` | optional | Video placement type. See[OpenRTB 2.6 specification - github](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#327---object-video-), For values [plcmt subtypes](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | +| `video.minbitrate` | optional | Minimum bit rate in Kbps. | 50 | +| `video.maxbitrate` | optional | Maximum bit rate in Kbps. | 70 | ### AdUnit Format for Video @@ -125,7 +125,7 @@ var videoAdUnits = [ api: [ 1, 2 ], // optional protocols: [ 2, 3 ], // optional battr: [ 13, 14 ], // optional - linearity: 1, // optional + linearity: 1, // optional placement: 2, // optional plcmt: 1, // optional minbitrate: 10, // optional @@ -147,7 +147,7 @@ var videoAdUnits = [ ```javascript var adUnits = [ { - code: 'test-div', + code: 'test-div', mediaTypes: { native: { image: { @@ -234,4 +234,50 @@ AdUnit-specific data is supported using `AdUnit.ortb2Imp.ext.*` ### Endpoint Compression This adapter utilizes gzip compression support built into Prebid.js core. For more information, see [Compression Support for Outgoing Requests](https://docs.prebid.org/dev-docs/bidder-adaptor.html#compression-support-for-outgoing-requests) + +#### Bidder-level Configuration + +You can enable or disable gzip compression at the bidder level using `pbjs.setBidderConfig`. Note that at the bidder level, the `gzipEnabled` value should be a boolean: + +```javascript +pbjs.que.push(function () { + pbjs.setBidderConfig({ + bidders: ['pubmatic'], + config: { + gzipEnabled: true + } + }); +}); +``` + +#### AdUnit-level Configuration + +You can also enable or disable gzip compression at the individual adunit level using the bidder params. Note that the `gzipEnabled` value must be a string, and the key should be added in all adunits. The value from the last adunit takes precedence, so make sure to use the same value across all adunits: + +```javascript +var adUnits = [ + { + code: 'test-div', + mediaTypes: { + banner: { + sizes: [[300, 250], [300, 600]] + } + }, + bids: [ + { + bidder: 'pubmatic', + params: { + publisherId: '156295', + adSlot: 'pubmatic_test@300x250', + pmzoneid: 'zone1,zone2', + kadpageurl: 'www.publisher.com', + kadfloor: '1.75', + gzipEnabled: 'false' // Disable gzip compression for this specific bid request + } + } + ] + } +]; +``` + From ee9d16fc5fed510577a250d45f429374a986acba Mon Sep 17 00:00:00 2001 From: "asit.sahoo" Date: Mon, 21 Jul 2025 15:13:07 +0530 Subject: [PATCH 2/4] Update pubmatic.md --- dev-docs/bidders/pubmatic.md | 77 +++++++++++------------------------- 1 file changed, 23 insertions(+), 54 deletions(-) diff --git a/dev-docs/bidders/pubmatic.md b/dev-docs/bidders/pubmatic.md index e77d5977a5..ebd788164b 100644 --- a/dev-docs/bidders/pubmatic.md +++ b/dev-docs/bidders/pubmatic.md @@ -32,24 +32,23 @@ endpoint_compression: true {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -| `publisherId` | required | Publisher ID | `'32572'` | `string` | -| `adSlot` | optional | Ad Slot Name (see below) | `'38519891'` | `string` | -| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | -| `lat` | optional | Latitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | -| `lon` | optional | Longitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | -| `yob` | optional | Year of Birth | `'1982'` | `string` | -| `gender` | optional | Gender | `'M'` | `string` | -| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | -| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | -| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on. `` Values if present in subsequent adunits, will be ignored.) | `string` | -| `dctr` | optional | Deal Custom Targeting`` (Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123 | key2=345'` | `string` | -| `acat` | optional | Allowed categories`` (List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `bcat` | optional | Blocked IAB Categories`` (Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `deals` | optional | PMP deals`` (Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | -| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | -| `gzipEnabled` | optional | Enable or disable gzip compression for the bid request | `'true'` | `string` | +| Name | Scope | Description | Example | Type | +| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------- | +| `publisherId` | required | Publisher ID | `'32572'` | `string` | +| `adSlot` | optional | Ad Slot Name (see below) | `'38519891'` | `string` | +| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | +| `lat` | optional | Latitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | +| `lon` | optional | Longitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | +| `yob` | optional | Year of Birth | `'1982'` | `string` | +| `gender` | optional | Gender | `'M'` | `string` | +| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | +| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | +| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on. `` Values if present in subsequent adunits, will be ignored.) | `string` | +| `dctr` | optional | Deal Custom Targeting`` (Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123 | key2=345'` | `string` | +| `acat` | optional | Allowed categories`` (List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `bcat` | optional | Blocked IAB Categories`` (Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `deals` | optional | PMP deals`` (Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | +| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | ### Configuration @@ -96,11 +95,11 @@ The PubMatic adapter supports video as of Prebid v1.16.0 | `video.minduration` | optional | Minimum ad duration in seconds | `5` | | `video.maxduration` | optional | Maximum ad duration in seconds | `30` | | `video.startdelay` | optional | Start delay in seconds for pre-roll, mid-roll, or post-roll ad placements | `5` | -| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off``Values:`1`: Auto-play, sound on`2`: Auto-play, sound off`3`: Click-to-play`4`: mouse-over | `1` | -| `video.api` | optional | API frameworks supported``Values:`1`: VPAID 1.0`2`: VPAID 2.0`3`: MRAID-1`4`: ORMMA`5`: MRAID-2 | `[1, 2]` | -| `video.protocols` | optional | Supported video bid response protocols``Values`1`: VAST 1.0`2`: VAST 2.0`3`: VAST 3.0`` `4`: VAST 1.0 Wrapper`5`: VAST 2.0 Wrapper`6`: VAST 3.0 Wrapper | `[5, 6]` | +| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off``Values:`1`: Auto-play, sound on `2`: Auto-play, sound off `3`: Click-to-play `4`: mouse-over | `1` | +| `video.api` | optional | API frameworks supported``Values:`1`: VPAID 1.0 `2`: VPAID 2.0 `3`: MRAID-1 `4`: ORMMA `5`: MRAID-2 | `[1, 2]` | +| `video.protocols` | optional | Supported video bid response protocols ``Values`1`: VAST 1.0`2`: VAST 2.0`3`: VAST 3.0`` `4`: VAST 1.0 Wrapper `5`: VAST 2.0 Wrapper `6`: VAST 3.0 Wrapper | `[5, 6]` | | `video.battr` | optional | Blocked creative attributes, See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.3 for values | `[3, 9]` | -| `video.linearity` | optional | Indicates if the impression is linear or nonlinear``Values:`1`: Linear/In-Stream`2`: Non-Linear/Overlay. | `1` | +| `video.linearity` | optional | Indicates if the impression is linear or nonlinear``Values:`1`: Linear/In-Stream `2`: Non-Linear/Overlay. | `1` | | `video.placement` | optional | Video placement type. See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.9 for Values | `1` | | `video.plcmt` | optional | Video placement type. See[OpenRTB 2.6 specification - github](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#327---object-video-), For values [plcmt subtypes](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | | `video.minbitrate` | optional | Minimum bit rate in Kbps. | 50 | @@ -125,7 +124,7 @@ var videoAdUnits = [ api: [ 1, 2 ], // optional protocols: [ 2, 3 ], // optional battr: [ 13, 14 ], // optional - linearity: 1, // optional + linearity: 1, // optional placement: 2, // optional plcmt: 1, // optional minbitrate: 10, // optional @@ -237,7 +236,7 @@ This adapter utilizes gzip compression support built into Prebid.js core. For mo #### Bidder-level Configuration -You can enable or disable gzip compression at the bidder level using `pbjs.setBidderConfig`. Note that at the bidder level, the `gzipEnabled` value should be a boolean: +You can enable or disable gzip compression at the bidder level using `pbjs.setBidderConfig`. `gzipEnabled` value should be a boolean: ```javascript pbjs.que.push(function () { @@ -250,34 +249,4 @@ pbjs.que.push(function () { }); ``` -#### AdUnit-level Configuration - -You can also enable or disable gzip compression at the individual adunit level using the bidder params. Note that the `gzipEnabled` value must be a string, and the key should be added in all adunits. The value from the last adunit takes precedence, so make sure to use the same value across all adunits: - -```javascript -var adUnits = [ - { - code: 'test-div', - mediaTypes: { - banner: { - sizes: [[300, 250], [300, 600]] - } - }, - bids: [ - { - bidder: 'pubmatic', - params: { - publisherId: '156295', - adSlot: 'pubmatic_test@300x250', - pmzoneid: 'zone1,zone2', - kadpageurl: 'www.publisher.com', - kadfloor: '1.75', - gzipEnabled: 'false' // Disable gzip compression for this specific bid request - } - } - ] - } -]; -``` - From bbc109b2836ab0c6bf4af3007ee2ccdf7987680d Mon Sep 17 00:00:00 2001 From: "asit.sahoo" Date: Mon, 21 Jul 2025 15:21:31 +0530 Subject: [PATCH 3/4] Update pubmatic.md --- dev-docs/bidders/pubmatic.md | 95 +++++++++++++++--------------------- 1 file changed, 40 insertions(+), 55 deletions(-) diff --git a/dev-docs/bidders/pubmatic.md b/dev-docs/bidders/pubmatic.md index ebd788164b..5e6c22a558 100644 --- a/dev-docs/bidders/pubmatic.md +++ b/dev-docs/bidders/pubmatic.md @@ -24,6 +24,7 @@ multiformat_supported: will-bid-on-one sidebarType: 1 endpoint_compression: true --- + ### Prebid Server Note {% include dev-docs/pbjs-adapter-required-for-pbs.md %} @@ -32,23 +33,23 @@ endpoint_compression: true {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -| `publisherId` | required | Publisher ID | `'32572'` | `string` | -| `adSlot` | optional | Ad Slot Name (see below) | `'38519891'` | `string` | -| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | -| `lat` | optional | Latitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | -| `lon` | optional | Longitude`` (Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | -| `yob` | optional | Year of Birth | `'1982'` | `string` | -| `gender` | optional | Gender | `'M'` | `string` | -| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | -| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | -| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on. `` Values if present in subsequent adunits, will be ignored.) | `string` | -| `dctr` | optional | Deal Custom Targeting`` (Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123 | key2=345'` | `string` | -| `acat` | optional | Allowed categories`` (List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `bcat` | optional | Blocked IAB Categories`` (Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | -| `deals` | optional | PMP deals`` (Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | -| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | +| Name | Scope | Description | Example | Type | +|---------------|----------|--------------------|------------------------------|----------| +| `publisherId` | required | Publisher ID | `'32572'` | `string` | +| `adSlot` | optional | Ad Slot Name (see below)| `'38519891'` | `string` | +| `pmzoneid` | optional | Zone ID | `'zone1,zone2'` | `string` | +| `lat` | optional | Latitude
(Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'40.712775'` | `string` | +| `lon` | optional | Longitude
(Supported until Prebid version 7.54.4 and starting from Prebid version 8.11.0 we have option to configure this using ortb2.(device OR user)) | `'-74.005973'` | `string` | +| `yob` | optional | Year of Birth | `'1982'` | `string` | +| `gender` | optional | Gender | `'M'` | `string` | +| `kadpageurl` | optional | Overrides Page URL | `'http://www.yahoo.com/'` | `string` | +| `kadfloor` | optional | Bid Floor | `'1.75'` | `string` | +| `currency` | optional | Bid currency | `'AUD'` (Value configured only in the 1st adunit will be passed on.
Values if present in subsequent adunits, will be ignored.) | `string` | +| `dctr` | optional | Deal Custom Targeting
(Value configured in each adunit will be passed on inside adunit configs i.e. imp.ext), `'key1=123|key2=345'` | `string` | +| `acat` | optional | Allowed categories
(List of allowed categories for a given auction to be sent in either using ortb2 config (request.ext.prebid.bidderparams.pubmatic.acat) or using slot level params. If categories sent using both then priority will be given to ortb2 over slot level params.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `bcat` | optional | Blocked IAB Categories
(Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.) | `[ 'IAB1-5', 'IAB1-6', 'IAB1-7' ]` | `array of strings` | +| `deals` | optional | PMP deals
(Values from each slot will be passed per slot. An array of strings only. Each deal-id should be a string of a length of more than 3 characters.) | `[ 'deal-id-5', 'deal-id-6', 'deal-id-7' ]` | `array of strings` | +| `outstreamAU` | optional | Oustream AdUnit described in Blue BillyWig UI. This field is mandatory if mimeType is described as video and context is outstream (i.e., for outstream videos) | `'renderer_test_pubmatic'` | `string` | ### Configuration @@ -75,10 +76,10 @@ The adSlot parameter supports two different formats: {: .table .table-bordered .table-striped } -| Format | Example | -| ------------ | ---------------------- | -| Without Size | `'38519891'` | -| With Size | `'38519891@300x205'` | +| Format | Example | +|----------------|----------------------| +| Without Size | `'38519891'` | +| With Size | `'38519891@300x205'` | adSlot parameter is optional. To omit the adSlot parameter, your publisher account must have default site and tag enabled. Consult your account manager to find out if default site and tag is enabled on your account. If used, both formats are supported. Without Size is the recommended option. Both options will send the ad request with all sizes specified in the Prebid ad unit configuration. @@ -88,22 +89,22 @@ The PubMatic adapter supports video as of Prebid v1.16.0 {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | -| :----------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------ | -| `video.mimes` | required | Video MIME types | `['video/mp4','video/x-flv']` | -| `video.skippable` | optional | If 'true', user can skip ad | `true` | -| `video.minduration` | optional | Minimum ad duration in seconds | `5` | -| `video.maxduration` | optional | Maximum ad duration in seconds | `30` | -| `video.startdelay` | optional | Start delay in seconds for pre-roll, mid-roll, or post-roll ad placements | `5` | -| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off``Values:`1`: Auto-play, sound on `2`: Auto-play, sound off `3`: Click-to-play `4`: mouse-over | `1` | -| `video.api` | optional | API frameworks supported``Values:`1`: VPAID 1.0 `2`: VPAID 2.0 `3`: MRAID-1 `4`: ORMMA `5`: MRAID-2 | `[1, 2]` | -| `video.protocols` | optional | Supported video bid response protocols ``Values`1`: VAST 1.0`2`: VAST 2.0`3`: VAST 3.0`` `4`: VAST 1.0 Wrapper `5`: VAST 2.0 Wrapper `6`: VAST 3.0 Wrapper | `[5, 6]` | -| `video.battr` | optional | Blocked creative attributes, See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.3 for values | `[3, 9]` | -| `video.linearity` | optional | Indicates if the impression is linear or nonlinear``Values:`1`: Linear/In-Stream `2`: Non-Linear/Overlay. | `1` | -| `video.placement` | optional | Video placement type. See[OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.9 for Values | `1` | -| `video.plcmt` | optional | Video placement type. See[OpenRTB 2.6 specification - github](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#327---object-video-), For values [plcmt subtypes](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | -| `video.minbitrate` | optional | Minimum bit rate in Kbps. | 50 | -| `video.maxbitrate` | optional | Maximum bit rate in Kbps. | 70 | +| Name | Scope | Description | Example | +| :----------------------| :------- | :---------------------------------------------------------- | :------ | +| `video.mimes` | required | Video MIME types | `['video/mp4','video/x-flv']` | +| `video.skippable` | optional | If 'true', user can skip ad | `true` | +| `video.minduration` | optional | Minimum ad duration in seconds | `5` | +| `video.maxduration` | optional | Maximum ad duration in seconds | `30` | +| `video.startdelay` | optional | Start delay in seconds for pre-roll, mid-roll, or post-roll ad placements | `5` | +| `video.playbackmethod` | optional | Defines whether inventory is user-initiated or autoplay sound on/off
Values:
`1`: Auto-play, sound on
`2`: Auto-play, sound off
`3`: Click-to-play
`4`: mouse-over | `1` | +| `video.api` | optional | API frameworks supported
Values:
`1`: VPAID 1.0
`2`: VPAID 2.0
`3`: MRAID-1
`4`: ORMMA
`5`: MRAID-2 | `[1, 2]` | +| `video.protocols` | optional | Supported video bid response protocols
Values
`1`: VAST 1.0
`2`: VAST 2.0
`3`: VAST 3.0
`4`: VAST 1.0 Wrapper
`5`: VAST 2.0 Wrapper
`6`: VAST 3.0 Wrapper | `[5, 6]` | +| `video.battr` | optional | Blocked creative attributes, See [OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.3 for values | `[3, 9]` | +| `video.linearity` | optional | Indicates if the impression is linear or nonlinear
Values:
`1`: Linear/In-Stream
`2`: Non-Linear/Overlay. | `1` | +| `video.placement` | optional | Video placement type. See [OpenRTB 2.5 specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf), List 5.9 for Values | `1` | +| `video.plcmt` | optional | Video placement type. See [OpenRTB 2.6 specification - github](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#327---object-video-), For values [plcmt subtypes](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | +| `video.minbitrate` | optional | Minimum bit rate in Kbps. | 50 | +| `video.maxbitrate` | optional | Maximum bit rate in Kbps. | 70 | ### AdUnit Format for Video @@ -124,7 +125,7 @@ var videoAdUnits = [ api: [ 1, 2 ], // optional protocols: [ 2, 3 ], // optional battr: [ 13, 14 ], // optional - linearity: 1, // optional + linearity: 1, // optional placement: 2, // optional plcmt: 1, // optional minbitrate: 10, // optional @@ -146,7 +147,7 @@ var videoAdUnits = [ ```javascript var adUnits = [ { - code: 'test-div', + code: 'test-div', mediaTypes: { native: { image: { @@ -233,20 +234,4 @@ AdUnit-specific data is supported using `AdUnit.ortb2Imp.ext.*` ### Endpoint Compression This adapter utilizes gzip compression support built into Prebid.js core. For more information, see [Compression Support for Outgoing Requests](https://docs.prebid.org/dev-docs/bidder-adaptor.html#compression-support-for-outgoing-requests) - -#### Bidder-level Configuration - -You can enable or disable gzip compression at the bidder level using `pbjs.setBidderConfig`. `gzipEnabled` value should be a boolean: - -```javascript -pbjs.que.push(function () { - pbjs.setBidderConfig({ - bidders: ['pubmatic'], - config: { - gzipEnabled: true - } - }); -}); -``` - From 4c7ae85edb01958d73f8f1d97ea64c2abb439dea Mon Sep 17 00:00:00 2001 From: "asit.sahoo" Date: Mon, 21 Jul 2025 15:24:24 +0530 Subject: [PATCH 4/4] Updated doc to disable gzip in bidder config --- dev-docs/bidders/pubmatic.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dev-docs/bidders/pubmatic.md b/dev-docs/bidders/pubmatic.md index 5e6c22a558..1f7d27767e 100644 --- a/dev-docs/bidders/pubmatic.md +++ b/dev-docs/bidders/pubmatic.md @@ -234,4 +234,20 @@ AdUnit-specific data is supported using `AdUnit.ortb2Imp.ext.*` ### Endpoint Compression This adapter utilizes gzip compression support built into Prebid.js core. For more information, see [Compression Support for Outgoing Requests](https://docs.prebid.org/dev-docs/bidder-adaptor.html#compression-support-for-outgoing-requests) + +#### Disabling Compression + +You can disable gzip compression at the bidder level using `pbjs.setBidderConfig`. Set the `gzipEnabled` value to false: + +```javascript +pbjs.que.push(function () { + pbjs.setBidderConfig({ + bidders: ['pubmatic'], + config: { + gzipEnabled: false + } + }); +}); +``` +