-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PBjs Core Price Floors Module: improve logging on bid rejections to clarify which CPM is being compared with which floor #8655
Conversation
…ch CPM is being compared with which floor
modules/priceFloors.js
Outdated
logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met`, bid); | ||
const floorMsg = (() => { | ||
try { | ||
return ` (adjusted cpm: ${bid.floorData.cpmAfterAdjustments.toFixed(2)}, floor: ${floorInfo.matchingFloor.toFixed(2)})` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling the lack of precision is going to generate more bug reports when the rounded values are equal; how about toFixed(4)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about keeping the full precision then? (because if 2 digits are not enough why would 4 be?)
…larify which CPM is being compared with which floor (prebid#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message
…larify which CPM is being compared with which floor (prebid#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message
* ortb2 and el offsets * return empty object * ortb2 and el offsets * IX Bid Adapter: Add support for impression level transactionId (imp[].ext.tid) (#8641) * IX Bid Adapter: add imp ext tid support * fix tid level in imp ext object Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> * PBjs Core Price Floors Module: improve logging on bid rejections to clarify which CPM is being compared with which floor (#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message * Adgeneration Bid Adpter: add Criteo system and ID5 system and update test. (#8642) * update Adgeneration to add Criteo system and ID5 systems. * Change method name. * Correction_of_code_and_test_specs. * Adding adgext_id5_id_link_type parameter to ID5 object. * return empty object * fix ortb location (not in ext) * add unit testing Co-authored-by: shahinrahbariasl <56240400+shahinrahbariasl@users.noreply.github.com> Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Keisuke Kakinuma <keisuke.kakinuma@supership.jp>
…larify which CPM is being compared with which floor (#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message
* ortb2 and el offsets * return empty object * ortb2 and el offsets * IX Bid Adapter: Add support for impression level transactionId (imp[].ext.tid) (#8641) * IX Bid Adapter: add imp ext tid support * fix tid level in imp ext object Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> * PBjs Core Price Floors Module: improve logging on bid rejections to clarify which CPM is being compared with which floor (#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message * Adgeneration Bid Adpter: add Criteo system and ID5 system and update test. (#8642) * update Adgeneration to add Criteo system and ID5 systems. * Change method name. * Correction_of_code_and_test_specs. * Adding adgext_id5_id_link_type parameter to ID5 object. * return empty object * fix ortb location (not in ext) * add unit testing Co-authored-by: shahinrahbariasl <56240400+shahinrahbariasl@users.noreply.github.com> Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Keisuke Kakinuma <keisuke.kakinuma@supership.jp>
…larify which CPM is being compared with which floor (prebid#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message
* ortb2 and el offsets * return empty object * ortb2 and el offsets * IX Bid Adapter: Add support for impression level transactionId (imp[].ext.tid) (prebid#8641) * IX Bid Adapter: add imp ext tid support * fix tid level in imp ext object Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> * PBjs Core Price Floors Module: improve logging on bid rejections to clarify which CPM is being compared with which floor (prebid#8655) * Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor * Use full precision in log message * Adgeneration Bid Adpter: add Criteo system and ID5 system and update test. (prebid#8642) * update Adgeneration to add Criteo system and ID5 systems. * Change method name. * Correction_of_code_and_test_specs. * Adding adgext_id5_id_link_type parameter to ID5 object. * return empty object * fix ortb location (not in ext) * add unit testing Co-authored-by: shahinrahbariasl <56240400+shahinrahbariasl@users.noreply.github.com> Co-authored-by: shahin.rahbariasl <shahin.rahbariasl@indexexchange.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Keisuke Kakinuma <keisuke.kakinuma@supership.jp>
Type of change
Description of change
When a bid is rejected because below its price floor, the logged bid object shows a
cpm
beforebidCpmAdjustment
, but the comparison to the floor may have taken adjustment into account. This can appear as if a valid bid is being rejected (see #8565)This modifies the log message to explicitly show which cpm was found to be below the floor, which should help avoid confusion.