Skip to content

Commit 42cb0e8

Browse files
committed
updated docs for prev auction info based on PBJS PR 12831
1 parent 09eda77 commit 42cb0e8

File tree

2 files changed

+79
-48
lines changed

2 files changed

+79
-48
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: page_v2
3+
page_type: module
4+
title: Module - Previous Auction Info
5+
description: Allows publishers and bidders to collect and inject past auction data into future bid requests
6+
module_code : previousAuctionInfo
7+
display_name : Previous Auction Info
8+
enable_download : true
9+
sidebarType : 1
10+
11+
---
12+
13+
# Previous Auction Info
14+
15+
## Overview
16+
17+
The Previous Auction Info module enables functionality to collect prior auction data for participating bidders and publishers (This feature is `opt-in`, by default it is disabled).
18+
19+
## How to Enable the Module
20+
21+
A Publisher must do the following in order for the module to work:
22+
23+
* Include the Previous Auction Info module within your Prebid.js build: [https://docs.prebid.org/download.html](https://docs.prebid.org/download.html)
24+
25+
* Configure Prebid.js to enable the Previous Auction Info module:
26+
27+
```javascript
28+
pbjs.setConfig({previousAuctionInfo: { enabled: true, bidders: ['bidderCode1', 'bidderCode2'], maxQueueLength: 10 }})
29+
```
30+
31+
* Only valid bid requests submitted by bidders who have enabled the Previous Auction Info module will be permitted.
32+
33+
If the requirements above are met, the flow for how the module works is as follows:
34+
35+
1. A Prebid.js auction runs and completes.
36+
1. At the end of an auction, details about the auction are collected from each bidder using the module.
37+
1. If a Prebid bid wins, then the `rendered` field is updated to `1` to indicate this in the collected auction data for all bidders who bid on the same adunit within the same Prebid auction.
38+
1. During the next Prebid.js auction, if a bidder has this module enabled AND submits a valid bid request, then previous auction info data will be injected into the bidder's bid request of the new auction within the following path: `ortb2.ext.prebid.previousauctioninfo`.
39+
40+
## Configuration Options
41+
42+
{: .table .table-bordered .table-striped }
43+
| Field | Required? | Type | Description |
44+
|---|---|---|---|
45+
| previousAuctionInfo.enabled | yes | boolean | Enables/disables the module. |
46+
| previousAuctionInfo.bidders | no | array of strings | Array of bidder codes to determine which bidders are allowed to receive collected previous auction info. Omitting this field will enable all bidders. |
47+
| previousAuctionInfo.maxQueueLength | no | integer | The number of previous auction info payloads to store/collect per bidder before injecting these payloads into the bidstream. Any payloads collected for a bidder during one auction will be injected into the bidstream during the next auction that the same bidder participates in with valid bids. If this field is omitted, the value of this field is 10. |
48+
49+
## Example of Previous Auction Info Payload
50+
51+
`previousAuctionInfo` is an array of prior auction data catered to a specific bidder (if present, it will be added to a bidder's bid request). See below for an example of how the structure of the data looks (Note: Once collected previous auction data has been injected into the bid stream, then it is removed and no longer stored within the module):
52+
53+
```javascript
54+
ortb2: {
55+
ext: {
56+
prebid: {
57+
previousauctioninfo: [
58+
{
59+
bidderRequestId: "123abc",
60+
bidId: "456def",
61+
rendered: 1, // default is 0
62+
source: "pbjs",
63+
adUnitCode: "div-gpt-ad-123-0",
64+
highestBidCpm: 0.052275935, // default is 0
65+
bidderCpm: 0.04, // default is null
66+
bidderOriginalCpm: 0.04, // default is null
67+
bidderCurrency: "USD", // default is null
68+
bidderOriginalCurrency: "USD", // default is null
69+
bidderErrorCode: -1, // default is null
70+
timestamp: 1739400860310
71+
}
72+
]
73+
}
74+
}
75+
}
76+
```

dev-docs/publisher-api-reference/setConfig.md

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,58 +1406,13 @@ pbjs.setConfig({
14061406

14071407
### Enable Previous Auction Info
14081408

1409-
The Previous Auction Info module enables functionality to collect prior auction data for participating bidders and publishers (This feature is `opt-in`, by default it is disabled). The following requirements must be in place for the module to work:
1410-
1411-
* Publisher's who would like to participate must explicitly configure PBJS to do so:
1409+
The Previous Auction Info module enables functionality to collect prior auction data for participating bidders and publishers (This feature is `opt-in`, by default it is disabled).
14121410

14131411
```javascript
1414-
pbjs.setConfig({previousAuctionInfo: { enabled: true, bidders: [], maxQueueLength: 10 }})
1412+
pbjs.setConfig({previousAuctionInfo: { enabled: true, bidders: ['bidderCode1', 'bidderCode2'], maxQueueLength: 10 }})
14151413
```
14161414

1417-
{: .table .table-bordered .table-striped }
1418-
| Field | Required? | Type | Description |
1419-
|---|---|---|---|
1420-
| previousAuctionInfo.enabled | yes | boolean | Enables/disables the module. |
1421-
| previousAuctionInfo.bidders | no | array of strings | Array of bidder codes to determine which bidders are allowed to receive collected previous auction info. Leaving the array empty will enable all bidders. By default, all bidders will be allowed to collect previous auction info. |
1422-
| previousAuctionInfo.maxQueueLength | no | integer | The number of previous auction info payloads to store per bidder before injecting these payloads into the bidstream. Any payloads collected for a bidder during one auction will be injected into the bidstream during the next auction that the same bidder participates in with valid bids. By default, the value of this field is 10. |
1423-
1424-
* Only valid bid requests submitted by bidders who have enabled the Previous Auction Info module will be permitted.
1425-
1426-
If the requirements above are met, the flow for how the module works is as follows:
1427-
1428-
1. A Prebid.js auction runs and completes
1429-
1. At the end of an auction, details about the auction are collected from each bidder using the module
1430-
1. If a Prebid bid wins, then the `rendered` field is updated to `1` to indicate this in the collected auction data for all bidders who bid on the same adunit
1431-
1. During the next Prebid.js auction, if a bidder has this module enabled AND submits a valid bid request, then previous auction info data will be injected into the bid request of the new auction within the following path: `ortb2.ext.prebid.previousauctioninfo`
1432-
1433-
`previousAuctionInfo` is an array of prior auction data catered to a specific bidder (if present, it will be added to a bidder's bid request), the structure of the data looks like this (Note: Once collected previous auction data has been injected into the bid stream, then it is removed from storage):
1434-
1435-
```javascript
1436-
ortb2: {
1437-
ext: {
1438-
prebid: {
1439-
previousauctioninfo: [
1440-
{
1441-
bidderRequestId: "123abc",
1442-
bidId: "456def",
1443-
rendered: 1, // default is 0
1444-
source: "pbjs",
1445-
adUnitCode: "div-gpt-ad-123-0",
1446-
highestTargetedBidCpm: "0.05", // default is null
1447-
targetedBidCpm: "0.04", // default is null
1448-
highestBidCpm: 0.052275935, // default is 0
1449-
bidderCpm: 0.04, // default is null
1450-
bidderOriginalCpm: 0.04, // default is null
1451-
bidderCurrency: "USD", // default is null
1452-
bidderOriginalCurrency: "USD", // default is null
1453-
bidderErrorCode: -1, // default is -1
1454-
timestamp: 1739400860310
1455-
}
1456-
]
1457-
}
1458-
}
1459-
}
1460-
```
1415+
Note: The `enabled` field is required, the `bidders` and `maxQueueLength` fields are not. For more information about this module, see: [Previous Auction Info](https://docs.prebid.org/dev-docs/modules/previousAuctionInfo.html).
14611416

14621417
<a id="setConfig-previousAuctionInfo"></a>
14631418

0 commit comments

Comments
 (0)