Skip to content

Conversation

@jlquaccia
Copy link
Contributor

  • Documentation for the new Previous Auction Info module

🏷 Type of documentation

  • new feature

📋 Checklist

  • Related pull requests in prebid.js or server are linked -> Paste link in this list or reference it on the PR itself

Relative links

@netlify
Copy link

netlify bot commented Feb 12, 2025

Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit ffc6b3d
🔍 Latest deploy log https://app.netlify.com/sites/prebid-docs-preview/deploys/67d9becfe4c81f00085dba6e
😎 Deploy Preview https://deploy-preview-5881--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pm-harshad-mane
Copy link
Contributor

@jlquaccia can you pease work on getting this PR merged?

@jlquaccia jlquaccia force-pushed the docs_for_prevAuctionInfo_module branch from c72760e to 936c8ac Compare February 21, 2025 20:08
@jlquaccia
Copy link
Contributor Author

Fixed some linting errors that were present and also rebased on top of master. @ChrisHuie @dgirardi could one of you guys review when you have a chance?

Comment on lines 1441 to 1454
bidderRequestId: "123abc",
bidId: "456def",
rendered: 1,
source: "pbjs",
adUnitCode: "div-gpt-ad-123-0",
highestTargetedBidCpm: "0.05",
targetedBidCpm: "0.04",
highestBidCpm: 0.052275935,
bidderCpm: 0.04,
bidderOriginalCpm: 0.04,
bidderCurrency: "USD",
bidderOriginalCurrency: "USD",
bidderErrorCode: -1,
timestamp: 1739400860310
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these may need an explanation, especially if we keep the current "null" values. Here's an example (from prebid/Prebid.js#12825)

{
  "bidderRequestId": "58285d8b5b2d6c8",
  "bidId": "66630bf7bfef2e",
  "rendered": 0,
  "source": "pbjs",
  "adUnitCode": "/19968336/header-bid-tag-1",
  "highestTargetedBidCpm": "",
  "targetedBidCpm": "",
  "highestBidCpm": 0,
  "bidderCpm": "nobid",
  "bidderOriginalCpm": "nobid",
  "bidderCurrency": "nobid",
  "bidderOriginalCurrency": "nobid",
  "bidderErrorCode": -1,
  "timestamp": 1741037479568
}

from this you can see the null value can be 0, -1, '', 'nobid' depending on the field. I proposed in prebid/Prebid.js#12822 to just use null, which we're still early enough to do; either way it'd help to elaborate on what these fields mean.


```javascript
import { enablePreviousAuctionInfo } from '../libraries/previousAuctionInfo/previousAuctionInfo.js';
enablePreviousAuctionInfo({ bidderCode: 'some bidder code' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see prebid/Prebid.js#12822 - this approach is not friendly to PBS and we may want to change it.

1. A Prebid.js auction runs and completes
1. At the end of an auction, details about the auction are collected from each bidder using the module
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
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm the ORTB path -- this line says ext.prebid.previousAuctionInfo (camel case) while the example below is all lower case.

We do prefer the lowercase for the ORTB protocol.

@jlquaccia
Copy link
Contributor Author

@dgirardi @bretg pushed a new commit addressing your comments above. The changes in the new commit relate to and depend on the changes in prebid/Prebid.js#12831 which were proposed on prebid/Prebid.js#12822.

However it seems at the moment, that there is some discussion on prebid/Prebid.js#12822 in terms of how exactly to proceed..

@jlquaccia jlquaccia force-pushed the docs_for_prevAuctionInfo_module branch from c3dfb53 to 42cb0e8 Compare March 12, 2025 21:34
1. A Prebid.js auction runs and completes.
1. At the end of an auction, details about the auction are collected from each bidder using the module.
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.
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if a bidder has this module enabled -> if a bidder is included in bidders (bidders no longer enable themselves)
submits a valid bid request -> is included in the auction (bidders do not submit bid requests, unless you're referring to those that go to their SSPs)


<a name="setConfig-Generic-Configuration"></a>

### Enable Previous Auction Info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically configuration that requires a particular module is not listed here but on that module's page.

@jlquaccia jlquaccia force-pushed the docs_for_prevAuctionInfo_module branch from 695c570 to d75da7d Compare March 13, 2025 22:05
@pm-harshad-mane pm-harshad-mane merged commit 07603a6 into prebid:master Mar 19, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants