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

rubicon adapter: first party data docs #2913

Merged
merged 1 commit into from
Apr 28, 2021
Merged
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
86 changes: 81 additions & 5 deletions dev-docs/bidders/rubicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,87 @@ For both Prebid.js and Prebid Server, the Rubicon Project adapter requires setup
| `userId` | optional | Site-specific user ID may be reflected back in creatives for analysis. Note that userId needs to be the same for all slots. | `'12345abc'` | `string` |
| `floor` | optional | Sets the global floor -- no bids will be made under this value. | `0.50` | `float` |
| `latLong` | optional | Sets the latitude and longitude for the visitor (avail since PBJS 1.10) | `[40.7608, 111.8910]` | `Array<float>` |
| `inventory` | optional | Use this for First Party Data before PBJS 4.26. Between 4.26 and 4.29 (inclusive) use the `fpd` method of [First Party Data](/features/firstPartyData.html). In release 4.30 and later, use the `ortb2` method of setting First Party Data. In 4.25 and earlier, this parameter allows the definition of an object defining arbitrary key-value pairs concerning the page for use in targeting. The values must be arrays. | `{"rating":["5-star"], "prodtype":["tech","mobile"]}` | `object` |
| `visitor` | optional | Use this for First Party Data before PBJS 4.26. Between 4.26 and 4.29 (inclusive) use the `fpd` method of [First Party Data](/features/firstPartyData.html). In release 4.30 and later, use the `ortb2` method of setting First Party Data. In 4.25 and earlier, this parameter allows the definition of an object defining arbitrary key-value pairs concerning the visitor for use in targeting. The values must be arrays. | `{"ucat":["new"], "search":["iphone"]}` | `object` |
| `keywords` | optional | Deprecated - please use the [First Party Data feature](/features/firstPartyData.html), e.g. AdUnit.fpd.context.data.keywords. This is a legacy parameter that only works for client-side display. To get video or server-side reporting, please use First Party data or the inventory/visitor parameters. The order of precedence for banner is: params.keywords, AdUnit.fpd.context.data.keywords, config.fpd.keywords. | `['travel', 'tourism']` | `Array<string>` |
| `inventory` | optional | See below for details on First Party Data. In release 4.29 and earlier, this parameter allows the definition of an object defining arbitrary key-value pairs concerning the page for use in targeting. The values must be arrays. | `{"rating":["5-star"], "prodtype":["tech","mobile"]}` | `object` |
| `visitor` | optional | See below for details on First Party Data. In release 4.29 and earlier, this parameter allows the definition of an object defining arbitrary key-value pairs concerning the visitor for use in targeting. The values must be arrays. | `{"ucat":["new"], "search":["iphone"]}` | `object` |
| `keywords` | optional | See below for details on First Party Data. In release 4.29 and earlier, this can be used to influence reports for client-side display. To get video or server-side reporting, please use First Party data or the inventory/visitor parameters. | `['travel', 'tourism']` | `Array<string>` |
| `video` | required for video | Video targeting parameters. See the [video section below](#rubicon-video). | `{"language": "en"}` | `object` |

#### First Party Data

Rubicon Project requires that first party data be split into two categories: "inventory" and "visitor".

For Prebid.js 4.29 and before, use the bidder specific AdUnit parameters noted above:
```
var adUnit = {
...
bids: [{
bidder: 'rubicon',
params: {
accountId: 7780, // replace account/site/zone params
siteId: 87184,
zoneId: 413290,
inventory: {
prodtype: ["tech","mobile"]
},
visitor: {
ucat:["new"]
}
}
}]
};
```

In release 4.30 and later, we recommend using the `ortb2` method of setting [First Party Data](/features/firstPartyData.html). This can be done in two ways: global (cross-bidder) or bidder-specific.

Example first party data available to all bidders and all adunits:
```
pbjs.setConfig({
ortb2: {
site: {
keywords: "kw1,kw2", // sent to Rubicon as 'keywords' available in reports for client-side display ads
ext: {
data: {
prodtype: ["tech","mobile"] // site.ext.data is sent to Rubicon as "inventory" data
}
}
},
user: {
ext: {
data: {
ucat:["new"] // user.ext.data is sent to Rubicon as "visitor" data
}
}
}
}
};
```

Example of first party data available only to the Rubicon Project bidder. Applies across all ad units.
```
pbjs.setBidderConfig({
bidders: ["rubicon"],
config: {
ortb2: {
site: {
keywords: "kw1,kw2", // sent to Rubicon as 'keywords' available in reports for client-side display ads
ext: {
data: {
prodtype: ["tech","mobile"] // site.ext.data is sent to Rubicon as "inventory" data
}
}
},
user: {
ext: {
data: {
ucat:["new"] // user.ext.data is sent to Rubicon as "visitor" data
}
}
}
}
}
};
```

#### mediaTypes.video

The following video parameters are supported here so publishers may fully declare their video inventory:
Expand Down Expand Up @@ -91,9 +167,9 @@ var videoAdUnit = {
}
},
bids: [{
bidder: 'rubicon', // replace bidders
bidder: 'rubicon',
params: {
accountId: 7780, // and params
accountId: 7780, // replace params
siteId: 87184,
zoneId: 413290,
video: {
Expand Down