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

Azerion / Improve: does not properly support currency module #12238

Closed
dmitriyshashkin opened this issue Sep 12, 2024 · 15 comments · Fixed by #12341
Closed

Azerion / Improve: does not properly support currency module #12238

dmitriyshashkin opened this issue Sep 12, 2024 · 15 comments · Fixed by #12341

Comments

@dmitriyshashkin
Copy link
Contributor

dmitriyshashkin commented Sep 12, 2024

Type of issue

Feature request

Description

The currency module is supposed to convert bids to the ad server currency on the client. Instead it leaks it to the bid requests (e.g. through openrtb converter https://github.com/prebid/Prebid.js/blob/master/libraries/ortbConverter/README.md?plain=1#L45).

This is problematic, cause some of the bidders do not understand the purpose of the currency module (e.g. improvedigital, previously adform). And if they receive bid request with a currency they do not recognise, they don't bid.

The only workaround for me I see currently that does not include patching Prebid is to disable the currency module completely and implement it separately from Prebid code.

Steps to reproduce

Set currency to something like "UAH" or "ZWD". Add improvedigital. Request bids

Expected results

Bid request does not contain information from the currency module. Bidder responds with a bid in USD and currency module converts it to whatever currency is used on ad server.

Actual results

Bidder responds with error.

Other information

Same problem I had with adform previously #8566

@dgirardi
Copy link
Collaborator

Ideally bid adapters should know what currencies they can bid on and wouldn't ask their exchanges for a currency they can't deal with; adapters that do should be fixed individually.

If we accept that publishers are responsible for the fix (I'm not sure we should), some options are:

  • a workaround that might work right now depending on the adapter is to set ortb2.cur, e.g. setBidderConfig({bidders: ['improvedigital'], config: {ortb2: {cur: ['USD']}}). This should get picked up by the default behavior of ortbConverter.
  • we could add a defaultCurrency setting to take precedence over adServerCurrency as the default currency to be used by adapters.

@dgirardi
Copy link
Collaborator

dgirardi commented Sep 17, 2024

cc @jbartek25

please see rixEngine as an example on how to handle

@bretg
Copy link
Collaborator

bretg commented Sep 17, 2024

My take is that this is a bidder issue. Prebid.js should enhance the bid adapter developer documentation to better explain currency - maybe something similar to what's in the PBS developer doc?

That said, publisher frustration is understandable, and we should help communicate with bid adapter maintainers on this issue.

@patmmccann patmmccann changed the title Some way to hide the ad server currency from the bidders Azerion / Improve: does not properly support currency module Sep 23, 2024
@patmmccann patmmccann moved this from Triage to Needs Req in Prebid.js Tactical Issues table Sep 23, 2024
@patmmccann
Copy link
Collaborator

OP: setBidderConfig({bidders: ['improvedigital'], config: {ortb2: {cur: ['USD']}}) works; we do need something cleaner

@bretg
Copy link
Collaborator

bretg commented Sep 23, 2024

There are 4 bidder currency scenarios that I'm aware of:

  1. The bidder wants to know the publisher's adServerCurrency because their endpoint is able to bid in multiple currencies. They will accept the bid request and bid in the adServerCurrency, eliminating the need for Prebid to convert their bids. (example: pubmatic)
  2. The bidder wants to know the publisher's adServerCurrency because they know that Prebid will convert their bid to that currency and they do not want to deal with the finance discrepancies that can occur. They use knowledge of the adServerCurrency to decline to bid on the auction. (example: outbrain)
  3. The bidder doesn't care about the adServerCurrency - their endpoint only supports one currency, but they're fine with Prebid converting their response to whatever currency. The adapter overrides the adServerCurrency to their preferred value. (example: rubicon)
  4. The bid adapter maintainer hasn't thought about currency and doesn't know what they want.

@dmitriyshashkin
Copy link
Contributor Author

Bidder's perspective:

To clarify, the key factor here is not just adServerCurrency, but also the currency defined in the bid requests. Based on your setup, %currency code% is being passed in the bid request, which is why our adapter processes bids in this currency not implementing or overriding anything for it.

They don't even understand where the "currency" is coming from.

@jbartek25
Copy link
Contributor

Hi @dmitriyshashkin. Please give me a test page where I can check the issue because if Improve ad server ignores any unknown currencies, it responds with bids in USD that will then get converted to the adServerCurrency by Prebid. Test for example with ZAR.
"UAH" or "ZWD" didn't work for me as I tested with https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=20240923 and there's no conversion rates for those currencies in the standard Prebid rate file.

@dmitriyshashkin
Copy link
Contributor Author

That's what we get when we request bids.
image

We're using alternative currency conversion file with additional currencies: https://cdn.membrana.media/currency_file.json

And both our account manager and your tech support told us the following:

Our Improve Digital bidder adapter follows the currency specified by the publisher in the bid request.
And also
Currency Support: The crucial point in this case is that Improve Digital processes the bid request only if the currency provided in the bid request is supported by Improve Digital's ad server.

They even sent us a report that says that our requests are being rejected because "No supported currency is specified"
image

@jbartek25
Copy link
Contributor

jbartek25 commented Sep 24, 2024

@dmitriyshashkin I put together a test page with your publisher id and you currency file + adServerCurrency "UAH". Improve Digital bidder handles such request correctly. See for yourself: https://test-hb.improvedigital.com/pbw/examples/improve-cur-test.html
I suspect you have a different kind of issue. Can you get me a test page or perhaps try to change the placementId on my test page to your placement.

Screenshot 2024-09-24 at 14 35 13

@dmitriyshashkin
Copy link
Contributor Author

I took your example and replaced the placement id. Now I get 400 error https://js-debug-2.b-cdn.net/improve.html With your placement id it produces bid every time.

Not sure what should I make of this. I mean, above I provided an excerpt from the report provided by our account manager at improvedigital. It explicitly says that the main reason why our requests were rejected is the lack of support for the currency. And improvedigital's tech support even checked our setup and told us that the unsupported currency is the problem.

Perhaps you're using some debug placement id that circumvents the standard logic and always bids no matter the currency?

@jbartek25
Copy link
Contributor

@dmitriyshashkin the placement you use at https://js-debug-2.b-cdn.net/improve.html is a video placement and the request is for banner ads - that's why the request gets rejected with error 400.

I spoke with the Improve support team to get to the bottom of when "No supported currency is specified" error was seen. It turns out you were sending bidfloorcur=UAH. In this case I'm not sure what else the ad server can do other than rejecting the request as the clients wouldn't appreciate the ad server ignoring the floors in (for the ad server) unknown currencies.

@bretg
Copy link
Collaborator

bretg commented Sep 25, 2024

sending bidfloorcur=UAH

@jbartek25 - bid adapters have a function available to change the floor currency to something they can handle. See https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#currency - maybe this would help this situation?

Screenshot 2024-09-25 at 11 03 25 AM

@jbartek25
Copy link
Contributor

thanks @bretg . I'll look into that

@patmmccann patmmccann moved this from Needs Req to Ready for Dev in Prebid.js Tactical Issues table Sep 25, 2024
@patmmccann
Copy link
Collaborator

We’ll let publishers hide the currency as ‘sharedCurrency’, and it will override adserverCurrency in the request object.

@jbartek25
Copy link
Contributor

I accidentally unassigned. Doesn't matter, @lyubomirshishkov will take care of the fix so the issue can be assigned to him.

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

Successfully merging a pull request may close this issue.

5 participants