diff --git a/dev-docs/bidders/stackadapt.md b/dev-docs/bidders/stackadapt.md index 08c57e01fa..64df149f08 100644 --- a/dev-docs/bidders/stackadapt.md +++ b/dev-docs/bidders/stackadapt.md @@ -4,12 +4,12 @@ title: StackAdapt description: StackAdapt Prebid Bidder Adapter biddercode: stackadapt pbjs: true -pbs: false +pbs: true gvl_id: 238 tcfeu_supported: true usp_supported: true userId: all -media_types: banner, video +media_types: banner, video, native, audio coppa_supported: true gpp_sids: tcfeu, tcfca, usnat, usstate_all, usp gpp_supported: true @@ -25,15 +25,22 @@ prebid_member: false sidebarType: 1 --- +### Note + +- Prebid.js supports `banner` and `video` format only. +- Prebid Server supports `banner`, `video`, `native`, and `audio` formats. +- `supplyId` is required for Prebid Server only. It identifies the supply source and is provided by StackAdapt. + ### Bid Params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|-----------------------------|--------------------|----------| -| `publisherId` | required | StackAdapt provided id | `'4cd53a92ra91'` | `string` | -| `placementId` | optional | StackAdapt provided id | `'e95365f397a7'` | `string` | -| `banner` | optional | banner supporting expdir | `{expdir: [1, 3]}` | `object` | -| `bidfloor` | optional | bid floor price | `1.01` | `float` | +| Name | Scope | Description | Example | Type | +|---------------|--------------------|-------------------------------------------|--------------------|----------| +| `publisherId` | required | StackAdapt provided id | `'4cd53a92ra91'` | `string` | +| `supplyId` | required (PBS only)| Supply source ID, provided by StackAdapt | `'ssp-1'` | `string` | +| `placementId` | optional | StackAdapt provided id | `'e95365f397a7'` | `string` | +| `banner` | optional | banner supporting expdir | `{expdir: [1, 3]}` | `object` | +| `bidfloor` | optional | bid floor price | `1.01` | `float` | The following banner parameters are supported: @@ -65,6 +72,7 @@ Below are banner ad unit examples with required and optional parameters: bidder: 'stackadapt', params: { publisherId: '4cd53a92ra91', + supplyId: '9891', } }] }, @@ -81,6 +89,7 @@ Below are banner ad unit examples with required and optional parameters: bidder: 'stackadapt', params: { publisherId: '4cd53a92ra91', + supplyId: '9891', placementId: 'e95365f397a7', bidfloor: 1.01, banner: { @@ -119,6 +128,7 @@ Below are video ad unit examples with required and optional parameters: bidder: 'stackadapt', params: { publisherId: '4cd53a92ra91', + supplyId: '9891', } }] }, @@ -148,6 +158,151 @@ Below are video ad unit examples with required and optional parameters: bidder: 'stackadapt', params: { publisherId: '4cd53a92ra91', + supplyId: '9891', + placementId: 'e95365f397a7', + bidfloor: 1.01, + } + }] + } + ]; +``` + +### Native + +#### `mediaTypes.native` Parameters + +The StackAdapt bid adapter requires `request` to be defined with a valid native request payload containing `assets`. +The `request` field is a JSON-encoded string following the [OpenRTB Native Ads Specification](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf). Each asset in the request must include at least one image (type 3 for main image) or video asset. +See [mediaTypes.native](https://docs.prebid.org/dev-docs/adunit-reference.html#adUnit.mediaTypes.native) for defining mediaTypes parameters. + +Below are native ad unit examples with required and optional parameters: + +```js + var adUnits = [ + // Native adUnit - required parameters + { + code: 'div-test-ad-5', + mediaTypes: { + native: { + ortb: { + ver: '1.1', + assets: [ + { + id: 1, + required: 1, + img: { + type: 3, + w: 1200, + h: 627 + } + } + ] + } + } + }, + bids: [{ + bidder: 'stackadapt', + params: { + publisherId: '4cd53a92ra91', + supplyId: '9891', + } + }] + }, + // Native adUnit - including optional parameters + { + code: 'div-test-ad-6', + mediaTypes: { + native: { + ortb: { + ver: '1.1', + assets: [ + { + id: 1, + required: 1, + title: { + len: 90 + } + }, + { + id: 2, + required: 0, + data: { + type: 2, + len: 140 + } + }, + { + id: 3, + required: 1, + img: { + type: 3, + w: 1200, + h: 627 + } + } + ] + } + } + }, + bids: [{ + bidder: 'stackadapt', + params: { + publisherId: '4cd53a92ra91', + supplyId: '9891', + placementId: 'e95365f397a7', + bidfloor: 1.01, + } + }] + } + ]; +``` + +### Audio + +#### `mediaTypes.audio` Parameters + +The StackAdapt bid adapter requires `mimes` and `protocols` to be defined in valid format. +See [mediaTypes.audio](https://docs.prebid.org/dev-docs/adunit-reference.html#adUnit.mediaTypes.audio) for defining mediaTypes parameters. + +Below are audio ad unit examples with required and optional parameters: + +```js + var adUnits = [ + // Audio adUnit - required parameters + { + code: 'div-test-ad-7', + mediaTypes: { + audio: { + mimes: ['audio/mp4', 'audio/mpeg'], + protocols: [2, 3, 5, 6] + } + }, + bids: [{ + bidder: 'stackadapt', + params: { + publisherId: '4cd53a92ra91', + supplyId: '9891', + } + }] + }, + // Audio adUnit - including optional parameters + { + code: 'div-test-ad-8', + mediaTypes: { + audio: { + mimes: ['audio/mp4', 'audio/mpeg', 'audio/ogg'], + protocols: [2, 3, 5, 6, 7, 8], + minduration: 5, + maxduration: 30, + startdelay: 0, + api: [1, 2] + } + }, + bids: [{ + bidder: 'stackadapt', + params: { + publisherId: '4cd53a92ra91', + supplyId: '9891', placementId: 'e95365f397a7', bidfloor: 1.01, }