Prebid.js
Prebid.js copied to clipboard
Split use of auctionid and transactionid in bidders for source.tid
Type of issue
Bug
Description
Some bidders set auctionId, others set transactionId. Source.tid should always be from the same field. Also, the PBS adapter is missing this field.
Discussed in the Prebid.js committee meeting. Here's the proposal:
- Prebid will recognize 3 different IDs: 1a) auctionId (ORTB $.id). This already exists as bidrequest.auctionId. 1b) global transactionId (ORTB $.source.tid). This should be set to the auctionId 1c) adunit-level transactionId (ORTB $.imp[n].ext.tid).
- All three IDs are independent.
- All three IDs can be overridden by the publisher: 3a) auctionId - override already implemented as pbjs.requestBids as auctionId. 3b) global transactionId - uses the existing auctionId override 3c) adunit-level transactionId - new override to be implemented as AdUnit.transactionId.
If the community agrees with this proposal:
- Prebid-core work will be done to support the reading, generation, and propagation of these 3 IDs.
- The pbsBidAdapter will be updated
- Docs will be updated
- We will update bid adapters that refer to any of these IDs and ask the maintainers to approve.
Related
#8543 #3190
Some bidders that appear to remain unsolved: https://github.com/prebid/Prebid.js/blob/6e36e363aa843603a8b7cb29da3242d84e5f4b9d/modules/bizzclickBidAdapter.js#L95 @BizzClick @devBizzclick
https://github.com/prebid/Prebid.js/blob/f32e0805a10c118d1c49e070d14ff80f9e3b7417/modules/rubiconBidAdapter.js#L187 @musikele
https://github.com/prebid/Prebid.js/blob/6e36e363aa843603a8b7cb29da3242d84e5f4b9d/modules/pubwiseBidAdapter.js#L187 @GLStephen
https://github.com/prebid/Prebid.js/blob/6e36e363aa843603a8b7cb29da3242d84e5f4b9d/modules/gothamadsBidAdapter.js#L107 @supportGothamad
https://github.com/prebid/Prebid.js/blob/6e36e363aa843603a8b7cb29da3242d84e5f4b9d/modules/luponmediaBidAdapter.js#L293 @adxpremium
https://github.com/prebid/Prebid.js/blob/5ef54f7b2234cba7595ea4446f68b821af670bd6/modules/ozoneBidAdapter.js#L384 @AskRupert-DM
https://github.com/prebid/Prebid.js/blob/6e36e363aa843603a8b7cb29da3242d84e5f4b9d/modules/adtrueBidAdapter.js#L510 @haibau
https://github.com/prebid/Prebid.js/blob/7d3ad07c97e39fb1f6f5df481f6c0dac369ecda0/modules/pubmaticBidAdapter.js#L1132 @pm-azhar-mulla
https://github.com/prebid/Prebid.js/blob/master/modules/improvedigitalBidAdapter.js#L165 @jbartek25
https://github.com/prebid/Prebid.js/blob/2ee4d3f21f5767734222d0298d3b538e6cc3c859/modules/newspassidBidAdapter.js#L286 @AskRupert-DM
https://github.com/prebid/Prebid.js/blob/6f4fb5b78a4bc31a1f84b59ec5b98d4e3bcf0179/modules/deltaprojectsBidAdapter.js#L93 @rikdru
https://github.com/prebid/Prebid.js/blob/7d3ad07c97e39fb1f6f5df481f6c0dac369ecda0/modules/rtbhouseBidAdapter.js#L227 @piotrj-rtbh
How is this issue separate from https://github.com/prebid/Prebid.js/issues/8543 - and why is it a bug? It doesn't look like we have established enough of a consensus on what source.tid should be to decide that some adapters are doing it wrong.
In 3190 and in doc i believe it was established it should be transaction id
#8543 is about implementing the new community extension, not source.tid
Committee discussion outcome:
set imp.ext.tid as the adunit transaction id --done Pass imp.ext.tid it to prebid server --done Pass the auction id as source.tid on client side adapters, not first imp transaction id Pass auction id to PBS adapter in source.tid, sanity test the auction id that is in source.tid, Publisher override behavior of auction id and impid tbd
According to https://github.com/prebid/Prebid.js/pull/7585 ; prebid server adapter is now generating its own tid because the auction id is insufficient. The first transaction id in the array seems like the way to go
@robertrmartinez
@patmmccann From a bidder standpoint, what's the "right" way to implement that?
source.tid = bidderRequest.auctionId;
or
source.tid = deepAccess(bidRequests[0], 'transactionId'),
I understand the purpose of this value is to be consistent across all bidders, making transactionId
more explicit that it should match the open RTB tid
aka "Transaction ID". But you seem to imply that Auction ID should be used instead, isn't there a risk that bidders get inconsistent with each other at some point?
@maphe my intention is that these shortly resolve to the same value. Planning to discuss in committee
In short, this proposal is not popular. Instead; an alternate proposal adopted in committee, to be expanded upon [update, the description reflects the committee outcome], is that prebid will identify some value as source.tid and everyone that is reading some other value as the source.tid will be moved over to it.
@maphe in the meantime, I recommend source.tid = bidderRequest.auctionId;
Ok, perfect, thank you.
Follow up question, related to what I've read in this community extension doc, does it have any value in your opinion to implement something like
imp.ext.tid = deepAccess(bidRequest, 'ortb2Imp.ext.tid');
in addition to source.tid
?
Adding more context to my questions, TheTradeDesk is reaching out to all their Prebid partners asking them to implement the transaction ID is their respective adapter/exchange, so our goal here is to implement it in a way where we're confident the other adapters will be consistent with.
IMO every adapter should do the equivalent of mergeDeep(imp, bidRequest.ortb2Imp)
- that is, everything from ortb2Imp
should be carried over, and if your endpoint speaks ORTB you might as well copy it.
My understanding from TTD is they plan to prefer imp.ext.tid to source.tid
Ok, that's good to know, I was not able to get this information internally. Anyway I'm covering all the bases by implementing both source.tid
and imp.ext.tid
(the way @dgirardi suggested) so we should be fine either way, assuming all other adapters will align...
one thing of note: source.tid || gpid will have the same cardinality as imp.ext.tid if and only if there are no repeated gpids per page.
FYI - updated the issue description with the proposal we discussed in last week's meeting.
@bretg that looks different from what was said earlier in this thread, can you confirm it is not advised anymore to set
source.tid = bidderRequest.auctionId;
but it is advised instead to do
source.tid = bidderRequest.transactionId;
Also is it safe to assume that we should stop using generateUUID()
for $.id
and prefer bidderRequest.auctionId
instead?
Finally I'm not quite clear on the timeline and what can be implemented in the adapter now vs later. I'm being asked to implement transaction id following TheTradeDesk demand, but it looks like it's not even possible quite yet.
Here is what ttd did https://github.com/prebid/Prebid.js/pull/8679/files
can you confirm it is not advised anymore
The intention of this issue is to have a community discussion. Some of us believe the current ID structure is sub-optimal, specifically:
- it's odd (some say bad) that the global source.tid is being set to the same value as the first imp.ext.tid
- publishers do not currently have a way to override all the values to coordinate with other tech on their pages
- there's inconsistency in the way that different adapters have approached IDs.
If the community agrees on the approach above, we would need a coordinated effort to make the core and adapter changes.
reconfiming this is resolved tpowards auctionid not imp[0].transactionid
flagging as possible #8539 enforcement
https://github.com/prebid/Prebid.js/pull/9862 should make this much easier for everyone in the 8.0 branch! instead of auction id, just point to bidderRequest.ortb2.source.tid