Skip to content

Commit f0e8dbd

Browse files
authored
pub-api update for server-side aliases (prebid#1933)
1 parent 353da03 commit f0e8dbd

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

dev-docs/publisher-api-reference.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,10 @@ If you define an alias and are using `pbjs.sendAllBids`, you must also set up ad
12481248
+ `hb_size_newalias`
12491249
+ `hb_deal_newalias`
12501250

1251+
{: .alert.alert-info :}
1252+
Creating an alias for a Prebid Server adapter is done differently. See 'extPrebid'
1253+
config in the [`s2sConfig`](#setConfig-Server-to-Server) object.
1254+
12511255
<hr class="full-rule" />
12521256

12531257
<a name="module_pbjs.setConfig"></a>
@@ -1650,7 +1654,7 @@ Example config for [server-to-server]({{site.baseurl}}/dev-docs/get-started-with
16501654
pbjs.setConfig({
16511655
s2sConfig: {
16521656
accountId: '1',
1653-
bidders: ['appnexus', 'pubmatic'],
1657+
bidders: ['appnexus', 'openx', 'tripleliftVideo'],
16541658
defaultVendor: 'appnexus',
16551659
timeout: 1000,
16561660
adapterOptions: {
@@ -1661,9 +1665,13 @@ pbjs.setConfig({
16611665
'openx': function(type, url, bidder) {
16621666
const publisherId = '00000123231231'
16631667
url += `&ri=${publisherId}`;
1664-
16651668
return url
16661669
}
1670+
},
1671+
extPrebid: {
1672+
aliases: {
1673+
tripleliftVideo: tripleLift
1674+
}
16671675
}
16681676
}
16691677
})
@@ -1684,7 +1692,7 @@ Additional information of `s2sConfig` properties:
16841692
| `syncEndpoint` | Required | URL | Defines the cookie_sync endpoint for the Prebid Server cluster |
16851693
| `userSyncLimit` | Optional | Integer | Max number of userSync URLs that can be executed by Prebid Server cookie_sync per request. If not defined, PBS will execute all userSync URLs included in the request. |
16861694
| `adapterOptions` | Optional | Object | Arguments will be added to resulting OpenRTB payload to Prebid Server in every impression object at request.imp[].ext.BIDDER. See the example above. |
1687-
| `extPrebid` | Optional | Object | Arguments will be added to resulting OpenRTB payload to Prebid Server in request.ext.prebid. See video-related example below. |
1695+
| `extPrebid` | Optional | Object | Arguments will be added to resulting OpenRTB payload to Prebid Server in request.ext.prebid. See the examples below. |
16881696
| `syncUrlModifier` | Optional | Object | Function to modify a bidder's sync url before the actual call to the sync endpoint. Bidder must be enabled for s2sConfig. |
16891697

16901698
**Notes on s2sConfig properties**
@@ -1725,7 +1733,17 @@ pbjs.setConfig({
17251733

17261734
Additional options for `s2sConfig` may be enabled by including the [Server-to-Server testing module]({{site.baseurl}}/dev-docs/modules/s2sTesting.html).
17271735

1728-
**ExtPrebid Convention**
1736+
**Server-Side Aliases**
1737+
1738+
You may want to run a particular bidder on the client for banner, but that same bidder on the
1739+
server for video. You would do this by setting a **server-side** alias. The
1740+
[example](#setConfig-Server-to-Server) at the start of this section provides an example. Here's how it works:
1741+
1742+
1. Video ad units are coded with the dynamic alias. e.g. tripleliftVideo
1743+
1. The s2sConfig.bidders array contains 'tripleliftVideo' telling Prebid.js to direct bids for that code to the server
1744+
1. Finally, the extPrebid.aliases line tells Prebid Server to route the 'tripleliftVideo' biddercode to the 'triplelift' server-side adapter.
1745+
1746+
**Passing the Referrer to Server Side Adapters**
17291747

17301748
* Setting `extPrebid.origreferrer` will be recognized by some server-side adapters as the referring URL for the current page.
17311749

0 commit comments

Comments
 (0)