Closed LukaszSawicki closed 3 years ago
I also saw the same. According ORTB 2.5 missing currency means USD
(both in reques and respose), so I think this is bug on the server side
Marked as a bug for now. We'll look into it, probably early next week.. unless a community contributor takes it on first. :)
We're looking at it now.
The issue is merged into version 0.97.0 and has been released to AppNexus/Xandr servers. Can you please verify the issue has been resolved?
It looks properly now. Server currency: "RUB", conversion "USD" "RUB"
Works for me too.
I have one more question. Is it possible to tell Prebid Server from where it should get currency rates? Because in Prebid.js I can set flag 'conversionRateFile' to my own currency rate file, but on Prebid Server it takes currencies from https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json
It's not possible to pass a currency rate file to Prebid Server for a specific request. The host can override the default url (which you listed) if they would like. This approach allows the server to cache the conversion rates and use network connections for bids.
Why do you choose to use your own conversion rates? Is there an issue with the ones published by Prebid.org?
FWIW - PBS-Java supports passing in the currency rates on the request:
"ext": {
"prebid": {
"currency": {
"rates": {
"USD": { "UAH": 24.47, "ETB": 32.04 }
}
}
}
}
This issue was discussed at the Prebid.org Server Group meeting on 2/21/2020. I asked about the use cases for when a publisher would want to supply their own conversion rates and was given the following circumstances:
With this context, I believe it makes sense to allow the publisher to provide their own currency conversions. I propose two distinct modes:
Override The publisher may override existing conversion pairs or add new conversion pairs that Prebid Server would look at before the default ones (if available). This is a good choice if the publisher generally trusts the defaults in Prebid Server and wants to expand the currencies available or would like to provide more updated intraday pricing.
Replace The publisher may provide conversion pairs which will be used without regard for whatever defaults Prebid Server may have. This is a good choice for publishers who want full control over their currency conversions. I feel this is important because the default currency conversion rates are unknown to the publisher and may still be used even with overrides provided through implicit conversion rates (the server knows A -> B and B -> C and could infer A -> C). This may cause issues the publisher would not expect.
Thoughts? Is this similar to the options already provided by PrebidJS?
Prebid.js supports two modes:
Please describe what would happen technically in your proposed scenarios. They seem the same to me: "use this value instead of what PBS already has". Are you suggesting a flag that tells PBS to ignore its own conversion rates? Like a usePbsRates
flag?
"ext": {
"prebid": {
"currency": {
"rates": {
"USD": { "UAH": 24.47, "ETB": 32.04, "EUR": 0.92, ... }
},
"usepbsrates": false // defaults to true
}
}
}
Are you suggesting a flag that tells PBS to ignore its own conversion rates? Like a usePbsRates flag?
Yes.
If true, PBS would use it's rates and the publisher override rates as you describe it works today in the Java app. If false, PBS would only use the publisher rates giving the publisher full control and confidence over the calculations.
ok - are you good with the proposed usepbsrates
flag? We've been rather inconsistent about our attribute syntax. Looking over the extensions, all lowercase is the most common format.
Since the bug portion of this ticket is fixed, changing this to an enhancement to track the usepbsrates
feature.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This has been implemented in PBS-Java.
Implemented in PBS-Go 0.163.0.
Hi,
We have a problem with currency exchanging on prebid-server biddings. In our project we have combined server and client side requests and we have also included
Currency module
(https://github.com/prebid/Prebid.js/blob/master/modules/currency.js) in our Prebid.js build.On client-side requests it works perfectly, but we found that Prebid Server is not including bidder currency param in any response, and because of that
PrebidServerBidAdapter module
(https://github.com/prebid/Prebid.js/blob/master/modules/prebidServerBidAdapter/index.js) sets currency always toUSD
, no matter what currency was given in response by bidder.Here's an example on AdForm bid request. From https://prebid.adnxs.com/pbs/v1/openrtb2/auction we got that response:
As you can see - there is no 'Currency' key in the response, but when we launch debug mode, in response object we are also getting original response from bidder, which looks that:
Original bidder response contains a key
win_cur
with a value ofPLN
. When you look at Prebid Server AdForm Bid Adapter (https://github.com/prebid/prebid-server/blob/master/adapters/adform/adform.go) you can see that the value of thewin_cur
field is correctly added to bidResponse object as thecurrency
key. There is also awin_bid
key which stores the CPM value. So now CPM value is1.3735 PLN
.But after that Prebid Server code is probably ignoring currency field, because in Prebid Server response code we don't have any currency key. So, when Prebid.js gets the response it parses it to this form:
Prebid.js Server Module set response original currency to
USD
and after that currency module converted it toPLN
. And now we have the cpm value set to5.2583 PLN