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).
A Publisher must do the following in order for the module to work:
Include the Previous Auction Info module within your Prebid.js build: https://docs.prebid.org/download.html
Configure Prebid.js to enable the Previous Auction Info module:
pbjs.setConfig({previousAuctionInfo: { enabled: true, bidders: ['bidderCode1', 'bidderCode2'], maxQueueLength: 10 }})
If the requirements above are met, the flow for how the module works is as follows:
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.ortb2.ext.prebid.previousauctioninfo
.Field | Required? | Type | Description |
---|---|---|---|
previousAuctionInfo.enabled | yes | boolean | Enables/disables the module. |
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. |
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. |
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):
ortb2: {
ext: {
prebid: {
previousauctioninfo: [
{
bidderRequestId: "123abc",
bidId: "456def",
rendered: 1, // default is 0
source: "pbjs",
adUnitCode: "div-gpt-ad-123-0",
highestBidCpm: 0.052275935, // default is null
bidderCpm: 0.04, // default is null
bidderOriginalCpm: 0.04, // default is null
bidderCurrency: "USD", // default is null
bidderOriginalCurrency: "USD", // default is null
bidderErrorCode: -1, // default is null
timestamp: 1739400860310
}
]
}
}
}
Field | Type | Description | Default |
---|---|---|---|
ortb2.ext.prebid.previousauctioninfo | array | ||
ortb2.ext.prebid.previousauctioninfo[].bidderRequestId | string | ID of a previous bidder request | |
ortb2.ext.prebid.previousauctioninfo[].bidId | string | ID of a previous bid request | |
ortb2.ext.prebid.previousauctioninfo[].rendered | integer | Signifies if the relevant adunit bid on was rendered or not | 0 |
ortb2.ext.prebid.previousauctioninfo[].source | string | Where the previous auction info was collected | |
ortb2.ext.prebid.previousauctioninfo[].adUnitCode | string | Ad unit code of the ad slot that was bid on | |
ortb2.ext.prebid.previousauctioninfo[].highestBidCpm | float | The highest Prebid bid cpm observed for the relative ad slot of a previous auction | null |
ortb2.ext.prebid.previousauctioninfo[].bidderCpm | float | The bid cpm submitted by the bidder receiving the previous auction info payload | null |
ortb2.ext.prebid.previousauctioninfo[].bidderOriginalCpm | float | The original bid cpm submitted by the bidder receiving the previous auction info payload | null |
ortb2.ext.prebid.previousauctioninfo[].bidderCurrency | string | The bidder currency submitted by the bidder receiving the previous auction info payload | null |
ortb2.ext.prebid.previousauctioninfo[].bidderOriginalCurrency | string | The original bidder currency submitted by the bidder receiving the previous auction info payload | null |
ortb2.ext.prebid.previousauctioninfo[].bidderErrorCode | integer | Whether an error was present or not | null |
ortb2.ext.prebid.previousauctioninfo[].timestamp | integer | Time that the previous auction info payload was collected |