From d32e5dff78553478d3f1cdd321468e6406cbc471 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] 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: [{