Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tag samples with multiformat syntax #528

Merged
merged 3 commits into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions _includes/getting-started/register-bidder-tag-ids.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
68 changes: 40 additions & 28 deletions dev-docs/bidder-adaptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/get-started-with-prebid-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
27 changes: 16 additions & 11 deletions dev-docs/prebid-1.0-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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"]
Expand Down
26 changes: 15 additions & 11 deletions dev-docs/publisher-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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: [{
Expand All @@ -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: {
Expand Down Expand Up @@ -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: [{
Expand Down
8 changes: 4 additions & 4 deletions dev-docs/show-outstream-video-ads.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions dev-docs/show-video-with-a-dfp-video-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: [{
Expand Down