From bf8530dcbf8d93b4c029150013b8d623cb2c2c9e Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Mon, 22 Jan 2018 17:51:39 -0500 Subject: [PATCH 01/45] Add first draft of ad unit reference --- dev-docs/adunit-reference.md | 220 +++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 dev-docs/adunit-reference.md diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md new file mode 100644 index 0000000000..7e932cc5b8 --- /dev/null +++ b/dev-docs/adunit-reference.md @@ -0,0 +1,220 @@ +--- +layout: page +title: Ad Unit Reference +description: Ad Unit Reference +top_nav_section: dev_docs +nav_section: reference +pid: 10 +--- + +
+ +# Ad Unit Reference +{:.no_toc} + +Correctly configuring the `adUnit` object is of central importance to setting up Prebid.js on your site. + +This page is an API reference describing all the features of the `adUnit`. + +{: .alert.alert-success :} +This page is a work in progress. Over time, we will be pointing all `adUnit`-related documentation at this page. We are releasing it now in the hopes that it will be useful even in its incomplete state. + +* TOC +{:toc} + +## `adUnit` + +See the table below for the list of properties on the ad unit. For example ad units, see the [Examples](#addAdUnits-Examples) below. + + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|--------------+----------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | +| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, prefer one of the `mediaTypes.*.sizes` listed below. | +| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#bids) below. | +| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [Media Types](#mediatypes) below. | +| `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | +| `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | + + + +### `adUnit.bids` + +See the table below for the list of properties in the `bids` array of the ad unit. For example ad units, see the [Examples](#addAdUnits-Examples) below. + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------+----------+---------------+------------------------------------------------------------------------------------------------------------------------------------------| +| `bidder` | Required | String | Unique code identifying the bidder. For bidder codes, see the [bidder param reference]({{site.baseurl}}/dev-docs/bidders.html). | +| `params` | Required | Object | Bid request parameters for a given bidder. For allowed params, see the [bidder param reference]({{site.baseurl}}/dev-docs/bidders.html). | +| `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | +| `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | + + + +### `adUnit.mediaTypes` + +See the table below for the list of properties in the `mediaTypes` object of the ad unit. For example ad units showing the different media types, see the [Examples](#addAdUnits-Examples) below. + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|----------+--------------------------------------------------------------+--------+------------------------------------------------------------------------------------------------| +| `banner` | Required, unless either of the other properties are present. | Object | Defines properties of a banner ad. For examples, see [`adUnit.mediaTypes.banner`](#banner). | +| `video` | Required, unless either of the other properties are present. | Object | Defines properties of a video ad. For examples, see [`adUnit.mediaTypes.video`](#video). | +| `native` | Required, unless either of the other properties are present. | Object | Defines properties of a native ad. For properties, see [`adUnit.mediaTypes.native`](#native). | + + + +#### `adUnit.mediaTypes.banner` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|---------+----------+---------------------------------------+-----------------------------------------------------------------------------------------| +| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `name` | Optional | String | Name for this banner ad unit. Can be used for testing and debugging. | + + + +#### `adUnit.mediaTypes.native` + +The `native` object contains the following properties that correspond to the assets of the native ad. + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|---------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------| +| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `type` | Optional | String | Used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | +| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#native-title). | +| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#native-body). | +| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#native-sponsoredby). | +| `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#native-icon). | +| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#native-image). | +| `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#native-clickurl). | +| `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#native-cta). | + +
+ Prebid Native Ad Validation +

+ Prebid.js validates the assets on native bid responses like so: +

    +
  • + If the asset is marked as "required", it checks the bid response to ensure the asset is part of the response +
  • +
  • + However, Prebid.js does not do any additional checking of a required asset beyond ensuring that it's included in the response; for example, it doesn't validate that the asset has a certain length or file size, just that that key exists in the response JSON +
  • +
+

+
+ +
+ +##### `adUnit.mediaTypes.native.image` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|-----------------+----------+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------| +| `required` | Required | Boolean | Whether this asset is required. | +| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#native-image-aspectratios). | + + + +###### `adUnit.mediaTypes.native.image.aspect_ratios` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|----------------+----------+---------+------------------------------------------------------------------------------------------------------| +| `min_width` | Optional | Integer | The minimum width required for an image to serve (in pixels). | +| `ratio_height` | Required | Integer | This, combined with `ratio_width`, determines the required aspect ratio for an image that can serve. | +| `ratio_width` | Required | Integer | See above. | + + + +##### `adUnit.mediaTypes.native.title` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------+----------+---------+------------------------------------------------------| +| `required` | Required | Boolean | Whether a title asset is required on this native ad. | +| `len` | Optional | Integer | Length of title text, in characters. | + + + +##### `adUnit.mediaTypes.native.sponsoredBy` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------+----------+---------+-----------------------------------------------------------| +| `required` | Required | Boolean | Whether a brand name asset is required on this native ad. | + + + +##### `adUnit.mediaTypes.native.clickUrl` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------+----------+---------+----------------------------------------------------------| +| `required` | Required | Boolean | Whether a click URL asset is required on this native ad. | + +##### `adUnit.mediaTypes.native.body` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------+----------+---------+---------------------------------------------------| +| `required` | Required | Boolean | Whether body text is required for this native ad. | + + + +##### `adUnit.mediaTypes.native.icon` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|-----------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------| +| `required` | Requird | Boolean | Whether an icon asset is required on this ad. | +| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`icon.aspect_ratios`](#native-icon-aspectratios). | + + + +###### `adUnit.mediaTypes.native.icon.aspect_ratios` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|----------------+-------+------+-------------| +| `min_width` | Optional | Integer | The minimum width required for an image to serve (in pixels). | +| `ratio_height` | Required | Integer | This, combined with `ratio_width`, determines the required aspect ratio for an image that can serve. | +| `ratio_width` | Required | Integer | See above. | + + + +#### `adUnit.mediaTypes.video` + +{: .table .table-bordered .table-striped } +| Name | Scope | Type | Description | +|------------------+----------+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------| +| `context` | Required | String | The video context, either `"instream"` or `"outstream"`. Example: `context: "outstream"` | +| `playerSize` | Optional | Array[Integer,Integer] | The size (width, height) of the video player on the page, in pixels. Example: `playerSize: [640, 480]` | +| `mimes` | Optional | Array[String] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `mimes: ['video/mp4']` | +| `protocols` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `protocols: [1,2,3,4,5,6,7,8]` | +| `playbackmethod` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `playbackmethod: [2]` | + +## Examples + +## Related Topics + ++ [Publisher API Reference]({{site.baseurl}}/dev-docs/publisher-api-reference.html) ++ [Conditional Ad Units][conditionalAds] ++ [Show Native Ads]({{site.baseurl}}/dev-docs/show-native-ads.html) ++ [Show Video Ads]({{site.baseurl}}/dev-docs/show-video-with-a-dfp-video-tag.html) ++ [Show Outstream Video Ads]({{site.baseurl}}/dev-docs/show-outstream-video-ads.html) ++ [Prebid.org Video Examples]({{site.baseurl}}/examples/video/) ++ [Prebid.org Native Examples]({{site.baseurl}}/examples/native/) + +
+ + + +[conditionalAds]: {{site.baseurl}}/dev-docs/conditional-ad-units.html +[setConfig]: {{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.setConfig From 6075ad1b51816a4a1396815499f2ba001bbaec56 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Mon, 22 Jan 2018 18:05:09 -0500 Subject: [PATCH 02/45] Add examples to ad unit reference --- dev-docs/adunit-reference.md | 122 +++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 7e932cc5b8..cee3706de0 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -202,6 +202,128 @@ The `native` object contains the following properties that correspond to the ass ## Examples ++ [Banner](#adUnit-banner-example) ++ [Video](#adUnit-video-example) ++ [Native](#adUnit-native-example) + + + +##### Banner + +For an example of a banner ad unit, see below. For more detailed instructions, see [Getting Started]({{site.baseurl}}/dev-docs/getting-started.html). + +```javascript +pbjs.addAdUnits({ + code: slot.code, + mediaTypes: { + banner: { + sizes: [[300, 250], [300, 600]] + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: '9880618' + } + }, ] + } +}) +``` + + + +##### Video + +For an example of an instream video ad unit, see below. For more detailed instructions, see [Show Video Ads]({{site.baseurl}}/dev-docs/show-video-with-a-dfp-video-tag.html). + +```javascript +pbjs.addAdUnits({ + code: 'video', + mediaTypes: { + video: { + context: "instream", + sizes: [640, 480], + }, + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: '9333431', + video: { + skippable: true, + playback_methods: ['auto_play_sound_off'] + } + } + }] +}); +``` + +For an example of an outstream video ad unit, see below. For more detailed instructions, see [Show Outstream Video Ads]({{site.baseurl}}/dev-docs/show-outstream-video-ads.html). + +```javascript +pbjs.addAdUnit({ + code: 'video1', + mediaTypes: { + video: { + context: 'outstream', + sizes: [640, 480] + } + }, + renderer: { + url: 'http://cdn.adnxs.com/renderer/video/ANOutstreamVideo.js', + render: function(bid) { + ANOutstreamVideo.renderAd({ + targetId: bid.adUnitCode, + adResponse: bid.adResponse, + }); + } + }, + ... +}) +``` + + + +##### Native + +For an example of a native ad unit, see below. For more detailed instructions, see [Show Native Ads]({{site.baseurl}}/dev-docs/show-native-ads.html). + +```javascript +pbjs.addAdUnits({ + code: slot.code, + mediaTypes: { + native: { + image: { + required: true, + sizes: [150, 50] + }, + title: { + required: true, + len: 80 + }, + sponsoredBy: { + required: true + }, + clickUrl: { + required: true + }, + body: { + required: true + }, + icon: { + required: true, + sizes: [50, 50] + }, + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: '9880618' + } + }, ] + } +}) +``` + ## Related Topics + [Publisher API Reference]({{site.baseurl}}/dev-docs/publisher-api-reference.html) From 41f7650fa64b9a6ad6b09e9850dc3f40dba3e3f9 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 23 Jan 2018 20:40:55 -0500 Subject: [PATCH 03/45] Add native aspect ratio info to AN adapter docs (#543) * Add native aspect ratios to AppNexus adapter docs Also did some general cleanup and formatting while I was in there. * Update field defs a bit; add OpenRTB native link * Remove OpenRTB note based on feedback * Add banner, video, and native sections * WIP native updates across several pages * Tweak language in AN bidder doc links * Edit down to a single native example; s/Ast//g * Update native example code; s/Ast//g * Show `mediaTypes.native.image.sizes` in examples In addition to updating the basic examples to use sizes for images and icons, we add a section to both the API reference and the 'Show Native Ads' page that lists both ways to define sizes for image-like assets. Since the content is the same, it's in a shared file sourced using the Liquid `include` keyword. * Fix code formatting issue with included file * `adUnit.sizes` is ignored on native ad units * Remove `adUnit.sizes` since banner sizes are used * Remove redundant `adUnit.sizes` from native ad * Use correct syntax for native "image-type" ad --- .../dev-docs/native-image-asset-sizes.md | 35 +++++++++ dev-docs/bidders/appnexus.md | 63 ++++++++++++--- dev-docs/publisher-api-reference.md | 76 ++++++++++--------- dev-docs/show-native-ads.md | 38 ++++++---- 4 files changed, 149 insertions(+), 63 deletions(-) create mode 100644 _includes/dev-docs/native-image-asset-sizes.md diff --git a/_includes/dev-docs/native-image-asset-sizes.md b/_includes/dev-docs/native-image-asset-sizes.md new file mode 100644 index 0000000000..99149a51e2 --- /dev/null +++ b/_includes/dev-docs/native-image-asset-sizes.md @@ -0,0 +1,35 @@ +There are two methods for defining sizes for image-like assets (`image` and `icon`). Both are shown below, but the first example (using `sizes`) is more widely supported by demand partners. + +Using `mediaTypes.native.image.sizes` (or `mediaTypes.native.icon.sizes` for icons): + +{% highlight js %} + + mediaTypes: { + native: { + image: { + required: true, + sizes: [150, 50] + } + } + } + +{% endhighlight %} + +Using `mediaTypes.native.image.aspect_ratios` (or `mediaTypes.native.icon.aspect_ratios` for icons): + +{% highlight js %} + + mediaTypes: { + native: { + image: { + required: true, + aspect_ratios: [{ + min_width: 300, /* Optional */ + ratio_width: 2, /* Required */ + ratio_height: 3, /* Required */ + }] + } + } + } + +{% endhighlight %} diff --git a/dev-docs/bidders/appnexus.md b/dev-docs/bidders/appnexus.md index 2a6ed65135..463412152b 100644 --- a/dev-docs/bidders/appnexus.md +++ b/dev-docs/bidders/appnexus.md @@ -10,19 +10,31 @@ hide: true prebid_1_0_supported : true --- -### bid params +**Table of Contents** + +- [Bid params](#appnexus-bid-params) +- [Support for publisher-defined keys](#appnexus-pub-keys) +- [Banner Ads](#appnexus-Banner) +- [Video Ads](#appnexus-Video) +- [Native Ads](#appnexus-Native) + + + +### Bid params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | -|----------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------| -| `placementId` | required | The placement ID from AppNexus. You may identify a placement using the `invCode` and `member` instead of a placement ID. | `"234234"` | -| "arbitraryKey" | optional | This key can be *any publisher-defined string*. The value (also a string) maps to a querystring segment for enhanced buy-side targeting. Multiple key-value pairs can be added. See example below. | `'genre': 'rock'` | -| `invCode` | optional | The inventory code from AppNexus. Must be used with `member`. | `"abc123"` | -| `member` | optional | The member ID from AppNexus. Must be used with `invCode`. | `"12345"` | -| `reserve` | optional | Sets a floor price for the bid that is returned. | `0.90` | +| Name | Scope | Description | Example | +|------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------| +| `placementId` | required | The placement ID from AppNexus. You may identify a placement using the `invCode` and `member` instead of a placement ID. | `"234234"` | +| `"arbitraryKey"` | optional | This key can be *any publisher-defined string*. The value (also a string) maps to a querystring segment for enhanced buy-side targeting. Multiple key-value pairs can be added as shown [below](#appnexus-pub-keys). | `'genre': 'rock'` | +| `invCode` | optional | The inventory code from AppNexus. Must be used with `member`. | `"abc123"` | +| `member` | optional | The member ID from AppNexus. Must be used with `invCode`. | `"12345"` | +| `reserve` | optional | Sets a floor price for the bid that is returned. | `0.90` | + + + +#### Support for publisher-defined keys -{: .alert.alert-info :} -**Support for Publisher-Defined Keys** To pass in a publisher-defined key whose value maps to a querystring segment for buy-side targeting, set up your `params` object as shown below. For more information, see the [query string targeting documentation](https://wiki.appnexus.com/x/7oCzAQ) (login required). {% highlight js %} @@ -43,4 +55,33 @@ var adUnits = [{ }] {% endhighlight %} -(Sizes set in `adUnit` object will also apply to the AppNexus bid requests.) +{: .alert.alert-info :} +Sizes set in the `adUnit` object will also apply to the AppNexus bid requests. + + + +#### Banner Ads + +AppNexus supports the banner features described in: + +- [the `adUnit` banner documentation]({{site.baseurl}}/dev-docs/publisher-api-reference.html#adUnit-banner) +- [Getting Started for Developers]({{site.baseurl}}/dev-docs/getting-started.html) + + + +#### Video Ads + +AppNexus supports the video features described in: + +- [the `adUnit` video documentation]({{site.baseurl}}/dev-docs/publisher-api-reference.html#adUnit-video). +- [Show Video Ads]({{site.baseurl}}/dev-docs/show-video-with-a-dfp-video-tag.html) +- [Show Outstream Video Ads]({{site.baseurl}}/dev-docs/show-outstream-video-ads.html) + + + +#### Native Ads + +AppNexus supports the native features described in: + +- [the `adUnit` native documentation]({{site.baseurl}}/dev-docs/publisher-api-reference.html#adUnit-native). +- [Show Native Ads]({{site.baseurl}}/dev-docs/show-native-ads.html) diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index d8ce356c42..ef038dde9f 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -613,41 +613,44 @@ See the table below for the list of properties in the `mediaTypes` object of the For an example of a native ad unit, see below. For more detailed instructions, see [Show Native Ads]({{site.baseurl}}/dev-docs/show-native-ads.html). ```javascript -pbjs.addAdUnits({ - code: slot.code, - sizes: slot.size, - mediaTypes: { - native: { - image: { - required: true - }, - title: { - required: true, - len: 80 - }, - sponsoredBy: { - required: true - }, - clickUrl: { - required: true - }, - body: { - required: true - }, - icon: { - required: true + pbjs.addAdUnits({ + code: slot.code, + mediaTypes: { + native: { + image: { + required: true, + sizes: [150, 50] + }, + title: { + required: true, + len: 80 + }, + sponsoredBy: { + required: true + }, + clickUrl: { + required: true + }, + body: { + required: true + }, + icon: { + required: true, + sizes: [50, 50] + }, }, - }, - bids: [{ - bidder: 'appnexusAst', - params: { - placementId: '9880618' - } - }, ] - } -}) + bids: [{ + bidder: 'appnexus', + params: { + placementId: '9880618' + } + }, ] + } + }) ``` +{% include dev-docs/native-image-asset-sizes.md %} + ##### Video @@ -664,7 +667,7 @@ pbjs.addAdUnits({ }, }, bids: [{ - bidder: 'appnexusAst', + bidder: 'appnexus', params: { placementId: '9333431', video: { @@ -709,13 +712,12 @@ For an example of a banner ad unit, see below. For more detailed instructions, ```javascript pbjs.addAdUnits({ code: slot.code, - sizes: slot.size, mediaTypes: { banner: { sizes: [[300, 250], [300, 600]] }, bids: [{ - bidder: 'appnexusAst', + bidder: 'appnexus', params: { placementId: '9880618' } @@ -1168,11 +1170,11 @@ To define an alias for a bidder adapter, call this method at runtime: {% highlight js %} -pbjs.aliasBidder('appnexusAst', 'newAlias'); +pbjs.aliasBidder('appnexus', 'newAlias'); {% endhighlight %} -Defining an alias can help avoid user confusion since it's possible to send parameters to the same adapter but in different contexts (e.g, The publisher uses `"appnexusAst"` for demand and also uses `"newAlias"` which is an SSP partner that uses the `"appnexusAst"` adapter to serve their own unique demand). +Defining an alias can help avoid user confusion since it's possible to send parameters to the same adapter but in different contexts (e.g, The publisher uses `"appnexus"` for demand and also uses `"newAlias"` which is an SSP partner that uses the `"appnexus"` adapter to serve their own unique demand). It's not technically necessary to define an alias, since each copy of an adapter with the same name gets a different ID in the internal bidder registry so Prebid.js can still tell them apart. diff --git a/dev-docs/show-native-ads.md b/dev-docs/show-native-ads.md index 2942ca964a..15d631b924 100644 --- a/dev-docs/show-native-ads.md +++ b/dev-docs/show-native-ads.md @@ -15,7 +15,7 @@ nav_section: prebid-native In this tutorial, we'll set up Prebid.js to show native ads. -We'll use the [AppNexus AST adapter]({{site.github.url}}/dev-docs/bidders.html#appnexusAst) since that adapter supports native ads, but the concepts and setup will be largely the same for any bidder adapter that supports the `"native"` media type. +We'll use the [AppNexus adapter]({{site.github.url}}/dev-docs/bidders.html#appnexus) since that adapter supports native ads, but the concepts and setup will be largely the same for any bidder adapter that supports the `"native"` media type. Similarly, we'll use DFP as the ad server, but the concept and implementation should be pretty similar to other ad servers. @@ -110,11 +110,11 @@ Each key's value is an object with several fields. Most important is the `requi pbjs.addAdUnits({ code: slot.code, - sizes: slot.size, mediaTypes: { native: { image: { - required: true + required: true, + sizes: [150, 50] }, title: { required: true, @@ -130,11 +130,12 @@ pbjs.addAdUnits({ required: true }, icon: { - required: true + required: true, + sizes: [50, 50] }, }, bids: [{ - bidder: 'appnexusAst', + bidder: 'appnexus', params: { placementId: '9880618' } @@ -166,19 +167,26 @@ And the following optional fields: + icon + cta -A native `image` ad unit can be set up in the manner below: - -{% highlight js %} +A native "image-type" ad unit can be set up as shown in the following example. - const adUnits = [{ +```javascript + const adUnits = [{ code: 'adUnit-code', - mediaTypes: { native: { type: 'image' } } - bids: [ - { bidder: 'appnexusAst', params: { placementId: '123456' } } - ] - }]; + mediaTypes: { + native: { + type: 'image' + } + } + bids: [{ + bidder: 'appnexus', + params: { + placementId: '123456' + } + }] + }]; +``` -{% endhighlight %} +{% include dev-docs/native-image-asset-sizes.md %} ### 3. Add your native ad tag to the page body as usual: From 5c31c6c24c189d2ff1d4818add052f70b70466d0 Mon Sep 17 00:00:00 2001 From: Matt Lane Date: Tue, 23 Jan 2018 17:43:10 -0800 Subject: [PATCH 04/45] Add multiformat ad unit information (#541) * Add multiformat ad unit information * Update default targeting keys * Update based on review feedback * Change key to hb_format * Add note about including banner media type if supported --- dev-docs/bidder-adaptor.md | 9 ++- dev-docs/publisher-api-reference.md | 96 +++++++++++++++++++++++++---- 2 files changed, 90 insertions(+), 15 deletions(-) diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index 258b640e01..a6ec1fcab9 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -208,9 +208,9 @@ Sample array entry for `validBidRequests[]`: {% endhighlight %} {: .alert.alert-success :} -There are several IDs present in the bidRequest object: -- **Bid ID** is unique across ad units and bidders. -- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. +There are several IDs present in the bidRequest object: +- **Bid ID** is unique across ad units and bidders. +- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. - **Transaction ID** is unique for each ad unit with a call to `requestBids`, but same across bidders. This is the ID that DSPs need to recognize the same impression coming in from different supply sources. The ServerRequest objects returned from your adapter have this structure: @@ -336,6 +336,9 @@ export const spec = { {% endhighlight %} +{: .alert.alert-info :} +If your adapter supports banner and video media types, make sure to include `'banner'` in the `supportedMediaTypes` array as well + ### Step 2: Accept video parameters and pass them to your server Video parameters are often passed in from the ad unit in a `video` object. diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index ef038dde9f..4132e6ed57 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -14,7 +14,7 @@ pid: 10 This page has documentation for the public API methods of Prebid.js. {: .alert.alert-danger :} -Methods marked as deprecated will be removed in version 1.0 (scheduled for release Q4 2017). +Methods marked as deprecated will be removed in version 1.0 (scheduled for release Q4 2017). After a transition period, documentation for these methods will be removed from Prebid.org (likely early 2018). @@ -566,7 +566,7 @@ See the table below for the list of properties on the ad unit. For example ad u | `code` | Required | String | Unique identifier that you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | | `sizes` | Required | Array[Number] or Array[Array[Number]] | All the sizes that this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, prefer [`mediaTypes.banner.sizes`](#adUnit-banner). | | `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#addAdUnits-Bids) below. | -| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [Media Types](#addAdUnits-MediaTypes) below. | +| `mediaTypes` | Optional | Object | Defines one or multiple media types the ad unit supports. For a list of properties, see [Media Types](#addAdUnits-MediaTypes) below. | | `labelAny` | optional | array | An array of string labels, used for showing responsive ads. With the `labelAny` operator, just one label has to match for the condition to be true. Works with the `sizeConfig` object passed in to [pbjs.setConfig]({{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.setConfig). | | `labelAll` | optional | array | An array of string labels, used for showing responsive and conditional ads. With the `labelAll` conditional, every element of the target array must match an element of the label array in order for the condition to be true. Works with the `sizeConfig` object passed in to [pbjs.setConfig]({{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.setConfig). | @@ -594,9 +594,9 @@ See the table below for the list of properties in the `mediaTypes` object of the {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |----------+--------------------------------------------------------------+--------+--------------------------------------------------------------------------------------------------------------------| -| `native` | Required, unless either of the other properties are present. | Object | Defines properties of a native ad. For an example native ad unit, see [the native example below](#adUnit-native). | -| `video` | Required, unless either of the other properties are present. | Object | Defines properties of a video ad. For examples, see [the video examples below](#adUnit-video). | -| `banner` | Required, unless either of the other properties are present. | Object | Defines properties of a banner ad. For examples, see [the banner example below](#adUnit-banner). | +| `banner` | optional. If no other properties are specified, this is the default | Object | Defines properties of a banner ad. For examples, see [the banner example below](#adUnit-banner). | +| `native` | optional | Object | Defines properties of a native ad. For an example native ad unit, see [the native example below](#adUnit-native). | +| `video` | optional | Object | Defines properties of a video ad. For examples, see [the video examples below](#adUnit-video). | @@ -605,6 +605,7 @@ See the table below for the list of properties in the `mediaTypes` object of the + [Native](#adUnit-native) + [Video](#adUnit-video) + [Banner](#adUnit-banner) ++ [Multi-format](#adUnit-multiformat) @@ -726,6 +727,72 @@ pbjs.addAdUnits({ }) ``` + + +##### Multi-format + +Multiple media formats may be declared on a single ad unit, allowing any bidder that supports at least one of those media formats to participate in the auction. Any bidder that isn't compatible with the specified `mediaTypes` will be dropped from the ad unit. If `mediaTypes` is not specified on an ad unit, `banner` is the assumed format and any banner bidder is eligible for inclusion. + +For examples of a multi-format ad units and behavior, see below. + +```javascript +// each bidder supports at least one of the formats, so all will participate +pbjs.addAdUnits({ + code: 'div-banner-outstream-native', + mediaTypes: { + banner: { sizes: [[300, 250], [300, 600]] }, + native: { + title: {required: true}, + image: {required: true}, + body: {required: false}, + }, + video: { + context: 'outstream', + playerSize: [400, 600], + }, + }, + bids: [ + { + bidder: 'bannerBidder', + params: {placementId: '481'} + }, + { + bidder: 'nativeBidder', + params: {titleAsset: '516'} + }, + { + bidder: 'videoBidder', + params: {vidId: '234'} + }, + ] +}); +``` + +```javascript +// only nativeBidder and videoBidder will participate +pbjs.addAdUnits({ + code: 'div-native-outstream', + mediaTypes: { + native: { type: 'image' }, + video: { context: 'outstream', playerSize: [400, 600] }, + }, + bids: [ + { + bidder: 'bannerBidder', + params: {placementId: '481'} + }, + { + bidder: 'nativeBidder', + params: {titleAsset: '516'} + }, + { + bidder: 'videoBidder', + params: {vidId: '234'} + }, + ] +}); +``` +
@@ -805,7 +872,7 @@ per adapter as needed. Both scenarios are described below. **Keyword targeting for all bidders** -The below code snippet is the *default* setting for ad server targeting. For each bidder's bid, Prebid.js will set 5 keys (`hb_bidder`, `hb_adid`, `hb_pb`, `hb_size`, `hb_source`) with their corresponding values. The key value pair targeting is applied to the bid's corresponding ad unit. Your ad ops team will have the ad server's line items target these keys. +The below code snippet is the *default* setting for ad server targeting. For each bidder's bid, Prebid.js will set 6 keys (`hb_bidder`, `hb_adid`, `hb_pb`, `hb_size`, `hb_source`, `hb_format`) with their corresponding values. The key value pair targeting is applied to the bid's corresponding ad unit. Your ad ops team will have the ad server's line items target these keys. If you'd like to customize the key value pairs, you can overwrite the settings as the below example shows. *Note* that once you updated the settings, let your ad ops team know about the change, so they can update the line item targeting accordingly. See the [Ad Ops](../adops.html) documentation for more information. @@ -844,6 +911,11 @@ pbjs.bidderSettings = { val: function (bidResponse) { return bidResponse.source; } + }, { + key: 'hb_format', + val: function (bidResponse) { + return bidResponse.mediaType; + } }] } } @@ -1047,7 +1119,7 @@ For an example showing how to use this method, see [Show Video Ads with a DFP Vi This method is deprecated as of version 0.27.0 and will be removed in version 1.0 (scheduled for release Q4 2017). Please use [`setConfig`](#module_pbjs.setConfig) instead. {: .alert.alert-danger :} -**BREAKING CHANGE** +**BREAKING CHANGE** As of version 0.27.0, To encourage fairer auctions, Prebid will randomize the order bidders are called by default. To replicate legacy behavior, call `pbjs.setBidderSequence('fixed')`. This method shuffles the order in which bidders are called. @@ -1235,9 +1307,9 @@ pbjs.setConfig({ bidderTimeout: 3000 }); {% endhighlight %} {: .alert.alert-warning :} -**Bid Timeouts and JavaScript Timers** -Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. -With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. +**Bid Timeouts and JavaScript Timers** +Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. +With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. For more information about the asynchronous event loop and `setTimeout`, see [How JavaScript Timers Work](https://johnresig.com/blog/how-javascript-timers-work/). @@ -1363,7 +1435,7 @@ However, there are also good reasons why publishers may want to control the use - *Security*: Publishers may want to control which bidders are trusted to inject images and JavaScript into their pages. {: .alert.alert-info :} -**User syncing default behavior** +**User syncing default behavior** If you don't tweak any of the settings described in this section, the default behavior of Prebid.js is to wait 3 seconds after the auction ends, and then allow every adapter to drop up to 5 image-based user syncs. For more information, see the sections below. @@ -1742,7 +1814,7 @@ var adserverTag = 'https://pubads.g.doubleclick.net/gampad/ads?' + 'sz=640x480&iu=/19968336/prebid_cache_video_adunit&impl=s&gdfp_req=1' + '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=http://www.example.com' + '&cust_params=section%3Dblog%26anotherKey%3DanotherValue'; - + var videoUrl = pbjs.adServers.dfp.buildVideoUrl({ adUnit: videoAdUnit, url: adserverTag From 849e775e66eaaad65692715085887aad5d9e386d Mon Sep 17 00:00:00 2001 From: jsnellbaker <31102355+jsnellbaker@users.noreply.github.com> Date: Tue, 23 Jan 2018 20:53:43 -0500 Subject: [PATCH 05/45] update tag samples with multiformat syntax (#528) * update tag samples with multiformat syntax * reverting part of change on show-native-ads.md --- .../register-bidder-tag-ids.js | 8 ++- dev-docs/bidder-adaptor.md | 68 +++++++++++-------- dev-docs/get-started-with-prebid-server.md | 2 +- dev-docs/prebid-1.0-API.md | 27 +++++--- dev-docs/publisher-api-reference.md | 26 ++++--- dev-docs/show-outstream-video-ads.md | 8 +-- dev-docs/show-video-with-a-dfp-video-tag.md | 4 +- 7 files changed, 84 insertions(+), 59 deletions(-) diff --git a/_includes/getting-started/register-bidder-tag-ids.js b/_includes/getting-started/register-bidder-tag-ids.js index dbeb4e0e2f..c2c1bb77df 100644 --- a/_includes/getting-started/register-bidder-tag-ids.js +++ b/_includes/getting-started/register-bidder-tag-ids.js @@ -1,9 +1,13 @@ pbjs.que.push(function() { var adUnits = [{ code: "div-gpt-ad-1438287399331-0", - sizes: [[300, 250], [300, 600]], + mediaTypes: { + banner: { + sizes: [[300, 250], [300, 600]] + } + }, bids: [{ - bidder: "rubicon", + bidder: "rubicon", params: { accountId: "4934", siteId: "13945", diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index a6ec1fcab9..acfa4298c4 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -74,30 +74,38 @@ Module that connects to Example's demand sources # Test Parameters ``` var adUnits = [ - { - code: 'test-div', - sizes: [[300, 250]], // a display size - bids: [ - { - bidder: "example", - params: { - placement: '12345' - } - } - ] - },{ - code: 'test-div', - sizes: [[300, 50]], // a mobile size - bids: [ - { - bidder: "example", - params: { - placement: 67890 - } - } - ] - } - ]; + { + code: 'test-div', + mediaTypes: { + banner: { + sizes: [[300, 250]], // a display size + } + }, + bids: [ + { + bidder: "example", + params: { + placement: '12345' + } + } + ] + },{ + code: 'test-div', + mediaTypes: { + banner: { + sizes: [[300, 50]], // a mobile size + } + }, + bids: [ + { + bidder: "example", + params: { + placement: 67890 + } + } + ] + } + ]; ``` {% endhighlight %} @@ -115,10 +123,14 @@ For more information about the kinds of information that can be passed using the { var adUnits = [{ code: "top-med-rect", - sizes: [ - [300, 250], - [300, 600] - ] + mediaTypes: { + banner: { + sizes: [ + [300, 250], + [300, 600] + ] + } + }, bids: [{ bidder: "example", // params is custom to the bidder adapter and will be diff --git a/dev-docs/get-started-with-prebid-server.md b/dev-docs/get-started-with-prebid-server.md index e6ea9b8359..2a3d5c53dd 100644 --- a/dev-docs/get-started-with-prebid-server.md +++ b/dev-docs/get-started-with-prebid-server.md @@ -111,11 +111,11 @@ The `mimes` parameter is required by OpenRTB. For all other parameters, check w ```javascript var adUnit1 = { code: 'videoAdUnit', - sizes: [400, 600], mediaTypes: { video: { context: "instream", mimes: ['video/mp4'], + playerSize: [400, 600], minduration: 1, maxduration: 2, protocols: [1, 2], diff --git a/dev-docs/prebid-1.0-API.md b/dev-docs/prebid-1.0-API.md index 718742b795..63329c59ea 100644 --- a/dev-docs/prebid-1.0-API.md +++ b/dev-docs/prebid-1.0-API.md @@ -157,12 +157,16 @@ Labels can now be specified as a property on either an `adUnit` or on `adUnit.bi pbjs.addAdUnits([{ "code": "ad-slot-1", - "sizes": [ - [970, 90], - [728, 90], - [300, 250], - [300, 100] - ], + "mediaTypes": { + "banner": { + "sizes": [ + [970, 90], + [728, 90], + [300, 250], + [300, 100] + ], + } + } "labels": ["visitor-uk"] "bids": [ // the full set of bids, not all of which are relevant on all devices { @@ -225,14 +229,15 @@ The `mediaType` attribute is being removed in favor of a `mediaTypes` object. Th adUnit = { "code": "unique_code_for_placement" - "sizes": [ - [300, 250] - ], "mediaTypes": { // New field to replace `mediaType`. Defaults to `banner` if not specified. video: { - context: "outstream" + context: "outstream", + playerSize: [600, 480] + }, + banner: { + sizes: [300, 250], + ...options }, - banner: { ...options }, native: { ...options } }, labels: ["desktop", "mobile"] diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index 4132e6ed57..3da71f7fb7 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -638,7 +638,7 @@ For an example of a native ad unit, see below. For more detailed instructions, icon: { required: true, sizes: [50, 50] - }, + } }, bids: [{ bidder: 'appnexus', @@ -661,10 +661,10 @@ For an example of an instream video ad unit, see below. For more detailed instr ```javascript pbjs.addAdUnits({ code: 'video', - sizes: [640, 480], mediaTypes: { video: { - context: "instream" + context: "instream", + playerSize: [640, 480] }, }, bids: [{ @@ -685,10 +685,10 @@ For an example of an outstream video ad unit, see below. For more detailed inst ```javascript pbjs.addAdUnit({ code: 'video1', - sizes: [640, 480], mediaTypes: { video: { - context: 'outstream' + context: 'outstream', + playerSize: [640, 480] } }, renderer: { @@ -1634,12 +1634,16 @@ Label targeting on the ad unit looks like the following: pbjs.addAdUnits([{ code: "ad-slot-1", - sizes: [ - [970, 90], - [728, 90], - [300, 250], - [300, 100] - ], + mediaTypes: { + banner: { + sizes: [ + [970, 90], + [728, 90], + [300, 250], + [300, 100] + ] + } + }, labelAny: ["visitor-uk"] /* The full set of bids, not all of which are relevant on all devices */ bids: [{ diff --git a/dev-docs/show-outstream-video-ads.md b/dev-docs/show-outstream-video-ads.md index cce6d2bac3..f864201ac7 100644 --- a/dev-docs/show-outstream-video-ads.md +++ b/dev-docs/show-outstream-video-ads.md @@ -38,10 +38,10 @@ The fields supported in a given `bid.params.video` object will vary based on the var videoAdUnits = [ { code: 'video1', - sizes: [ 640, 480 ], mediaTypes: { video: { - context: 'outstream' + context: 'outstream', + playerSize: [640, 480] } }, bids: [ @@ -85,10 +85,10 @@ Renderers are associated with adUnits through the `adUnit.renderer` object. Thi pbjs.addAdUnit({ code: 'video1', - sizes: [640, 480], mediaTypes: { video: { - context: 'outstream' + context: 'outstream', + playerSize: [640, 480] } }, renderer: { diff --git a/dev-docs/show-video-with-a-dfp-video-tag.md b/dev-docs/show-video-with-a-dfp-video-tag.md index 010413a0a4..90937e570a 100644 --- a/dev-docs/show-video-with-a-dfp-video-tag.md +++ b/dev-docs/show-video-with-a-dfp-video-tag.md @@ -59,10 +59,10 @@ Don't forget to add your own valid placement ID. ```javascript var videoAdUnit = { code: 'video', - sizes: [640, 480], mediaTypes: { video: { - context: "instream" + context: "instream", + playerSize: [640, 480] }, }, bids: [{ From 2a1f4346702da5fce98e9038bf0d011e719f85d3 Mon Sep 17 00:00:00 2001 From: Matt Lane Date: Thu, 25 Jan 2018 13:10:10 -0800 Subject: [PATCH 06/45] Re-add trailing spaces to info boxes (#573) --- dev-docs/publisher-api-reference.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index 3da71f7fb7..dd8f569b93 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -1119,7 +1119,7 @@ For an example showing how to use this method, see [Show Video Ads with a DFP Vi This method is deprecated as of version 0.27.0 and will be removed in version 1.0 (scheduled for release Q4 2017). Please use [`setConfig`](#module_pbjs.setConfig) instead. {: .alert.alert-danger :} -**BREAKING CHANGE** +**BREAKING CHANGE** As of version 0.27.0, To encourage fairer auctions, Prebid will randomize the order bidders are called by default. To replicate legacy behavior, call `pbjs.setBidderSequence('fixed')`. This method shuffles the order in which bidders are called. @@ -1307,9 +1307,9 @@ pbjs.setConfig({ bidderTimeout: 3000 }); {% endhighlight %} {: .alert.alert-warning :} -**Bid Timeouts and JavaScript Timers** -Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. -With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. +**Bid Timeouts and JavaScript Timers** +Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. +With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. For more information about the asynchronous event loop and `setTimeout`, see [How JavaScript Timers Work](https://johnresig.com/blog/how-javascript-timers-work/). @@ -1435,7 +1435,7 @@ However, there are also good reasons why publishers may want to control the use - *Security*: Publishers may want to control which bidders are trusted to inject images and JavaScript into their pages. {: .alert.alert-info :} -**User syncing default behavior** +**User syncing default behavior** If you don't tweak any of the settings described in this section, the default behavior of Prebid.js is to wait 3 seconds after the auction ends, and then allow every adapter to drop up to 5 image-based user syncs. For more information, see the sections below. @@ -1818,7 +1818,7 @@ var adserverTag = 'https://pubads.g.doubleclick.net/gampad/ads?' + 'sz=640x480&iu=/19968336/prebid_cache_video_adunit&impl=s&gdfp_req=1' + '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=http://www.example.com' + '&cust_params=section%3Dblog%26anotherKey%3DanotherValue'; - + var videoUrl = pbjs.adServers.dfp.buildVideoUrl({ adUnit: videoAdUnit, url: adserverTag From 7838c6c4f985a16a701148d98fb307e99e3c46de Mon Sep 17 00:00:00 2001 From: Matt Lane Date: Thu, 25 Jan 2018 17:08:01 -0800 Subject: [PATCH 07/45] Add note about non-1.0 adapters (#570) * Add note about non-1.0 adapters * Add trailing spaces back --- dev-docs/bidder-adaptor.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index acfa4298c4..b74ca59c86 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -44,6 +44,9 @@ In order to provide a fast and safe header bidding environment for publishers, t {: .alert.alert-danger :} Failure to follow any of the above conventions could lead to delays in approving your adapter for inclusion in Prebid.js. +{: .alert.alert-danger :} +Pull requests for non-1.0 compatible adapters will not be reviewed or accepted on the legacy branch. + ### Required Files @@ -220,9 +223,9 @@ Sample array entry for `validBidRequests[]`: {% endhighlight %} {: .alert.alert-success :} -There are several IDs present in the bidRequest object: -- **Bid ID** is unique across ad units and bidders. -- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. +There are several IDs present in the bidRequest object: +- **Bid ID** is unique across ad units and bidders. +- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. - **Transaction ID** is unique for each ad unit with a call to `requestBids`, but same across bidders. This is the ID that DSPs need to recognize the same impression coming in from different supply sources. The ServerRequest objects returned from your adapter have this structure: From 8485dc6d73e2c050171806e04eb03a56dd4d287a Mon Sep 17 00:00:00 2001 From: Bill Newman Date: Fri, 26 Jan 2018 18:39:18 +0200 Subject: [PATCH 08/45] suppord prebid.js 1.0 Colossusssp (#560) --- dev-docs/bidders/colossusssp.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/bidders/colossusssp.md b/dev-docs/bidders/colossusssp.md index b3b063bceb..a77bee958c 100644 --- a/dev-docs/bidders/colossusssp.md +++ b/dev-docs/bidders/colossusssp.md @@ -7,6 +7,7 @@ nav_section: reference hide: true biddercode: colossusssp biddercode_longer_than_12: false +prebid_1_0_supported : true --- ### bid params From 6528878fe6197fb4c7728358ba8a9911cd5d4dfb Mon Sep 17 00:00:00 2001 From: Miller Date: Mon, 29 Jan 2018 18:18:38 +0200 Subject: [PATCH 09/45] Update vertamedia.md (#567) Update for Vertamedia Adapter description Add examples --- dev-docs/bidders/vertamedia.md | 67 ++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/dev-docs/bidders/vertamedia.md b/dev-docs/bidders/vertamedia.md index 88795cf9a7..3a31a50090 100644 --- a/dev-docs/bidders/vertamedia.md +++ b/dev-docs/bidders/vertamedia.md @@ -10,11 +10,70 @@ biddercode_longer_than_12: false prebid_1_0_supported : true --- -### bid params +### Bid params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | -| :--- | :---- | :---------- | :------ | -| `aid`| required | | | +| Name | Scope | Description | Example | +| :--- | :---- | :---------- | :------ | +| `aid`| required | The source ID from Vertamedia.| 324758 | + + +### Description +Get access to multiple demand partners across VertaMedia AdExchange and maximize your yield with VertaMedia header bidding adapter. + +VertaMedia header bidding adapter connects with VertaMedia demand sources in order to fetch bids. +This adapter provides a solution for accessing Video demand and display demand + +### Test Parameters +``` + var adUnits = [ + + // Video instream adUnit + { + code: 'div-test-div', + sizes: [[640, 480]], + mediaTypes: { + video: { + context: 'instream' + } + }, + bids: [{ + bidder: 'vertamedia', + params: { + aid: 332842 + } + }] + }, + + // Video outstream adUnit + { + code: 'outstream-test-div', + sizes: [[640, 480]], + mediaTypes: { + video: { + context: 'outstream' + } + }, + bids: [{ + bidder: 'vertamedia', + params: { + aid: 332842 + } + }] + }, + + // Banner adUnit + { + code: 'div-test-div', + sizes: [[300, 250]], + bids: [{ + bidder: 'vertamedia', + params: { + aid: 324758 + } + }] + } + ]; +``` From adbf04f0569f32739eb19cf77e4f43bafddaa9f8 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Mon, 29 Jan 2018 15:05:44 -0500 Subject: [PATCH 10/45] Add multiformat docs: developers, ad ops, example code (#561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * WIP multiformat docs * Flesh out prerequisites/implementation of dev doc * Add multi-format docs to 'Docs by Format' * Add a quick example of *why* to do this * Outline steps on ad ops page * Clarify multi-format on 'Docs by format' page * Various dev doc fixups * Update JSFiddle, overview bullet points in example * Update multiformat fiddle * Key is now called `hb_format` * s/multi-format/multiformat/ * Use 'appnexus' bidder and Prebid.js v1 * s/multi-format/multiformat/ * Be clear that it's *outstream* video * Use title case * Update multiformat example link * Fill in multiformat ad ops instructions Because these are basically the same as the banner/native instructions, I've filled them in as the "diffs" between our existing, published, vetted instructions. * Add native aspect ratio info to AN adapter docs (#543) * Add native aspect ratios to AppNexus adapter docs Also did some general cleanup and formatting while I was in there. * Update field defs a bit; add OpenRTB native link * Remove OpenRTB note based on feedback * Add banner, video, and native sections * WIP native updates across several pages * Tweak language in AN bidder doc links * Edit down to a single native example; s/Ast//g * Update native example code; s/Ast//g * Show `mediaTypes.native.image.sizes` in examples In addition to updating the basic examples to use sizes for images and icons, we add a section to both the API reference and the 'Show Native Ads' page that lists both ways to define sizes for image-like assets. Since the content is the same, it's in a shared file sourced using the Liquid `include` keyword. * Fix code formatting issue with included file * `adUnit.sizes` is ignored on native ad units * Remove `adUnit.sizes` since banner sizes are used * Remove redundant `adUnit.sizes` from native ad * Use correct syntax for native "image-type" ad * Add multiformat ad unit information (#541) * Add multiformat ad unit information * Update default targeting keys * Update based on review feedback * Change key to hb_format * Add note about including banner media type if supported * update tag samples with multiformat syntax (#528) * update tag samples with multiformat syntax * reverting part of change on show-native-ads.md * s/multiformat/multi-format/g * We don't need an order per demand partner * Remove ambiguous comment on fluid vs. fixed native * Update multi-format language in dev setup intro * Update multi-format description based on feedback * Update 'How it works' based on feedback * Update ad unit language based on feedback * Fix Prebid.org-hosted multiformat example Somehow a native example was erroneously added -- probably as a placeholder. It has been replaced with a slightly modified version [*] of the multi-format example kindly provided by @matthewlane. [*] It was modified to (1) use Prebid.js v1.2 from the CDN and (2) to use the 'appnexus' rather than the old AST adapter * Update JSFiddle in multiformat example To address the following points: 1. Removing mention of the internal dev URL as mentioned by Jacobson 2. Making the code the same as that of prebid.org/examples/multi_format_example.html * Add ad unit creation step with sizing/native info * Clarify line item setup language * Update k-v targeting instructions per feedback - Use slightly different language/notation - Add screenshots * Check in screenshots of multi-format ad ops setup * Update native format language per feedback * Clarify that it's banner and/or outstream * Note bidder-specific line item targeting keys * Update targeting description per feedback * Update native size note, per feedback * Fix mobile size per feedback * Hide multi-format example from site's left nav * Belatedly add link to the 1.0 release announcement * Fix typo * Use Prebid.org-hosted multi-format example (Also, add it to the `/examples` index page.) * s/div-banner-outstream/div-banner-native/g * Add a third example: 'banner-outstream' * Update examples to set `cache.url` to `false` I'm told this is connected somehow to the following issue, but ¯\_(ツ)_/¯ https://github.com/prebid/Prebid.js/pull/1976 * Update placement IDs in Prebid.org-hosted example In order for outstream to work, we need a placement configured to work with VAST 3.0 since that is what the test outstream creative requires. * Update JSFiddle to use updated placement IDs * Get banner/outstream examples working: use 300x250 Also, added a note to the JSFiddle multi-format example page that the Fiddle works sporadically for outstream, so check out the Prebid.org-hosted example (which works closer to 100% of the time) * Fix broken formatting on JSFiddle example page --- _config.yml | 3 + .../setting-up-prebid-multi-format-in-dfp.md | 85 +++++++ .../ad-ops/multi-format/hb_format_native.png | Bin 0 -> 6243 bytes .../multi-format/hb_format_video_banner.png | Bin 0 -> 7122 bytes dev-docs/bidder-adaptor.md | 8 +- dev-docs/docs-by-format.md | 28 +-- dev-docs/examples/multi-format-example.md | 20 ++ dev-docs/publisher-api-reference.md | 19 +- dev-docs/show-multi-format-ads.md | 136 +++++++++++ examples/index.html | 3 + examples/multi_format_example.html | 211 ++++++++++++++++++ 11 files changed, 487 insertions(+), 26 deletions(-) create mode 100644 adops/setting-up-prebid-multi-format-in-dfp.md create mode 100644 assets/images/ad-ops/multi-format/hb_format_native.png create mode 100644 assets/images/ad-ops/multi-format/hb_format_video_banner.png create mode 100644 dev-docs/examples/multi-format-example.md create mode 100644 dev-docs/show-multi-format-ads.md create mode 100644 examples/multi_format_example.html diff --git a/_config.yml b/_config.yml index d03160a697..9f0b994ea9 100755 --- a/_config.yml +++ b/_config.yml @@ -69,6 +69,9 @@ nav_sections: - top_nav: dev_docs code: quick-start name: DEVELOPER QUICK START + - top_nav: dev_docs + code: prebid-multi-format + name: PREBID MULTI-FORMAT (ALPHA) - top_nav: dev_docs code: prebid-video name: PREBID VIDEO (BETA) diff --git a/adops/setting-up-prebid-multi-format-in-dfp.md b/adops/setting-up-prebid-multi-format-in-dfp.md new file mode 100644 index 0000000000..fbbd296704 --- /dev/null +++ b/adops/setting-up-prebid-multi-format-in-dfp.md @@ -0,0 +1,85 @@ +--- +layout: page +title: Setting up Prebid Multi-Format in DFP +head_title: Setting up Prebid Multi-Format in DFP +description: Setting up Prebid Multi-Format in DFP +pid: 3 +hide: false +top_nav_section: adops +nav_section: tutorials +--- + +
+ +# Setting up Prebid Multi-Format in DFP +{: .no_toc} + +This page shows how to set up your ad server so that you can serve multi-format ads. + +Multi-Format ads allow you to declare multiple media types on a single ad unit. For example, you can set up one ad on the page that could show a banner, native, or outstream video ad, depending on which had the highest bid. + +{: .alert.alert-info :} +For instructions on how to set up multi-format ads from the engineering side, see [Show Multi-Format Ads with Prebid.js]({{site.baseurl}}/dev-docs/show-multi-format-ads.html). + +* TOC +{: toc } + +## Step 1. Add an Ad Unit + +In DFP, [create an ad unit](https://support.google.com/dfp_premium/answer/177203?hl=en). + +Decide what combination of formats will be permitted on the ad unit. This will determine what sizes you allow to serve. The ad unit's sizes must be configured properly to support the combination of formats that will be permitted. + +If your ad unit will support native ads, you may want to create a custom **Prebid Native Format** and at least one **Prebid Native Style**. Examples of each are given in [Setting up Prebid Native in DFP][nativeAdSetup]. + +## Step 2. Add an Order + +In DFP, create a new order. This order will be associated with the multiple line items needed to run multi-format auctions. + +## Step 3. Add Line Items and Creatives for each Media Type + +Multi-format ad units which support native require at least two distinct sets of line items and creatives: + ++ One for [banners and/or outstream video][bannerAdSetup]. Banners and outstream videos will serve into a DFP banner creative. + ++ One for [native][nativeAdSetup]. Native ads will serve into a native creative with native format and styles. + +### Banner/Outstream + +Follow the instructions for creating line items and creatives in [Send all bids to the ad server][bannerAdSetup], with the following changes: + ++ Add key-value targeting for **'hb_format' is ('banner' OR 'video')** + + This will ensure that the appropriate ad server line item is activated for banner / outstream bids + + For bidder-specific line items, specify `hb_format_{BIDDER_CODE}`, e.g., `hb_format_appnexus` + + ![Set hb_format to 'banner,video']({{site.baseurl}}/assets/images/ad-ops/multi-format/hb_format_video_banner.png) + ++ Make sure that you're targeting the right sizes for both banner ads and any outstream ads you want to serve in this slot, e.g., + + 1x1 for outstream (or whatever size you pass into DFP as your outstream impression) + + whatever banner sizes are valid for your site / use case + +### Native + +Follow the instructions for creating line items, creatives, custom native formats, and native styles in [Show Native Ads][nativeAdSetup], with the following changes: + ++ Add key-value targeting for **'hb_format' is 'native'** + + ![Set 'hb_format' to 'native']({{site.baseurl}}/assets/images/ad-ops/multi-format/hb_format_native.png) + ++ Make sure you're targeting the right sizes for the native ads you want to serve: + + Fixed-size native, where you specify one or more absolute sizes + + Fluid, which expands to fit whatever space it's put in + + For more information on fluid vs. fixed, see [the DFP docs](https://support.google.com/dfp_premium/answer/6366914?hl=en) + +## Related Topics + ++ [Show Multi-Format Ads with Prebid.js]({{site.baseurl}}/dev-docs/show-multi-format-ads.html) (Engineering setup) ++ [Multi-Format Example]({{site.baseurl}}/dev-docs/examples/multi-format-example.html) (Example code) + +
+ + + +[bannerAdSetup]: {{site.baseurl}}/adops/send-all-bids-adops.html +[nativeAdSetup]: {{site.baseurl}}/adops/setting-up-prebid-native-in-dfp.html +[createCustomNativeFormat]: {{site.baseurl}}/adops/setting-up-prebid-native-in-dfp.html#create-a-custom-native-ad-format diff --git a/assets/images/ad-ops/multi-format/hb_format_native.png b/assets/images/ad-ops/multi-format/hb_format_native.png new file mode 100644 index 0000000000000000000000000000000000000000..206fb0747b594b56623d6211fa07ea68231a61cd GIT binary patch literal 6243 zcmZWsby!s2)*goLR2qhEkdnrsXOI{Wq`Q$6luk)$kdg+GlI~7v7)lr#K|qvlr0(Fo z-@U)*`OY8bS!b{HuD$kq&VKhgkuWtSd>kqq004jwg~)3H04NZoEs2GJyrWGp!2kf9 zQad?07*tLU1bgjlZRcPG06-#>Q!uqi=cxt`Mn943gUC4YL}cEB0XxEhf$mkrB+Bdz zXuyc#V(yBy_l%6egTczg=ySk9eIgBR?%;Okcm)M7-pBF^oA`%V&Z`m!?I(9``=ibs zS6cy{%|lY#sDV@P$5@GGlmN|3${rA(j-tFJ8R|VA7=Xci+EpdC15E7#KMSmp#iZUgU#{Ge@vu7MNOG*zvhrRv5T-D6J zo!|C^h2_mhYS`0=E4G}=PS1Xb=CN~&Es_&eLUVdGGZD! zTKz;AvJO{2zeu_qs9~nb*e8}8aFtY_rP*c<34yz^@{I<>PA3KXZM!WoyXLV&G~F^M zUL418?3~oQB2L__m_t0_b3_a!;nctP86r>QSgwNcbRvsDVlEwbmV8i2DM8(1CyYOs z85{Bq>T7N4xt4z5Cslx_UHG~vf~Nq=>UqlPuPuc*vshk7*pztW?u~r{y1ubHvSFd= zVx)mP?IPFH9Yye6jtGB8>HZjuu46PRNoo4$lW1!Wc;cH2S7}ZZ-uG02QGrY(*5mz8 zrrEe#atebaVHm%_)D!^HI@wpIgqcB@hbSl@H2GldKvWVi4pA_7JnqwAAPnto;Bqcd z>m6z?3Jv;z47DgKZ{Wz9_)koaE+!C0@0u_LDt$LInv7=z&LqeRf;tr%&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/multi-format/hb_format_video_banner.png b/assets/images/ad-ops/multi-format/hb_format_video_banner.png new file mode 100644 index 0000000000000000000000000000000000000000..3b7f43dd2bc70eb37143b59a69e4f346d6c71777 GIT binary patch literal 7122 zcmZX21yq~O)^(8LPKy_ZLXjZFrMSDhdm+KyOVQ$PMS})+r%0i=yA^10cPn4G@BQz+ zYyDYSStm1lADMY__DmvFl%z4yNYDTP0H&;rgc<+DD$ZalTYF0YKqewN1z7`sk!0Xxq>xaL@-<@~k7%R_V2>*>(6t&DPmX~K5k9=6 zgt>AflA1brFjx-v)ja&59*!zAb8rVZPEyi~l|VxBH|8k{cwOM6TS~&>HNrE72mp!pvb&mZ4?eY9JI zj?OKERE0bI?p@Apm*)=|!No&Q)N%jeuPDduuA&@1qt7j5&-#o%^IQ1pCq!j&ypi*? z8C^$764dMr1vrGR#?*S3P1RW%F2FMhM2bhKEhQjMT7k z$!v}*U*9C&4%E_;Wgg=S4mb%a&ynrWhJ=he(E~>UVx|*={dQbdXr1yHWYk=;Ce+WP z8TT$4oE9!zENMeL$LDdVO2bGGj;SIp#OdyWF|;F!Dft{b|5^ZL1%)_u&Ou1`$eCLb zjmjJC%DEPPB5c(F?ruySIL=D|am^y}bbl)ZZ4Slj43!vz(6y55l)n1l*zJ@NZsxm>goB)bs*ASH3a-0}&)C4eMED%WFzkSK_;S`dnK@IA_e z{t*75hw4<0mt5(y%Z9I~fC1KgkMxGtExhmBPK2mm^QXMZqA8_$QBATh-WM1Qi zp~PRwP^pE^P>;$WPkmky>lFAa( z#C=~)JIzaVG@DjaWWtKBzv(0$-oPdw=cn`ek8`krGD8_f_;e z^lJXnbIfjrTfqU5#SSoSMW12a0t88Of`Hv8{S@DG2G;wqw?5(yB4P%=`ksg*xq;7( zJA@L3x`V=l3PeeiAkJrU(!l?k78_uxIc$K6ygfQguKDkWVtw>6h zvt+q6dM0Y7ct%<61EV@)%4==A&l(Vo@)^Zao+$}iLtDZ<%_+Vq%c*yTV42t<9Lr0K z6^jLq1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o*oaJxfdCZRikFhR?-NvHp;r={{eMl$K~b@Z5EaJ~Z9L#1R5eG<0?A&X?Yc3`x~>TZZM zY$cCnHezz#C7`-C-!#6pZ<4&rNWEIh?P2BL&1663im*yB3I29#Q zmE7!o^&Sa>2$25ZYMOwV94KbfOer^2mV(H{xfJGNKWbEBN1$X}R+(Xne2SLg5{0UVyY~CZe}sP<7wb^IX=k(z~h0qhrB63e-z0c#K}3i>C1!7(YZI(2SVl zz1E9Zk0OGIL(AKi(qZvra+~l`-lqipJx~TC|2TsoFO^G9gLO@ z)9H>2pPdp|#XYpJTO>YF`9JtIO!BJ{?td? xcqn2pXNXu)FJZeWMQT3CoXWhM2}DsIDd4y5(w;kvV_yE$kd;)Ds1!2^{y*SIM!5h0 literal 0 HcmV?d00001 diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index b74ca59c86..501c82bd8f 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -96,7 +96,7 @@ Module that connects to Example's demand sources code: 'test-div', mediaTypes: { banner: { - sizes: [[300, 50]], // a mobile size + sizes: [[320, 50]], // a mobile size } }, bids: [ @@ -223,9 +223,9 @@ Sample array entry for `validBidRequests[]`: {% endhighlight %} {: .alert.alert-success :} -There are several IDs present in the bidRequest object: -- **Bid ID** is unique across ad units and bidders. -- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. +There are several IDs present in the bidRequest object: +- **Bid ID** is unique across ad units and bidders. +- **Auction ID** is unique per call to `requestBids()`, but is the same across ad units. - **Transaction ID** is unique for each ad unit with a call to `requestBids`, but same across bidders. This is the ID that DSPs need to recognize the same impression coming in from different supply sources. The ServerRequest objects returned from your adapter have this structure: diff --git a/dev-docs/docs-by-format.md b/dev-docs/docs-by-format.md index ca970d401c..ba73d0f3ea 100644 --- a/dev-docs/docs-by-format.md +++ b/dev-docs/docs-by-format.md @@ -20,18 +20,20 @@ For ad ops and other ad server-related information, see [our Ad Ops documentatio {:toc} {: .table .table-bordered .table-striped } -| Format | Page | -|---------------------+----------------------------------------------------------------------------------------------------------------------------------| -| *AMP* | [How Prebid on AMP Works]({{site.github.url}}/dev-docs/how-prebid-on-amp-works.html) | -| | [Show Prebid Ads on AMP Pages (Alpha)]({{site.github.url}}/dev-docs/show-prebid-ads-on-amp-pages.html) | -| *Video* (instream) | [Show Video Ads with a DFP Video Tag]({{site.github.url}}/dev-docs/show-video-with-a-dfp-video-tag.html) (With lots of examples) | -| | [How to Add a New Video Bidder Adapter]({{site.github.url}}/dev-docs/how-to-add-a-new-video-bidder-adaptor.html) | -| *Video* (outstream) | [Show Outstream Video Ads]({{site.github.url}}/dev-docs/show-outstream-video-ads.html) | -| | [Outstream Video Example]({{site.github.url}}/dev-docs/examples/outstream-video-example.html) | -| *Standard Display* | [Basic Prebid.js Example]({{site.github.url}}/dev-docs/examples/basic-example.html) | -| | [Getting Started]({{site.github.url}}/dev-docs/getting-started.html) | -| | [Ad Unit Refresh / Infinite Scroll Example]({{site.github.url}}/dev-docs/examples/adunit-refresh.html) | -| *Native* | [Show Native Ads with Prebid.js]({{site.github.url}}/dev-docs/show-native-ads.html) (Engineering setup) | -| | [Setting up Prebid Native in DFP]({{site.github.url}}/adops/setting-up-prebid-native-in-dfp.html) (Ad Ops setup) | +| Format | Page | +|---------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------| +| *Multi-Format (banner, native, outstream video all in one ad unit)* | [Show Multi-Format Ads with Prebid.js]({{site.baseurl}}/dev-docs/show-multi-format-ads.html) (Engineering setup) | +| | [Setting up Prebid Multi-Format in DFP]({{site.baseurl}}/adops/setting-up-prebid-multi-format-in-dfp.html) (Ad ops setup) | +| *AMP* | [How Prebid on AMP Works]({{site.github.url}}/dev-docs/how-prebid-on-amp-works.html) | +| | [Show Prebid Ads on AMP Pages (Alpha)]({{site.github.url}}/dev-docs/show-prebid-ads-on-amp-pages.html) | +| *Video* (instream) | [Show Video Ads with a DFP Video Tag]({{site.github.url}}/dev-docs/show-video-with-a-dfp-video-tag.html) (With lots of examples) | +| | [How to Add a New Video Bidder Adapter]({{site.github.url}}/dev-docs/how-to-add-a-new-video-bidder-adaptor.html) | +| *Video* (outstream) | [Show Outstream Video Ads]({{site.github.url}}/dev-docs/show-outstream-video-ads.html) | +| | [Outstream Video Example]({{site.github.url}}/dev-docs/examples/outstream-video-example.html) | +| *Standard Display* | [Basic Prebid.js Example]({{site.github.url}}/dev-docs/examples/basic-example.html) | +| | [Getting Started]({{site.github.url}}/dev-docs/getting-started.html) | +| | [Ad Unit Refresh / Infinite Scroll Example]({{site.github.url}}/dev-docs/examples/adunit-refresh.html) | +| *Native* | [Show Native Ads with Prebid.js]({{site.github.url}}/dev-docs/show-native-ads.html) (Engineering setup) | +| | [Setting up Prebid Native in DFP]({{site.github.url}}/adops/setting-up-prebid-native-in-dfp.html) (Ad Ops setup) | diff --git a/dev-docs/examples/multi-format-example.md b/dev-docs/examples/multi-format-example.md new file mode 100644 index 0000000000..57c4beb6b0 --- /dev/null +++ b/dev-docs/examples/multi-format-example.md @@ -0,0 +1,20 @@ +--- +layout: example +title: Prebid.js Multi-Format Example +description: Prebid.js Multi-Format Example +top_nav_section: dev_docs +nav_section: quick-start +hide: true +about: +- Multi-Format ads allow you to declare multiple media types on a single ad unit +- Set up one ad unit that could show a banner, native, or outstream video ad +- Any bidder that supports at least one of the listed media types can participate in the auction for that ad unit +- For engineering setup instructions, see
Show Multi-Format Ads +- For ad ops setup instructions, see Setting up Prebid Multi-Format in DFP +- Note - Outstream ads only work sporadically in the embedded JSFiddle below; try the Prebid.org-hosted Multi-Format Example +jsfiddle_link: jsfiddle.net/prebid/mg81j0rw/12/embedded/html,result +code_lines: 110 +code_height: 2389 +use_old_example_style: false +pid: 11 +--- diff --git a/dev-docs/publisher-api-reference.md b/dev-docs/publisher-api-reference.md index dd8f569b93..fd5dcadd53 100644 --- a/dev-docs/publisher-api-reference.md +++ b/dev-docs/publisher-api-reference.md @@ -14,7 +14,7 @@ pid: 10 This page has documentation for the public API methods of Prebid.js. {: .alert.alert-danger :} -Methods marked as deprecated will be removed in version 1.0 (scheduled for release Q4 2017). +Methods marked as deprecated were removed in version 1.0. For more information about the changes, see [the release announcement]({{site.baseurl}}/blog/prebid-1-is-released). After a transition period, documentation for these methods will be removed from Prebid.org (likely early 2018). @@ -605,7 +605,8 @@ See the table below for the list of properties in the `mediaTypes` object of the + [Native](#adUnit-native) + [Video](#adUnit-video) + [Banner](#adUnit-banner) -+ [Multi-format](#adUnit-multiformat) ++ [Multi-format](#adUnit-multi-format) + @@ -727,7 +728,7 @@ pbjs.addAdUnits({ }) ``` - + ##### Multi-format @@ -1119,7 +1120,7 @@ For an example showing how to use this method, see [Show Video Ads with a DFP Vi This method is deprecated as of version 0.27.0 and will be removed in version 1.0 (scheduled for release Q4 2017). Please use [`setConfig`](#module_pbjs.setConfig) instead. {: .alert.alert-danger :} -**BREAKING CHANGE** +**BREAKING CHANGE** As of version 0.27.0, To encourage fairer auctions, Prebid will randomize the order bidders are called by default. To replicate legacy behavior, call `pbjs.setBidderSequence('fixed')`. This method shuffles the order in which bidders are called. @@ -1307,9 +1308,9 @@ pbjs.setConfig({ bidderTimeout: 3000 }); {% endhighlight %} {: .alert.alert-warning :} -**Bid Timeouts and JavaScript Timers** -Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. -With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. +**Bid Timeouts and JavaScript Timers** +Note that it's possible for the timeout to be triggered later than expected, leading to a bid participating in the auction later than expected. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that *should* execute after this time but *it is not guaranteed*. +With a busy page load, bids can be included in the auction even if the time to respond is greater than the timeout set by Prebid.js. However, we do close the auction immediately if the threshold is greater than 200ms, so you should see a drop off after that period. For more information about the asynchronous event loop and `setTimeout`, see [How JavaScript Timers Work](https://johnresig.com/blog/how-javascript-timers-work/). @@ -1435,7 +1436,7 @@ However, there are also good reasons why publishers may want to control the use - *Security*: Publishers may want to control which bidders are trusted to inject images and JavaScript into their pages. {: .alert.alert-info :} -**User syncing default behavior** +**User syncing default behavior** If you don't tweak any of the settings described in this section, the default behavior of Prebid.js is to wait 3 seconds after the auction ends, and then allow every adapter to drop up to 5 image-based user syncs. For more information, see the sections below. @@ -1818,7 +1819,7 @@ var adserverTag = 'https://pubads.g.doubleclick.net/gampad/ads?' + 'sz=640x480&iu=/19968336/prebid_cache_video_adunit&impl=s&gdfp_req=1' + '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=http://www.example.com' + '&cust_params=section%3Dblog%26anotherKey%3DanotherValue'; - + var videoUrl = pbjs.adServers.dfp.buildVideoUrl({ adUnit: videoAdUnit, url: adserverTag diff --git a/dev-docs/show-multi-format-ads.md b/dev-docs/show-multi-format-ads.md new file mode 100644 index 0000000000..b92b386057 --- /dev/null +++ b/dev-docs/show-multi-format-ads.md @@ -0,0 +1,136 @@ +--- +layout: page +title: Show Multi-Format Ads with Prebid.js +description: Show Multi-Format Ads with Prebid.js +pid: 0 +is_top_nav: yeah +top_nav_section: dev_docs +nav_section: prebid-multi-format +--- + +
+ +# Show Multi-Format Ads with Prebid.js +{: .no_toc } + +This page has instructions for showing multi-format ads using Prebid.js. + +An ad unit is said to be multi-format if it supports at least two of the following media types: + ++ Banner ++ Native ++ Video + +Once declared, any bidder that supports at least one of the media types can participate in the auction for that ad unit. + +{: .alert.alert-info :} +For ad ops setup instructions, see [Setting up Prebid Multi-Format in DFP]({{site.baseurl}}/adops/setting-up-prebid-multi-format-in-dfp.html). + +* TOC +{:toc} + +## How Multi-Format Ads Work + +Prebid multi-format ad units allow direct competition between banner, native, and/or video bids. + +At a high level, Prebid.js supports multi-format ads as follows: + +1. An ad unit may define a [`mediaTypes`]({{site.baseurl}}/dev-docs/publisher-api-reference.html#addAdUnits-MediaTypes) object to specify one or more supported formats and their respective properties. +2. Each bidder specified on a given ad unit will be eligible to bid if the bidder supports at least one of the media types specified via `adUnit.mediaTypes`. +3. Prebid.js sends bid requests to each eligible bidder. + +The following key is added to your ad server targeting, and set to the value of the bid response's `mediaType` property. + ++ `hb_format` + +The ad ops team will reference this key in the ad server to set targeting. For ad ops setup instructions, see [Setting up Prebid Multi-Format in DFP]({{site.baseurl}}/adops/setting-up-prebid-multi-format-in-dfp.html). + +## Prerequisites + +Keep the following prerequisites in mind during the implementation: + ++ Make sure to work with bidders that support demand for the media types you want, particularly native and video. To see which bidders have native and/or video demand, see [Bidders with Video and Native Demand]({{site.baseurl}}/dev-docs/bidders.html#bidders-with-video-and-native-demand). + +## Implementation + +This section describes the implementation using code samples, but ignores some of the details that are common to all Prebid.js setups. + +### 1. Add multi-format ad units + +The ad unit below supports the banner, native, and video media types. + +```javascript + + pbjs.addAdUnits({ + code: 'div-banner-outstream-native', + mediaTypes: { + banner: { + sizes: [ + [300, 250], + [300, 50] + ] + }, + native: { + image: { + sizes: [ + [300, 250], + [300, 50] + ] + } + }, + video: { + context: 'outstream', + playerSize: [640, 480] + }, + }, + bids: [ + + { + bidder: 'bannerBidder', + params: { + placementId: '481' + } + }, + + { + bidder: 'nativeBidder', + params: { + titleAsset: '516' + } + }, + + { + bidder: 'videoBidder', + params: { + vidId: '234' + } + }, + + ] + }); +``` + +### 2. Add your tag to the page body + +Add a tag like the following to your page. Depending on who wins the auction, a banner, outstream, or native ad should serve. + +```html +
+

No response

+ +
+``` + +## Working Examples + ++ [Multi-Format Example]({{site.baseurl}}/examples/multi_format_example.html) + +## Related Topics + ++ [Setting up Prebid Multi-Format in DFP]({{site.baseurl}}/adops/setting-up-prebid-multi-format-in-dfp.html) + +
diff --git a/examples/index.html b/examples/index.html index 1a8f2ec0d3..7f76c97e39 100644 --- a/examples/index.html +++ b/examples/index.html @@ -14,6 +14,9 @@

Prebid.org Hosted Examples

  • Prebid Native
  • +
  • + Prebid Multi-Format +
  • diff --git a/examples/multi_format_example.html b/examples/multi_format_example.html new file mode 100644 index 0000000000..021a14a7e2 --- /dev/null +++ b/examples/multi_format_example.html @@ -0,0 +1,211 @@ + + + + + + + + + + + + + +

    Prebid Multi-Format Testing

    + +

    div-banner-native

    +
    +

    No response

    + +
    + +

    div-banner-outstream

    +
    +

    No response

    + +
    +
    + +

    div-banner-outstream-native

    +
    +

    No response

    + +
    +
    + + + From 21792fac01d4ab3bd86d4b796e1eb6631c353479 Mon Sep 17 00:00:00 2001 From: Matt Kendall Date: Tue, 30 Jan 2018 10:10:52 -0500 Subject: [PATCH 11/45] update prebid version download page 1.2.0 & 0.34.2 (#580) * update prebid version * review update --- download.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/download.md b/download.md index fdf7c598fd..3a08080d0c 100644 --- a/download.md +++ b/download.md @@ -28,7 +28,7 @@ $(function(){ }); $( ".selectpicker" ).change(function() { - if(this.value === '1.0.0') { + if(this.value.match(/1\.\d+\.\d+/i)) { $('.adapters .col-md-4').hide(); $('.prebid_1_0').show(); } @@ -135,8 +135,8 @@ To improve the speed and load time of your site, build Prebid.js for only the he

    Select Prebid Version

    From 34312ae5ed021ea490b15bf8c8b8cf27cb6907df Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 11:30:11 -0500 Subject: [PATCH 12/45] Provide a high-level description of an ad unit --- dev-docs/adunit-reference.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index cee3706de0..14b631ea80 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -12,12 +12,17 @@ pid: 10 # Ad Unit Reference {:.no_toc} -Correctly configuring the `adUnit` object is of central importance to setting up Prebid.js on your site. +The ad unit object is where you configure what kinds of ads you will show in a given ad slot on your page, including: -This page is an API reference describing all the features of the `adUnit`. ++ Allowed sizes ++ Allowed media types (e.g., banner, native, and/or video) -{: .alert.alert-success :} -This page is a work in progress. Over time, we will be pointing all `adUnit`-related documentation at this page. We are releasing it now in the hopes that it will be useful even in its incomplete state. +It's also where you will configure bidders, e.g.: + ++ Which bidders are allowed to bid for that ad slot ++ What information is passed to those bidders via their [parameters]({{site.baseurl}}/dev-docs/bidders.html) + +This page describes the properties of the `adUnit` object. * TOC {:toc} From f91563f442085f94a74a884ffef0c44d767bb1ba Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 11:38:59 -0500 Subject: [PATCH 13/45] Remove monospacing from section headers Also, remove some unnecessary nesting from a few headers --- dev-docs/adunit-reference.md | 39 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 14b631ea80..64c33e283d 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -27,10 +27,9 @@ This page describes the properties of the `adUnit` object. * TOC {:toc} -## `adUnit` - -See the table below for the list of properties on the ad unit. For example ad units, see the [Examples](#addAdUnits-Examples) below. +## adUnit +See the table below for the list of properties on the ad unit. For example ad units, see the [Examples](#adUnit-examples) below. {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -44,7 +43,7 @@ See the table below for the list of properties on the ad unit. For example ad u -### `adUnit.bids` +### adUnit.bids See the table below for the list of properties in the `bids` array of the ad unit. For example ad units, see the [Examples](#addAdUnits-Examples) below. @@ -58,7 +57,7 @@ See the table below for the list of properties in the `bids` array of the ad uni -### `adUnit.mediaTypes` +### adUnit.mediaTypes See the table below for the list of properties in the `mediaTypes` object of the ad unit. For example ad units showing the different media types, see the [Examples](#addAdUnits-Examples) below. @@ -71,7 +70,7 @@ See the table below for the list of properties in the `mediaTypes` object of the -#### `adUnit.mediaTypes.banner` +#### adUnit.mediaTypes.banner {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -81,7 +80,7 @@ See the table below for the list of properties in the `mediaTypes` object of the -#### `adUnit.mediaTypes.native` +#### adUnit.mediaTypes.native The `native` object contains the following properties that correspond to the assets of the native ad. @@ -115,7 +114,7 @@ The `native` object contains the following properties that correspond to the ass -##### `adUnit.mediaTypes.native.image` +##### adUnit.mediaTypes.native.image {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -126,7 +125,7 @@ The `native` object contains the following properties that correspond to the ass -###### `adUnit.mediaTypes.native.image.aspect_ratios` +###### adUnit.mediaTypes.native.image.aspect_ratios {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -137,7 +136,7 @@ The `native` object contains the following properties that correspond to the ass -##### `adUnit.mediaTypes.native.title` +##### adUnit.mediaTypes.native.title {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -147,7 +146,7 @@ The `native` object contains the following properties that correspond to the ass -##### `adUnit.mediaTypes.native.sponsoredBy` +##### adUnit.mediaTypes.native.sponsoredBy {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -156,14 +155,16 @@ The `native` object contains the following properties that correspond to the ass -##### `adUnit.mediaTypes.native.clickUrl` +##### adUnit.mediaTypes.native.clickUrl {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------+----------+---------+----------------------------------------------------------| | `required` | Required | Boolean | Whether a click URL asset is required on this native ad. | -##### `adUnit.mediaTypes.native.body` + + +##### adUnit.mediaTypes.native.body {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -172,7 +173,7 @@ The `native` object contains the following properties that correspond to the ass -##### `adUnit.mediaTypes.native.icon` +##### adUnit.mediaTypes.native.icon {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -183,7 +184,7 @@ The `native` object contains the following properties that correspond to the ass -###### `adUnit.mediaTypes.native.icon.aspect_ratios` +###### adUnit.mediaTypes.native.icon.aspect_ratios {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -194,7 +195,7 @@ The `native` object contains the following properties that correspond to the ass -#### `adUnit.mediaTypes.video` +#### adUnit.mediaTypes.video {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -213,7 +214,7 @@ The `native` object contains the following properties that correspond to the ass -##### Banner +### Banner For an example of a banner ad unit, see below. For more detailed instructions, see [Getting Started]({{site.baseurl}}/dev-docs/getting-started.html). @@ -236,7 +237,7 @@ pbjs.addAdUnits({ -##### Video +### Video For an example of an instream video ad unit, see below. For more detailed instructions, see [Show Video Ads]({{site.baseurl}}/dev-docs/show-video-with-a-dfp-video-tag.html). @@ -288,7 +289,7 @@ pbjs.addAdUnit({ -##### Native +### Native For an example of a native ad unit, see below. For more detailed instructions, see [Show Native Ads]({{site.baseurl}}/dev-docs/show-native-ads.html). From 59f410b1d5803759fd9fc81111e26527d7b71c8a Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 11:54:51 -0500 Subject: [PATCH 14/45] Fix up anchor links to use object properties --- dev-docs/adunit-reference.md | 90 ++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 64c33e283d..4a51f1937c 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -36,16 +36,16 @@ See the table below for the list of properties on the ad unit. For example ad u |--------------+----------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | | `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, prefer one of the `mediaTypes.*.sizes` listed below. | -| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#bids) below. | -| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [Media Types](#mediatypes) below. | +| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#adUnit.bids) below. | +| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | | `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | | `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | - + ### adUnit.bids -See the table below for the list of properties in the `bids` array of the ad unit. For example ad units, see the [Examples](#addAdUnits-Examples) below. +See the table below for the list of properties in the `bids` array of the ad unit. For example ad units, see the [Examples](#adUnit-examples) below. {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | @@ -55,20 +55,20 @@ See the table below for the list of properties in the `bids` array of the ad uni | `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | | `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | - + ### adUnit.mediaTypes -See the table below for the list of properties in the `mediaTypes` object of the ad unit. For example ad units showing the different media types, see the [Examples](#addAdUnits-Examples) below. +See the table below for the list of properties in the `mediaTypes` object of the ad unit. For example ad units showing the different media types, see the [Examples](#adUnit-examples) below. {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|----------+--------------------------------------------------------------+--------+------------------------------------------------------------------------------------------------| -| `banner` | Required, unless either of the other properties are present. | Object | Defines properties of a banner ad. For examples, see [`adUnit.mediaTypes.banner`](#banner). | -| `video` | Required, unless either of the other properties are present. | Object | Defines properties of a video ad. For examples, see [`adUnit.mediaTypes.video`](#video). | -| `native` | Required, unless either of the other properties are present. | Object | Defines properties of a native ad. For properties, see [`adUnit.mediaTypes.native`](#native). | +| Name | Scope | Type | Description | +|---------------------------------------+--------------------------------------------------------------+--------+------------------------------------------------------------------------------------------------------------------| +| [`banner`](#adUnit.mediaTypes.banner) | Required, unless either of the other properties are present. | Object | Defines properties of a banner ad. For examples, see [`adUnit.mediaTypes.banner`](#adUnit.mediaTypes.banner). | +| [`native`](#adUnit.mediaTypes.native) | Required, unless either of the other properties are present. | Object | Defines properties of a native ad. For properties, see [`adUnit.mediaTypes.native`](#adUnit.mediaTypes.native). | +| [`video`](#adUnit.mediaTypes.video) | Required, unless either of the other properties are present. | Object | Defines properties of a video ad. For examples, see [`adUnit.mediaTypes.video`](#adUnit.mediaTypes.video). | - + #### adUnit.mediaTypes.banner @@ -78,24 +78,24 @@ See the table below for the list of properties in the `mediaTypes` object of the | `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | | `name` | Optional | String | Name for this banner ad unit. Can be used for testing and debugging. | - + #### adUnit.mediaTypes.native The `native` object contains the following properties that correspond to the assets of the native ad. {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|---------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------| -| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | -| `type` | Optional | String | Used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | -| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#native-title). | -| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#native-body). | -| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#native-sponsoredby). | -| `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#native-icon). | -| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#native-image). | -| `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#native-clickurl). | -| `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#native-cta). | +| Name | Scope | Type | Description | +|---------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------| +| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `type` | Optional | String | Used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | +| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | +| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | +| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | +| `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | +| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | +| `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | +| `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#adUnit.mediaTypes.native.cta). |
    Prebid Native Ad Validation @@ -112,18 +112,18 @@ The `native` object contains the following properties that correspond to the ass

    -
    + ##### adUnit.mediaTypes.native.image {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|-----------------+----------+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------| -| `required` | Required | Boolean | Whether this asset is required. | -| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | -| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#native-image-aspectratios). | +| Name | Scope | Type | Description | +|-----------------+----------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------| +| `required` | Required | Boolean | Whether this asset is required. | +| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#adUnit.mediaTypes.native.image.aspect_ratios). | - + ###### adUnit.mediaTypes.native.image.aspect_ratios @@ -134,7 +134,7 @@ The `native` object contains the following properties that correspond to the ass | `ratio_height` | Required | Integer | This, combined with `ratio_width`, determines the required aspect ratio for an image that can serve. | | `ratio_width` | Required | Integer | See above. | - + ##### adUnit.mediaTypes.native.title @@ -144,7 +144,7 @@ The `native` object contains the following properties that correspond to the ass | `required` | Required | Boolean | Whether a title asset is required on this native ad. | | `len` | Optional | Integer | Length of title text, in characters. | - + ##### adUnit.mediaTypes.native.sponsoredBy @@ -153,7 +153,7 @@ The `native` object contains the following properties that correspond to the ass |------------+----------+---------+-----------------------------------------------------------| | `required` | Required | Boolean | Whether a brand name asset is required on this native ad. | - + ##### adUnit.mediaTypes.native.clickUrl @@ -171,29 +171,29 @@ The `native` object contains the following properties that correspond to the ass |------------+----------+---------+---------------------------------------------------| | `required` | Required | Boolean | Whether body text is required for this native ad. | - + ##### adUnit.mediaTypes.native.icon {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|-----------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------| -| `required` | Requird | Boolean | Whether an icon asset is required on this ad. | -| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | -| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`icon.aspect_ratios`](#native-icon-aspectratios). | +| Name | Scope | Type | Description | +|-----------------+----------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------| +| `required` | Required | Boolean | Whether an icon asset is required on this ad. | +| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`icon.aspect_ratios`](#adUnit.mediaTypes.native.icon.aspect_ratios). | - + ###### adUnit.mediaTypes.native.icon.aspect_ratios {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|----------------+-------+------+-------------| +| Name | Scope | Type | Description | +|----------------+----------+---------+------------------------------------------------------------------------------------------------------| | `min_width` | Optional | Integer | The minimum width required for an image to serve (in pixels). | | `ratio_height` | Required | Integer | This, combined with `ratio_width`, determines the required aspect ratio for an image that can serve. | | `ratio_width` | Required | Integer | See above. | - + #### adUnit.mediaTypes.video @@ -206,6 +206,8 @@ The `native` object contains the following properties that correspond to the ass | `protocols` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `protocols: [1,2,3,4,5,6,7,8]` | | `playbackmethod` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `playbackmethod: [2]` | + + ## Examples + [Banner](#adUnit-banner-example) From c24e6b51262a6355b883fb723aba4f95acbc5d50 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 11:58:22 -0500 Subject: [PATCH 15/45] Add multi-format example --- dev-docs/adunit-reference.md | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 4a51f1937c..3fcbed5489 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -213,6 +213,7 @@ The `native` object contains the following properties that correspond to the ass + [Banner](#adUnit-banner-example) + [Video](#adUnit-video-example) + [Native](#adUnit-native-example) ++ [Multi-Format](#adUnit-multi-format-example) @@ -332,6 +333,82 @@ pbjs.addAdUnits({ }) ``` + + +### Multi-Format + +For an example of a multi-format ad unit, see below. For more detailed instructions, see [Show Multi-Format Ads]({{site.baseurl}}/dev-docs/show-multi-format-ads.html). + +{% highlight js %} + + pbjs.addAdUnits([{ + code: 'div-banner-native', + mediaTypes: { + banner: { + sizes: [ + [300, 250] + ] + }, + native: { + type: 'image' + }, + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: 12340414, + } + }] + }, + + { + code: 'div-banner-outstream', + mediaTypes: { + banner: { + sizes: [ + [300, 250] + ] + }, + video: { + context: 'outstream', + playerSize: [300, 250] + }, + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: 12340414, + } + }, ] + }, + + { + code: 'div-banner-outstream-native', + mediaTypes: { + banner: { + sizes: [ + [300, 250] + ] + }, + native: { + type: 'image' + }, + video: { + context: 'outstream', + playerSize: [300, 250] + }, + }, + bids: [{ + bidder: 'appnexus', + params: { + placementId: 12340414, + } + }, ] + } + ]); + +{% endhighlight %} + ## Related Topics + [Publisher API Reference]({{site.baseurl}}/dev-docs/publisher-api-reference.html) From f3ffb3a89f1c0579033f9f8c6d406e18c24020a8 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 13:13:25 -0500 Subject: [PATCH 16/45] Update description of `sizes` per feedback --- dev-docs/adunit-reference.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 3fcbed5489..aa4b21b674 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -32,14 +32,14 @@ This page describes the properties of the `adUnit` object. See the table below for the list of properties on the ad unit. For example ad units, see the [Examples](#adUnit-examples) below. {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|--------------+----------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | -| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, prefer one of the `mediaTypes.*.sizes` listed below. | -| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#adUnit.bids) below. | -| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | -| `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | -| `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | +| Name | Scope | Type | Description | +|--------------+----------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | +| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, define sizes within the appropriate `mediaTypes.{banner,native,video}` object. | +| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#adUnit.bids) below. | +| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | +| `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | +| `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | From 73a556d52ee3b3a895f72351059ebcb2b5f78775 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 13:19:51 -0500 Subject: [PATCH 17/45] Update `bids` description based on feedback --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index aa4b21b674..f3c3d30d7a 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -36,7 +36,7 @@ See the table below for the list of properties on the ad unit. For example ad u |--------------+----------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | | `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, define sizes within the appropriate `mediaTypes.{banner,native,video}` object. | -| `bids` | Required | Array[Object] | Each bid represents a request to a bidder. For a list of properties, see [Bids](#adUnit.bids) below. | +| `bids` | Required | Array[Object] | Array of bid objects representing demand partners and associated parameters for a given ad unit. See [Bids](#adUnit.bids) below. | | `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | | `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | | `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | From d898dcbcdc4606891c0fb17f4298eb9c454493e7 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 13:24:46 -0500 Subject: [PATCH 18/45] Update `mediaTypes` description --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index f3c3d30d7a..d43c5f2491 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -37,7 +37,7 @@ See the table below for the list of properties on the ad unit. For example ad u | `code` | Required | String | Unique identifier you create and assign to this ad unit. Used to set query string targeting on the ad. If using GPT, we recommend setting this to slot element ID. | | `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. For 1.0 and later, define sizes within the appropriate `mediaTypes.{banner,native,video}` object. | | `bids` | Required | Array[Object] | Array of bid objects representing demand partners and associated parameters for a given ad unit. See [Bids](#adUnit.bids) below. | -| `mediaTypes` | Optional | Object | Defines the media type of the ad. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | +| `mediaTypes` | Optional | Object | Defines one or more media types that can serve into the ad unit. For a list of properties, see [`adUnit.mediaTypes`](#adUnit.mediaTypes) below. | | `labelAny` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | | `labelAll` | Optional | Array[String] | Used for [conditional ads][conditionalAds]. Works with `sizeConfig` argument to [pbjs.setConfig][setConfig]. | From 0d91a4c36244229e707c726798bec9d08b62e293 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 13:41:09 -0500 Subject: [PATCH 19/45] Edit scope description for `{banner,native,video}` --- dev-docs/adunit-reference.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index d43c5f2491..c9e2bba918 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -62,11 +62,11 @@ See the table below for the list of properties in the `bids` array of the ad uni See the table below for the list of properties in the `mediaTypes` object of the ad unit. For example ad units showing the different media types, see the [Examples](#adUnit-examples) below. {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|---------------------------------------+--------------------------------------------------------------+--------+------------------------------------------------------------------------------------------------------------------| -| [`banner`](#adUnit.mediaTypes.banner) | Required, unless either of the other properties are present. | Object | Defines properties of a banner ad. For examples, see [`adUnit.mediaTypes.banner`](#adUnit.mediaTypes.banner). | -| [`native`](#adUnit.mediaTypes.native) | Required, unless either of the other properties are present. | Object | Defines properties of a native ad. For properties, see [`adUnit.mediaTypes.native`](#adUnit.mediaTypes.native). | -| [`video`](#adUnit.mediaTypes.video) | Required, unless either of the other properties are present. | Object | Defines properties of a video ad. For examples, see [`adUnit.mediaTypes.video`](#adUnit.mediaTypes.video). | +| Name | Scope | Type | Description | +|---------------------------------------+--------------------------------------------------------------------------+--------+------------------------------------------------------------------------------------------------------------------| +| [`banner`](#adUnit.mediaTypes.banner) | At least one of the `banner`, `native`, or `video` objects are required. | Object | Defines properties of a banner ad. For examples, see [`adUnit.mediaTypes.banner`](#adUnit.mediaTypes.banner). | +| [`native`](#adUnit.mediaTypes.native) | At least one of the `banner`, `native`, or `video` objects are required. | Object | Defines properties of a native ad. For properties, see [`adUnit.mediaTypes.native`](#adUnit.mediaTypes.native). | +| [`video`](#adUnit.mediaTypes.video) | At least one of the `banner`, `native`, or `video` objects are required. | Object | Defines properties of a video ad. For examples, see [`adUnit.mediaTypes.video`](#adUnit.mediaTypes.video). | From deadcb48bebf2f9879c8c0a0d2795970712959d7 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:07:52 -0500 Subject: [PATCH 20/45] There is no `mediaTypes.native.sizes` --- dev-docs/adunit-reference.md | 1 - 1 file changed, 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index c9e2bba918..b274293892 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -87,7 +87,6 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |---------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------| -| `sizes` | Required | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | | `type` | Optional | String | Used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | | `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | | `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | From 3525e50bdf3974fb7003cf4db583de8886cd10bc Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:13:52 -0500 Subject: [PATCH 21/45] Add link to docs on pre-defined native types --- dev-docs/adunit-reference.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index b274293892..7a2ee63e8c 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -85,16 +85,16 @@ See the table below for the list of properties in the `mediaTypes` object of the The `native` object contains the following properties that correspond to the assets of the native ad. {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|---------------+----------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------| -| `type` | Optional | String | Used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | -| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | -| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | -| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | -| `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | -| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | -| `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | -| `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#adUnit.mediaTypes.native.cta). | +| Name | Scope | Type | Description | +|---------------+----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `type` | Optional | String | A [pre-defined native type]({{site.baseurl}}/dev-docs/show-native-ads.html#pre-defined-native-types) used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | +| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | +| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | +| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | +| `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | +| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | +| `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | +| `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#adUnit.mediaTypes.native.cta). |
    Prebid Native Ad Validation From d371f5bbaaf63b2a92bdf979259f7ba4082f3210 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:15:40 -0500 Subject: [PATCH 22/45] Update `native.title` description per feedback --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 7a2ee63e8c..a4f2b29f48 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -88,7 +88,7 @@ The `native` object contains the following properties that correspond to the ass | Name | Scope | Type | Description | |---------------+----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `type` | Optional | String | A [pre-defined native type]({{site.baseurl}}/dev-docs/show-native-ads.html#pre-defined-native-types) used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | -| `title` | Required | Object | The title of the ad, usually a call to action or a brand name. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | +| `title` | Required | Object | The title object is to be used for the title element of the native ad. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | | `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | | `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | | `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | From bccf932e264bebd7ff157cd90c2df7ed1d8f9d38 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:48:02 -0500 Subject: [PATCH 23/45] Mark all native assets as optional --- dev-docs/adunit-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index a4f2b29f48..cd8acf5937 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -88,9 +88,9 @@ The `native` object contains the following properties that correspond to the ass | Name | Scope | Type | Description | |---------------+----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `type` | Optional | String | A [pre-defined native type]({{site.baseurl}}/dev-docs/show-native-ads.html#pre-defined-native-types) used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | -| `title` | Required | Object | The title object is to be used for the title element of the native ad. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | -| `body` | Required | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | -| `sponsoredBy` | Required | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | +| `title` | Optional | Object | The title object is to be used for the title element of the native ad. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | +| `body` | Optional | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | +| `sponsoredBy` | Optional | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | | `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | | `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | | `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | From 900b2e45e49a01c8bd672cac25b3017a708bc5b9 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:50:34 -0500 Subject: [PATCH 24/45] Update `native.body` description --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index cd8acf5937..bfd8e09fac 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -89,7 +89,7 @@ The `native` object contains the following properties that correspond to the ass |---------------+----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `type` | Optional | String | A [pre-defined native type]({{site.baseurl}}/dev-docs/show-native-ads.html#pre-defined-native-types) used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | | `title` | Optional | Object | The title object is to be used for the title element of the native ad. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | -| `body` | Optional | Object | Text of the ad copy. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | +| `body` | Optional | Object | The body object is to be used for the body element of the native ad. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | | `sponsoredBy` | Optional | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | | `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | | `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | From a76188555845365175ba438debba72c46396c6d0 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:52:04 -0500 Subject: [PATCH 25/45] `sponsoredBy` is an object --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index bfd8e09fac..4f17d7f91c 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -90,7 +90,7 @@ The `native` object contains the following properties that correspond to the ass | `type` | Optional | String | A [pre-defined native type]({{site.baseurl}}/dev-docs/show-native-ads.html#pre-defined-native-types) used as a shorthand, e.g., `type: 'image'` implies required fields `image`, `title`, `sponsoredBy`, `clickUrl`. | | `title` | Optional | Object | The title object is to be used for the title element of the native ad. For properties, see [`native.title`](#adUnit.mediaTypes.native.title). | | `body` | Optional | Object | The body object is to be used for the body element of the native ad. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | -| `sponsoredBy` | Optional | String | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | +| `sponsoredBy` | Optional | Object | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | | `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | | `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | | `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | From 27bc64b9a5ed0d4d38155237363e39f5f71bfe5f Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 14:59:20 -0500 Subject: [PATCH 26/45] Update `native.image` description --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 4f17d7f91c..f53affc9ad 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -92,7 +92,7 @@ The `native` object contains the following properties that correspond to the ass | `body` | Optional | Object | The body object is to be used for the body element of the native ad. For properties, see [`native.body`](#adUnit.mediaTypes.native.body). | | `sponsoredBy` | Optional | Object | The name of the brand associated with the ad. For properties, see [`native.sponsoredBy`](#adUnit.mediaTypes.native.sponsoredby). | | `icon` | Optional | Object | The brand icon that will appear with the ad. For properties, see [`native.icon`](#adUnit.mediaTypes.native.icon). | -| `image` | Optional | Object | A picture that is associated with the brand, or grabs the user's attention. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | +| `image` | Optional | Object | The image object is to be used for the main image of the native ad. For properties, see [`native.image`](#adUnit.mediaTypes.native.image). | | `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | | `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#adUnit.mediaTypes.native.cta). | From ca5181dd6d04fb568f5062d09739abf6ab903247 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 15:48:06 -0500 Subject: [PATCH 27/45] Remove Prebid Native validation warning This already exists elsewhere, on the 'Show Native Ads' page. --- dev-docs/adunit-reference.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index f53affc9ad..dcaf8a8153 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -96,21 +96,6 @@ The `native` object contains the following properties that correspond to the ass | `clickUrl` | Optional | Object | Where the user will end up if they click the ad. For properties, see [`native.clickUrl`](#adUnit.mediaTypes.native.clickUrl). | | `cta` | Optional | Object | *Call to Action* text, e.g., "Click here for more information". For properties, see [`native.cta`](#adUnit.mediaTypes.native.cta). | -
    - Prebid Native Ad Validation -

    - Prebid.js validates the assets on native bid responses like so: -

      -
    • - If the asset is marked as "required", it checks the bid response to ensure the asset is part of the response -
    • -
    • - However, Prebid.js does not do any additional checking of a required asset beyond ensuring that it's included in the response; for example, it doesn't validate that the asset has a certain length or file size, just that that key exists in the response JSON -
    • -
    -

    -
    -
    ##### adUnit.mediaTypes.native.image From 083a24793ef198f14d0e7afa8096df70ff5f36a3 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 15:52:56 -0500 Subject: [PATCH 28/45] Native ad validation checks for landing page URL --- dev-docs/show-native-ads.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev-docs/show-native-ads.md b/dev-docs/show-native-ads.md index 15d631b924..399decbb52 100644 --- a/dev-docs/show-native-ads.md +++ b/dev-docs/show-native-ads.md @@ -100,6 +100,9 @@ Each key's value is an object with several fields. Most important is the `requi
  • However, Prebid.js does not do any additional checking of a required asset beyond ensuring that it's included in the response; for example, it doesn't validate that the asset has a certain length or file size, just that that key exists in the response JSON
  • +
  • + Finally, the response is checked to make sure it defines a landing page URL. +
  • From 84afc6ca0882b3ac4337b4ae30eec71c02079201 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 16:07:40 -0500 Subject: [PATCH 29/45] `sizes` and `aspect_ratios` are both allowed For example, see: https://github.com/prebid/Prebid.js/blob/master/test/spec/unit/core/adapterManager_spec.js#L836 --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index dcaf8a8153..35d0bd6939 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -105,7 +105,7 @@ The `native` object contains the following properties that correspond to the ass |-----------------+----------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------| | `required` | Required | Boolean | Whether this asset is required. | | `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | -| `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#adUnit.mediaTypes.native.image.aspect_ratios). | +| `aspect_ratios` | Optional | Array[Object] | Alongside `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#adUnit.mediaTypes.native.image.aspect_ratios). | From cecd7a49ef22aa3cd440d1160a45519fbd323317 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 16:09:28 -0500 Subject: [PATCH 30/45] Update `native.title.len` description --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 35d0bd6939..0c3b624d9b 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -126,7 +126,7 @@ The `native` object contains the following properties that correspond to the ass | Name | Scope | Type | Description | |------------+----------+---------+------------------------------------------------------| | `required` | Required | Boolean | Whether a title asset is required on this native ad. | -| `len` | Optional | Integer | Length of title text, in characters. | +| `len` | Optional | Integer | Maximum length of title text, in characters. | From 8b2c1c1802886beb2a35cfc69fdaed637f6bde46 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 16:15:06 -0500 Subject: [PATCH 31/45] Mark `context` as optional --- dev-docs/adunit-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 0c3b624d9b..cc1ab76c43 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -184,7 +184,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------------+----------+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------| -| `context` | Required | String | The video context, either `"instream"` or `"outstream"`. Example: `context: "outstream"` | +| `context` | Optional | String | The video context, either `"instream"` or `"outstream"`. Example: `context: "outstream"` | | `playerSize` | Optional | Array[Integer,Integer] | The size (width, height) of the video player on the page, in pixels. Example: `playerSize: [640, 480]` | | `mimes` | Optional | Array[String] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `mimes: ['video/mp4']` | | `protocols` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `protocols: [1,2,3,4,5,6,7,8]` | From dbc79b2dfbad41cf2fa5220b7fac1ecb91f42fb1 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Tue, 30 Jan 2018 16:34:12 -0500 Subject: [PATCH 32/45] Mark `required` properties as optional This seems to be confirmed by line 105 of `src/native.js` (as of this writing): ``` const requiredAssets = Object.keys(requestedAssets).filter( key => requestedAssets[key].required ); ``` --- dev-docs/adunit-reference.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index cc1ab76c43..645f2badbe 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -101,10 +101,10 @@ The `native` object contains the following properties that correspond to the ass ##### adUnit.mediaTypes.native.image {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|-----------------+----------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------| -| `required` | Required | Boolean | Whether this asset is required. | -| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | +| Name | Scope | Type | Description | +|-----------------+----------+---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------| +| `required` | Optional | Boolean | Whether this asset is required. | +| `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | | `aspect_ratios` | Optional | Array[Object] | Alongside `sizes`, you can define allowed aspect ratios. For properties, see [`image.aspect_ratios`](#adUnit.mediaTypes.native.image.aspect_ratios). | @@ -125,7 +125,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------+----------+---------+------------------------------------------------------| -| `required` | Required | Boolean | Whether a title asset is required on this native ad. | +| `required` | Optional | Boolean | Whether a title asset is required on this native ad. | | `len` | Optional | Integer | Maximum length of title text, in characters. | @@ -135,7 +135,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------+----------+---------+-----------------------------------------------------------| -| `required` | Required | Boolean | Whether a brand name asset is required on this native ad. | +| `required` | Optional | Boolean | Whether a brand name asset is required on this native ad. | @@ -144,7 +144,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------+----------+---------+----------------------------------------------------------| -| `required` | Required | Boolean | Whether a click URL asset is required on this native ad. | +| `required` | Optional | Boolean | Whether a click URL asset is required on this native ad. | @@ -153,7 +153,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |------------+----------+---------+---------------------------------------------------| -| `required` | Required | Boolean | Whether body text is required for this native ad. | +| `required` | Optional | Boolean | Whether body text is required for this native ad. | @@ -162,7 +162,7 @@ The `native` object contains the following properties that correspond to the ass {: .table .table-bordered .table-striped } | Name | Scope | Type | Description | |-----------------+----------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------| -| `required` | Required | Boolean | Whether an icon asset is required on this ad. | +| `required` | Optional | Boolean | Whether an icon asset is required on this ad. | | `sizes` | Optional | Array[Number] or Array[Array[Number]] | All sizes this ad unit can accept. Examples: `[400, 600]`, `[[300, 250], [300, 600]]`. | | `aspect_ratios` | Optional | Array[Object] | Instead of `sizes`, you can define allowed aspect ratios. For properties, see [`icon.aspect_ratios`](#adUnit.mediaTypes.native.icon.aspect_ratios). | From 7332e64a7297f7f0ee2d6bb76e4a9a1b93eb95d8 Mon Sep 17 00:00:00 2001 From: vedantseta Date: Tue, 30 Jan 2018 22:09:34 +0530 Subject: [PATCH 33/45] Media.net bidder added (#549) --- dev-docs/bidders/medianet.md | 20 ++++++++++++++++++++ index.md | 1 + 2 files changed, 21 insertions(+) create mode 100644 dev-docs/bidders/medianet.md diff --git a/dev-docs/bidders/medianet.md b/dev-docs/bidders/medianet.md new file mode 100644 index 0000000000..721cfefcb8 --- /dev/null +++ b/dev-docs/bidders/medianet.md @@ -0,0 +1,20 @@ +--- +layout: bidder +title: Media.net +description: Prebid Media.net Bidder Adaptor +top_nav_section: dev_docs +nav_section: reference +biddercode: medianet +biddercode_longer_than_12: false +hide: true +prebid_1_0_supported : true +--- + +### bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | +|----------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------| +| `cid` | required | The customer id provided by Media.net. | `"8CUX0H51C"` | +| `crid` | optional | The placement id provided by Media.net | `"1234567"` | +| `bidfloor` | optional | `Bidfloor for the impression`| `1.0`| diff --git a/index.md b/index.md index 55b1e57aad..c64a4d124f 100755 --- a/index.md +++ b/index.md @@ -119,6 +119,7 @@ description: Free and open source solutions for publishers to quickly implement

    Criteo

    PubWise

    AdOcean

    +

    Media.net

    From e5e69d1208c5f7657514128c3eabb689bae197b1 Mon Sep 17 00:00:00 2001 From: Snoop Date: Wed, 31 Jan 2018 18:51:59 +0200 Subject: [PATCH 34/45] vi bid adapter docs (#537) * vi bid adapter docs * VI bid adapter docs - added header * VI adapter docs - renamed file and changed according to example --- dev-docs/bidders/vi.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 dev-docs/bidders/vi.md diff --git a/dev-docs/bidders/vi.md b/dev-docs/bidders/vi.md new file mode 100644 index 0000000000..ec4bfe4541 --- /dev/null +++ b/dev-docs/bidders/vi.md @@ -0,0 +1,21 @@ +--- +layout: bidder +title: vi +description: vi bid adapter +top_nav_section: dev_docs +nav_section: reference +hide: true +biddercode: vi +biddercode_longer_than_12: false +prebid_1_0_supported : true +--- + +### bid params +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | +| :------------ | :------- | :---------------------------------------------- | :--------------------------------- | +| `pubId` | required | Publisher ID, provided by vi | 'sb_test' | +| `lang` | required | Ad language, in ISO 639-1 language code format | 'en-US', 'es-ES', 'de' | +| `cat` | required | Ad IAB category (top-level or subcategory), single one supported | 'IAB1', 'IAB9-1' | +| `bidFloor` | optional | Lowest value of expected bid price | 0.001 | + From 1a294984ff5a48cf8ebc6cbecc88faa2d8f94e27 Mon Sep 17 00:00:00 2001 From: NasmediaWebtech <34228109+NasmediaWebtech@users.noreply.github.com> Date: Thu, 1 Feb 2018 02:01:33 +0900 Subject: [PATCH 35/45] Add : docs for NasmediaAdmixer Adapter (#536) * Add: documentation for nasmediaAdmixer Adapter * Add: documentation for nasmediaAdmixer Adapter * Add: documentation for nasmediaAdmixer Adapter * Add: documentation for nasmediaAdmixer Adapter --- dev-docs/bidders/nasmediaAdmixer.md | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 dev-docs/bidders/nasmediaAdmixer.md diff --git a/dev-docs/bidders/nasmediaAdmixer.md b/dev-docs/bidders/nasmediaAdmixer.md new file mode 100644 index 0000000000..9889aca468 --- /dev/null +++ b/dev-docs/bidders/nasmediaAdmixer.md @@ -0,0 +1,39 @@ +--- +layout: bidder +title: Nasmedia Admixer +description: Prebid Nasmedia Admixer Bidder Adapter + +top_nav_section: dev_docs +nav_section: reference +hide: true + +biddercode: nasmediaAdmixer + +biddercode_longer_than_12: true +prebid_1_0_supported : true +--- + + +#### Send All Bids Ad Server Keys + +(Truncated to 20 chars due to [DFP limit](https://support.google.com/dfp_premium/answer/1628457?hl=en#Key-values)) + +`hb_pb_nasmediaAdmixe` +`hb_adid_nasmediaAdmi` +`hb_size_nasmediaAdmi` + +### Note: + +The Nasmedia Admixer Bidder Adapter requires setup and approval from the Nasmedia Admixer team. +Please reach out to for more information. + +### bid params + +{: .table .table-bordered .table-striped } + +| Name | Scope | Description | Example | +| :--------- | :------- | :--------------------------------------------- | :-------------- | +| `ax_key` | required | Publisher Key provided by Nasmedia Admixer |`'ajj7jba3'` | + +--- + From 74dd56c49db7f7681e4e7e2436b6a55a1284e2de Mon Sep 17 00:00:00 2001 From: Richard Strang <30629243+richardStrang@users.noreply.github.com> Date: Wed, 31 Jan 2018 17:11:06 +0000 Subject: [PATCH 36/45] Added Inskin bid adapter docs (#548) --- dev-docs/bidders/inskin.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dev-docs/bidders/inskin.md diff --git a/dev-docs/bidders/inskin.md b/dev-docs/bidders/inskin.md new file mode 100644 index 0000000000..9e1c99e9ea --- /dev/null +++ b/dev-docs/bidders/inskin.md @@ -0,0 +1,22 @@ +--- +layout: bidder +title: Inskin +description: Inskin Media Bidder Adaptor +top_nav_section: dev_docs +nav_section: reference +hide: true +biddercode: inskin +biddercode_longer_than_12: false +prebid_1_0_supported : true +--- + +### Note: +The Inskin bidder adapter requires additional setup and approval from the Inskin Media Integrations team. Please reach out to your account manager for more information and to start using it. + +### bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | +| :--- | :---- | :---------- | :------ | +| `siteId` | required | Site ID provided by Inskin. | `12345` | +| `networkId` | required | Network ID provided by Inskin. | `9969` | From 78b4bac33f47a79c5c3ca09efb0443c975fb2a66 Mon Sep 17 00:00:00 2001 From: Cameron Hotchkies Date: Wed, 31 Jan 2018 09:18:00 -0800 Subject: [PATCH 37/45] RockYou Adapter: Added docs for the RockYou Bidder Adapter (#551) --- dev-docs/bidders.md | 1 + dev-docs/bidders/rockyou.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 dev-docs/bidders/rockyou.md diff --git a/dev-docs/bidders.md b/dev-docs/bidders.md index c364e48814..a87698c157 100644 --- a/dev-docs/bidders.md +++ b/dev-docs/bidders.md @@ -108,6 +108,7 @@ The following parameters in the `bidResponse` object are common across all bidde | stickyadstv | native | | | tremor | video | | | unruly | video,native | | +| rockyou | video | X |
    diff --git a/dev-docs/bidders/rockyou.md b/dev-docs/bidders/rockyou.md new file mode 100644 index 0000000000..e69616c2a9 --- /dev/null +++ b/dev-docs/bidders/rockyou.md @@ -0,0 +1,18 @@ +--- +layout: bidder +title: RockYou +description: PreBid RockYou Bidder Adapter +top_nav_section: dev_docs +nav_section: reference +biddercode: rockyou +biddercode_longer_than_12: false +hide: true +prebid_1_0_supported: true +--- + +### bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | +| :--- | :---- | :---------- | :------ | +| `placementId` | required | The placement ID assigned to the publisher by RockYou | `4322` | From 16ae16ad32175c2475d1918c570e92b1ca9a31da Mon Sep 17 00:00:00 2001 From: Spacedragoon Date: Wed, 31 Jan 2018 18:29:14 +0100 Subject: [PATCH 38/45] Prebid v1 smart (#565) * Fix domain sample * Add HTTPS sample for domain parameter * Add HTTPS sample for domain parameter * Add Smart AdServer in the index and download list * Add currency parameter documentation * Revert "Merge remote-tracking branch 'refs/remotes/prebid/master'" This reverts commit 099edc2d8e4e993406c2cb89612ff6d297b4515b, reversing changes made to 07ce9fd7e2f3a2f11f6caf82e24c1f636fd91d03. * Update documentation Specify "target" parameter development status * Adding documentation for bidfloor parameter. * Update our adapter documentation --- dev-docs/bidders/smartadserver.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev-docs/bidders/smartadserver.md b/dev-docs/bidders/smartadserver.md index f0d11f7266..55cb1b3229 100644 --- a/dev-docs/bidders/smartadserver.md +++ b/dev-docs/bidders/smartadserver.md @@ -12,6 +12,8 @@ biddercode: smartadserver biddercode_longer_than_12: false +prebid_1_0_supported: true + --- ### Note: @@ -26,6 +28,6 @@ The Smart AdServer bidder adaptor requires setup and approval from the Smart AdS | `siteId` | required | The placement site ID | `1234` | | `pageId` | required | The placement page ID | `1234` | | `formatId` | required | The placement format ID | `1234` | -| `target` | optional | The keyword targeting (not yet supported) | `"sport=tennis"` | +| `target` | optional | The keyword targeting | `"sport=tennis"` | | `currency` | optional | Override the default currency code (ISO 4217) of the ad request. (Default: `"USD"`) | `"EUR"` | | `bidfloor` | optional | Bid floor for this placement in USD or in the currency specified by the `currency` parameter. (Default: `0.0`) | `0.42` | From b915ccaa44af4038fcdaa05c673313f4df279f28 Mon Sep 17 00:00:00 2001 From: Mike Callari Date: Wed, 31 Jan 2018 13:58:28 -0500 Subject: [PATCH 39/45] Adding Optimera doc. (#569) --- dev-docs/bidders/optimera.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dev-docs/bidders/optimera.md diff --git a/dev-docs/bidders/optimera.md b/dev-docs/bidders/optimera.md new file mode 100644 index 0000000000..58a881afe0 --- /dev/null +++ b/dev-docs/bidders/optimera.md @@ -0,0 +1,19 @@ +--- +layout: bidder +title: Optimera +description: Optimera Bidder Adaptor +top_nav_section: dev_docs +nav_section: reference +hide: true +biddercode: optimera +biddercode_longer_than_12: false +prebid_1_0_supported: true +--- + +### bid params + +{: .table .table-bordered .table-striped } + +| Name | Scope | Description | Example | +| :--- | :---- | :---------- | :------ | +| clientID | required | The Optimera Client ID | `"123"` | From 201f427748451ce01330043275d5a194ff63f423 Mon Sep 17 00:00:00 2001 From: Mike Chowla Date: Wed, 31 Jan 2018 11:22:10 -0800 Subject: [PATCH 40/45] PubMatic 1.0 Adapter Updates (#530) * PubMatic 1.0 Adapter Updates * Remove $$PREBID_GLOBAL$$ reference * Add prebid_1_0_supported flag --- dev-docs/bidders/pubmatic.md | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/dev-docs/bidders/pubmatic.md b/dev-docs/bidders/pubmatic.md index a19fe0e851..bf6ed4f346 100644 --- a/dev-docs/bidders/pubmatic.md +++ b/dev-docs/bidders/pubmatic.md @@ -1,26 +1,46 @@ --- layout: bidder -title: Pubmatic -description: Prebid Pubmatic Bidder Adaptor - +title: PubMatic +description: Prebid PubMatic Bidder Adaptor top_nav_section: dev_docs nav_section: reference - hide: true - biddercode: pubmatic - biddercode_longer_than_12: false - +prebid_1_0_supported : true --- ### Prebid Server Note: Before configuring the PubMatic adapter as S2S, you must reach out to the PubMatic team for approval and setup steps. +### Prebid 1.0 Upgrade Note: +If you upgrading from a Prebid version prior to 1.0, please reach out to your PubMatic Customer Success Manager prior to your upgrade. Publisher accounts need new settings to function correctly with the PubMatic Prebid 1.0 adapter and your Customer Success Manager will ensure your account is setup correctly. + ### bid params {: .table .table-bordered .table-striped } | Name | Scope | Description | Example | | :--- | :---- | :---------- | :------ | -| `publisherId` | required | The publisher ID | "32572" | -| `adSlot` | required | the unit ID | "38519891@300x250" | +| `publisherId` | required | Publisher ID | "32572" | +| `adSlot` | required | Ad Unit ID | "38519891@300x250" | +| `pmzoneid` | optional | Zone ID | "zone1,zone2" | +| `lat` | optional | Latitude | "40.712775" | +| `lon` | optional | Longitude | "-74.005973" | +| `yob` | optional | Year of Birth | "1982" | +| `gender` | optional | Gender | "M" | +| `kadpageurl` | optional | Overrides Page URL | "http://www.yahoo.com/" | +| `kadfloor` | optional | Bid Floor | "1.75" | + +### Configuration + +PubMatic recommends the UserSync configuration below. Without it, the PubMatic adapter will not able to perform user syncs, which lowers match rate and reduces monetization. + +```javascript +pbjs.setConfig({ + userSync: { + iframeEnabled: true, + enabledBidders: ['pubmatic'], + syncDelay: 6000 + }}); +``` +Note: Combine the above the configuration with any other UserSync configuration. Multiple setConfig() calls overwrite each other and only last call for a given attribute will take effect. From 67e7f23f4988a908fd34586b3fef4557d0e6f89a Mon Sep 17 00:00:00 2001 From: agon-qurdina <34247167+agon-qurdina@users.noreply.github.com> Date: Wed, 31 Jan 2018 21:04:53 +0100 Subject: [PATCH 41/45] Gjirafa bidder params documentation (#483) * Gjirafa bidder params documentation * Add Prebid 1.0 supported line * Change prebid support line --- dev-docs/bidders/gjirafa.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dev-docs/bidders/gjirafa.md diff --git a/dev-docs/bidders/gjirafa.md b/dev-docs/bidders/gjirafa.md new file mode 100644 index 0000000000..380870bc93 --- /dev/null +++ b/dev-docs/bidders/gjirafa.md @@ -0,0 +1,30 @@ + +--- +prebid_1_0_supported : true +layout: bidder +title: Gjirafa +description: Prebid Gjirafa Bidder Adaptor + +top_nav_section: dev_docs +nav_section: reference + +hide: true + +biddercode: gjirafa + +biddercode_longer_than_12: false + + +--- + +### Note: +The Gjirafa Header Bidding adapter requires to have: placementId param in place OR minCPM and minCPC params. + +### bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | +| :--- | :---- | :---------- | :------ | +| `placementId` | optional | Your PlacementId (provided by Gjirafa) | `71-1` | +| `minCPM` | optional | The minCPM for units returned by Gjirafa (required if placementId is not provided) | `0.50` | +| `minCPC` | optional | The minCPC for units returned by Gjirafa (required if placementId is not provided) | `0.50` | \ No newline at end of file From be02c24ecccadb8f1089271842ba4972080cf54b Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Wed, 31 Jan 2018 16:06:30 -0500 Subject: [PATCH 42/45] Add `body.len` to table with description --- dev-docs/adunit-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 645f2badbe..603326949a 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -154,6 +154,7 @@ The `native` object contains the following properties that correspond to the ass | Name | Scope | Type | Description | |------------+----------+---------+---------------------------------------------------| | `required` | Optional | Boolean | Whether body text is required for this native ad. | +| `len` | Optional | Integer | Maximum length of body text, in characters. | From 53a6e3f0e4c14c7de54602439ba236c366a4234c Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Wed, 31 Jan 2018 17:25:24 -0500 Subject: [PATCH 43/45] Update `mimes`, `protocols`, `playbackmethods` --- dev-docs/adunit-reference.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 603326949a..e71a5a3cae 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -183,13 +183,13 @@ The `native` object contains the following properties that correspond to the ass #### adUnit.mediaTypes.video {: .table .table-bordered .table-striped } -| Name | Scope | Type | Description | -|------------------+----------+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------| -| `context` | Optional | String | The video context, either `"instream"` or `"outstream"`. Example: `context: "outstream"` | -| `playerSize` | Optional | Array[Integer,Integer] | The size (width, height) of the video player on the page, in pixels. Example: `playerSize: [640, 480]` | -| `mimes` | Optional | Array[String] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `mimes: ['video/mp4']` | -| `protocols` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `protocols: [1,2,3,4,5,6,7,8]` | -| `playbackmethod` | Optional | Array[Integer] | Required by OpenRTB when using [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html). Example: `playbackmethod: [2]` | +| Name | Scope | Type | Description | +|------------------+-------------+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `context` | Optional | String | The video context, either `"instream"` or `"outstream"`. Example: `context: "outstream"` | +| `playerSize` | Optional | Array[Integer,Integer] | The size (width, height) of the video player on the page, in pixels. Example: `playerSize: [640, 480]` | +| `mimes` | Recommended | Array[String] | Content MIME types supported, e.g., `"video/x-ms-wmv"`, `"video/mp4"`. **Required by OpenRTB when using [Prebid Server][pbServer]**. | +| `protocols` | Optional | Array[Integer] | Array of supported video protocols. For list, see [OpenRTB spec][openRTB]. **Required by OpenRTB when using [Prebid Server][pbServer]**. | +| `playbackmethod` | Optional | Array[Integer] | Allowed playback methods. If none specified, all are allowed. For list, see [OpenRTB spec][openRTB]. **Required by OpenRTB when using [Prebid Server][pbServer]**. | @@ -410,3 +410,5 @@ For an example of a multi-format ad unit, see below. For more detailed instruct [conditionalAds]: {{site.baseurl}}/dev-docs/conditional-ad-units.html [setConfig]: {{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.setConfig +[openRTB]: https://www.iab.com/wp-content/uploads/2015/05/OpenRTB_API_Specification_Version_2_3_1.pdf +[pbServer]: {{site.baseurl}}/dev-docs/get-started-with-prebid-server.html From 0333fd6f6158b455524fce7495967ed098b95cd6 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Thu, 8 Feb 2018 10:52:06 -0500 Subject: [PATCH 44/45] s/sizes/playerSize/g for video ads --- dev-docs/adunit-reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index e71a5a3cae..e443d6f27e 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -235,7 +235,7 @@ pbjs.addAdUnits({ mediaTypes: { video: { context: "instream", - sizes: [640, 480], + playerSize: [640, 480], }, }, bids: [{ @@ -259,7 +259,7 @@ pbjs.addAdUnit({ mediaTypes: { video: { context: 'outstream', - sizes: [640, 480] + playerSize: [640, 480] } }, renderer: { From 42b9c7d293fb3317a7d9a32abeb3cefa763d1490 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Thu, 8 Feb 2018 11:03:28 -0500 Subject: [PATCH 45/45] Pass `placementId` as a string in examples --- dev-docs/adunit-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index e443d6f27e..52976f4758 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -341,7 +341,7 @@ For an example of a multi-format ad unit, see below. For more detailed instruct bids: [{ bidder: 'appnexus', params: { - placementId: 12340414, + placementId: '12340414', } }] }, @@ -362,7 +362,7 @@ For an example of a multi-format ad unit, see below. For more detailed instruct bids: [{ bidder: 'appnexus', params: { - placementId: 12340414, + placementId: '12340414', } }, ] }, @@ -386,7 +386,7 @@ For an example of a multi-format ad unit, see below. For more detailed instruct bids: [{ bidder: 'appnexus', params: { - placementId: 12340414, + placementId: '12340414', } }, ] }