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

Price Floors module should apply pbjs.bidderSettings.standard.bidCpmAdjustment #6175

Closed
aaroniniguez opened this issue Jan 11, 2021 · 10 comments · Fixed by #6194
Closed

Price Floors module should apply pbjs.bidderSettings.standard.bidCpmAdjustment #6175

aaroniniguez opened this issue Jan 11, 2021 · 10 comments · Fixed by #6194
Assignees

Comments

@aaroniniguez
Copy link
Contributor

Type of issue

Bug

Description

The Price Floors module should apply the pbjs.bidderSettings.standard.bidCpmAdjustment function if it exists, to the bid floor.

Steps to reproduce

  1. Set a bidCpmAdjustment function in standard (and ensure there is no bidder specific bid cpm adjustment function):
pbjs.bidderSettings.standard.bidCpmAdjustment =  function(bidCpm, bid) {
      return bidCpm * .5;
    }
  1. Ensure that bidAdjustment is set to true:
pbjs.setConfig({
    floors: {
        enforcement: {
            bidAdjustment: true
        }
  1. Send bid requests with the rubicon bid adapter, (bidder that uses the getFloor function)
  2. When theres a floor match, the bid floor will not be adjusted and should be adjusted.

Possible solution is to set this line in priceFloors.js in the getBiddersCpmAdjustment function:

const adjustmentFunction = utils.deepAccess(getGlobal(), `bidderSettings.${bidderName}.bidCpmAdjustment`) || utils.deepAccess(getGlobal(), `bidderSettings.standard.bidCpmAdjustment`);
@bszekely1
Copy link

bszekely1 commented Jan 13, 2021

Hi @aaroniniguez, I just tested the bid adjustment feature and it is working on my side. Can you provide a page where you see it incorrectly functioning?

@aaroniniguez
Copy link
Contributor Author

@bszekely1 sure, I"ll provide one.

Curious though, When testing on your end what does your pbjs.bidderSettings contain?

@bszekely1
Copy link

pbjs.bidderSettings = {
          rubicon: {
            bidCpmAdjustment : function(bidCpm){
              // adjust the bid in real time before the auction takes place
              return bidCpm * 0.50;
            }
          }
        };

@aaroniniguez
Copy link
Contributor Author

thats incorrect, it should be:

pbjs.bidderSettings = {
          standard: {
            bidCpmAdjustment : function(bidCpm){
              // adjust the bid in real time before the auction takes place
              return bidCpm * 0.50;
            }
          }
        };

@bszekely1
Copy link

I was making a Rubicon specific one. The one you supplied is a general one. Are you suggesting the standard one does not work?

@aaroniniguez
Copy link
Contributor Author

Yes, using standard won't work

@bszekely1
Copy link

Yes, we can validate this is an oversight in the implementation of the Floors Module. Should be an easy fix. It will probably be released in the next release.

@aaroniniguez
Copy link
Contributor Author

awesome, glad to hear it

@robertrmartinez
Copy link
Collaborator

@aaroniniguez This PR has been made.

Didn't even notice your proposed "fix" was exactly what I ended up doing! haha.

Thanks for bringing this to our attention.

@aaroniniguez
Copy link
Contributor Author

haha I debated making it myself or not, figured you guys would know more , thanks!

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 a pull request may close this issue.

3 participants