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

Remove / Unset floors on following auctions is not respected #9956

Closed
natanavra opened this issue May 16, 2023 · 5 comments
Closed

Remove / Unset floors on following auctions is not respected #9956

natanavra opened this issue May 16, 2023 · 5 comments
Assignees

Comments

@natanavra
Copy link

natanavra commented May 16, 2023

EDIT 1

Seems that setting floor values works, e.g. pbjs.setConfig({ floors: { data: { values: { '*': 0.01 } } } })
So the sentence

Every call to setConfig overwrites supplied values at the top level

from the setConfig docs is not actually true in this case?


Type of issue

bug

Description

removing / unsetting floors with pbjs.setConfig({ floors: {} }) has no effect, "old" floors from previous configuration are still used.

Steps to reproduce

  1. run an auction with a default price floors e.g. pbjs.setConfig({ floors: { config: { default: 0.1, floorMin: 0.1 } } })
  2. after several seconds unset/remove floors pbjs.setConfig({ floors: {} })
  3. run another auction, default floor is still enforced

Test page

N/A

Expected results

unsetting floors from config should stop floor enforcement on subsequent auctions

Actual results

removing floors does nothing?

Platform details

  • prebid.js 7.39.0
  • chrome 113

Other information

N/A

@dgirardi
Copy link
Collaborator

You can turn off floors with setConfig({floors: {enabled: false}}). Floor data, if omitted, is preserved between setConfigs and I'm not sure we want to change that behavior, since it's intentional (@robertrmartinez ?)

'data', data => (data && parseFloorData(data, 'setConfig')) || _floorsConfig.data // do not overwrite if passed in data not valid

The documentation is indeed misleading - even the enabled flag is undecipherable from the price floors docs and I'm wondering if I'm missing some history.

@robertrmartinez
Copy link
Collaborator

This was intentionally done as to safeguard against an endpoint returning garbage objects or anything, always fall back to what was saved before.

The way to stop floors is as Demetrio says, turn off the module with enabled = false

But if this does not satisfy a legit use case we can alter.

@dgirardi
Copy link
Collaborator

Plan is to fix this - as in not persisting previous floor data when it's omitted or invalid - for version 8

@natanavra
Copy link
Author

Let's say we don't want to disable it but want to lower the default and remove the values
e.g. setConfig({ floors: { data: { default: 0.01 } } }) would that work?
Not sure if I tried that and it didn't work...?

At any rate, I guess it's worth adding a section to price floors module docs stating what happens if you want to discard or lower the default on the next auction.

@dgirardi
Copy link
Collaborator

Let's say we don't want to disable it but want to lower the default and remove the values
e.g. setConfig({ floors: { data: { default: 0.01 } } }) would that work?

It should work, previous data is kept only if it's omitted or invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants