-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add an option for Price Floors module to wait for currency #9493
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
Comments
I believe this is intentional, with the assumption that waiting to load conversion rates will have more of an impact on revenue than using an inaccurate rate for floors. The floors module has a setting, Alternatively we could introduce a similar settings for the currency module - which would be more appropriate if there are other use cases for currency conversion before the first auction, which I am not aware of. |
It seems OP is indeed proposing a currency file timeout. I suggest a default of 0 ms. |
Are you suggesting something like this @patmmccann?
AFAIK right now it's only floors that needs currencies before the first auction, and the currency module never delays it, so this setting would only make sense for this particular situation (using both currency and floors with the delay for the latter). For this reason I am not sure that this is preferable to |
Goog point, but should |
I don't see a point in having two separate controls; if you are delaying the auction anyway, why would you give up on one or the other halfway? |
Agreed to go this route:
|
Type of issue
Bug: the Price Floors module is not able to properly use the Currency module for converting currencies in bid floors if the exchange rates are taken from an external file (eg. the default one on jsdelivr)
Description
Currency conversion should take place after the currency rate file is loaded so to safely apply the actual rates. Only in certain cases (eg. file could not be loaded or a timeout) the rates should be taken from the currency.defaultRates property.
We have noticed that once the currency file is cached then the exchange rates are taken from the file. It happens to load quickly right before the bidRequests are to be processed.
Without caching the file is loaded but too late and the floors are calculated with the use of defaultRates only.
Steps to reproduce
bidRequest.getFloor()
method somewhere) and the bidder should accept USD; add also: currency and priceFloors modulesTest page
Codesandbox test page: https://efo8ku.csb.app/?pbjs_debug=true
Expected results
With caching turned on it works as expected. The messages are in that order:
Actual results
With caching turned off the messages are in that order:
Platform details
Prebid 7.34.0, Chrome 109.0.5414.120, Windows 10, Node 14.20.0, npm 6.14.17
Other information
The text was updated successfully, but these errors were encountered: