prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
424 stars 720 forks source link

Resolution of OpenRTB macros in Prebid Server #1804

Closed bretg closed 3 years ago

bretg commented 3 years ago

OpenRTB defines that certain macros should be resolved in the ad markup, win notice, and billing notice URLs.

Though there are 9 macros defined, I've received several complaints in the past 6 months about just one: AUCTION_PRICE. Prebid Server doesn't resolve any macros, instead relying on the rendering routines:

1) Prebid.js resolves AUCTION_PRICE with bid.cpm, which is the real bid post-currency conversion and post-bidadjustment 2) AMP and App: The Prebid Universal Creative resolves AUCTION_PRICE with hb_pb, which is the quantized bid post-currency conversion and post-bidadjustment

Nothing in Prebid handles any other OpenRTB macro. Nor does it support the Base64 encoding extension ${AUCTION_PRICE:B64}

Further, neither Prebid.js nor the PUC abide by the definition of AUCTION_PRICE in the standard, which is "Clearing price using the same currency and units as the bid."

How should Prebid interpret "clearing price"

There's no real "clearing price" available in our first-price header bidding world. The ad server could value each bid however it wants.

Options: 1) original bid price 2) post-bidadjustment, but before currency conversion

In discussing this internally, we believe option 1 is the best. Setting AUCTION_PRICE to post-bidadjustment could create a downward spiral of billing discrepancies.

What should Prebid Server should do about OpenRTB macros:

1) Make them the responsibility of each bid adapter that cares: if they want AUCTION_PRICE to be their bid price, just resolve it in the adapter. We also suggest AUCTION_CURRENCY.

2) Update PBS to place the original bid in the cache. What's cached right now in PBC is just "price", which is the post-currency, post-bidadjustment price. We could add "ext.origbidcpm" to what's cached, then update PUC to prefer this value over hb_pb. Update PBJS to look for this value from PBS.

2a) If we choose post-bidadjustment, name it seatbid.bid.ext.adjbidcpm.

3) Make a step towards PBS being a full-on SSP -- give it PBS macro support to resolve in adm, burl, nurl.

Proposal

The proposal is that we go with the first option -- there are very few bid adapters that require these macros, so they should be responsible for resolving their own values.

In the future, if Prebid Server moves towards SSP functionality, it might make sense to build a module to resolve these macros in a full SSP-like way as laid out in the third option.

The implication here is that the following bid adapters that utilize AUCTION_PRICE should consider how they want it resolved in the AMP and App scenarios.:

The Prebid Server team is suggesting a simple change to your bid adapters: just scan your creatives before returning them to PBS-core and resolve whichever macros you require. This will be more accurate and in accordance with OpenRTB than what's happening now in the Prebid Universal Creative.

We will give a couple of weeks for community feedback on this.

bretg commented 3 years ago

Met with the Prebid Server committee last Friday. We agreed:

1) AUCTION_PRICE in Prebid is the original bid price 2) the initial solution is for affected bid adapters is #1 above. i.e. bid adapters should be resolving macros relevant to them.

bretg commented 3 years ago

Discussed in committee again - we agreed to close this issue. Bidders that need to resolve AUCTION_PRICE in PBS should do so with a PR.