Skip to content
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

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Jul 6, 2022

Type of change

  • Other

Description of change

When a bid is rejected because below its price floor, the logged bid object shows a cpm before bidCpmAdjustment, 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.

@patmmccann patmmccann linked an issue Jul 6, 2022 that may be closed by this pull request
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)})`
Copy link
Collaborator

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)?

Copy link
Collaborator Author

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?)

@patmmccann patmmccann self-assigned this Jul 6, 2022
@ChrisHuie ChrisHuie self-assigned this Jul 11, 2022
@ChrisHuie ChrisHuie changed the title Price floors module: improve logging on bid rejections to clarify which CPM is being compared with which floor PBjs Core Price Floors Module: improve logging on bid rejections to clarify which CPM is being compared with which floor Jul 11, 2022
@ChrisHuie ChrisHuie merged commit 0e03988 into prebid:master Jul 11, 2022
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Jul 12, 2022
…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
bwhisp pushed a commit to bwhisp/Prebid.js that referenced this pull request Jul 13, 2022
…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
ChrisHuie pushed a commit that referenced this pull request Jul 13, 2022
* 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>
ahmadlob referenced this pull request in taboola/Prebid.js Jul 27, 2022
…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
ahmadlob referenced this pull request in taboola/Prebid.js Jul 27, 2022
* 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>
RomainLofaso pushed a commit to criteo-forks/Prebid.js that referenced this pull request Aug 8, 2022
…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
RomainLofaso pushed a commit to criteo-forks/Prebid.js that referenced this pull request Aug 8, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Price Floors module rejects valid bids ?
4 participants