As a component seller, we need to determine the amount our scoreAd() subtracted from the bid, from event-level report data emitted by reportResult(), in a consistent currency.
When both buyer and seller agree to operate in the same currency, bid and modifiedBid in browserSignals cover this need.
When the buyer is not known by seller to bid in the same currency - even if it actually does - or the seller converts it in scoreAd(), browserSignals is no longer sufficient, as bid becomes a unitless value per 5.3 Currencies in Reporting.
We would need the incomingBidInSellerCurrency to be passed in browserSignals, either replacing bid or as a separate field. This value seems to be used only to provide a value for the highestScoringOtherBid macro at this time.
To illustrate the problem, I run a few tests with different values for sellerCurrency, perBuyerCurrencies for buyer and bidCurrency returned by generateBid(), collecting the relevant fields from browserSignals in reportResult(). seller assumes its currency is USD, and scoreAd() performs conversion from MXP at 0.05 rate where applicable.
The middle two rows are most common. sellerCurrency is set, perBuyerCurrencies is not and generateBid() chooses the currency to bid into. The win event has two values, modifiedBid known to be in sellerCurrency and bid in an unknown unit (??? currency) from which it is not possible to derive the value we need.
It would seem that if bid is to have any relationship at all with bidCurrency (defined as "Currency required by auction configuration" which I take to be sellerCurrency in this case) then bid should be the original but converted value.
As a component seller, we need to determine the amount our
scoreAd()
subtracted from the bid, from event-level report data emitted byreportResult()
, in a consistent currency.When both buyer and seller agree to operate in the same currency,
bid
andmodifiedBid
inbrowserSignals
cover this need.When the buyer is not known by seller to bid in the same currency - even if it actually does - or the seller converts it in
scoreAd()
, browserSignals is no longer sufficient, asbid
becomes a unitless value per 5.3 Currencies in Reporting.We would need the
incomingBidInSellerCurrency
to be passed in browserSignals, either replacingbid
or as a separate field. This value seems to be used only to provide a value for thehighestScoringOtherBid
macro at this time.To illustrate the problem, I run a few tests with different values for
sellerCurrency
,perBuyerCurrencies
for buyer andbidCurrency
returned bygenerateBid()
, collecting the relevant fields frombrowserSignals
inreportResult()
. seller assumes its currency is USD, andscoreAd()
performs conversion from MXP at 0.05 rate where applicable.The middle two rows are most common.
sellerCurrency
is set,perBuyerCurrencies
is not andgenerateBid()
chooses the currency to bid into. The win event has two values,modifiedBid
known to be insellerCurrency
andbid
in an unknown unit (???
currency) from which it is not possible to derive the value we need.It would seem that if
bid
is to have any relationship at all withbidCurrency
(defined as "Currency required by auction configuration" which I take to besellerCurrency
in this case) thenbid
should be the original but converted value.