You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
* 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`.
| 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):
Copy file name to clipboardExpand all lines: dev-docs/publisher-api-reference/setConfig.md
+3-48Lines changed: 3 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1406,58 +1406,13 @@ pbjs.setConfig({
1406
1406
1407
1407
### Enable Previous Auction Info
1408
1408
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).
| 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).
0 commit comments