-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Prebid.js currently overrides deal targets with enable send all bid targets.
As per Prebid.js version 12, targets are set in the order of deals, win bid, and enable send all bids target:
function getAllTargeting() {
// Get targeting for the winning bid. Add targeting for any bids that have
// `alwaysUseBid=true`. If sending all bids is enabled, add targeting for losing bids.
var targeting = getDealTargeting()
.concat(getWinningBidTargeting())
.concat(getAlwaysUseBidTargeting())
.concat($$PREBID_GLOBAL$$._sendAllBids ? getBidLandscapeTargeting() : []);The getDealTargeting() function sets the deal targets: hb_bidder_BIDDERCODE, hb_adid_BIDDERCODE, hb_pb_BIDDERCODE, hb_size_BIDDERCODE and hb_deal_BIDDERCODE.
However, getBidLandscapeTargeting() overrides all deal targets except hb_deal_BIDDERCODE.
Example Senario:
The first bid response has deal and the second bid response does not have deal
The getAllTargeting() function sets the deal targets.
hb_bidder_BIDDERCODE value: BIDDERCODE
hb_adid_BIDDERCODE value: 3a7dd0bb2d4b85
hb_pb_BIDDERCODE value: 7.00
hb_size_BIDDERCODE value: 728x90
hb_deal_BIDDERCODE value: DEAL
The getBidLandscapeTargeting() function sets non-deal target and overrides the deal targets.
hb_bidder_BIDDERCODE value: BIDDERCODE
hb_adid_BIDDERCODE value: 4c99f6b09eb5ce
hb_pb_BIDDERCODE value: 5.00
hb_size_BIDDERCODE value: 300x250
Due to the override, there is a deal target (hb_deal_BIDDERCODE: DEAL) with non-deal adid (hb_adid_BIDDERCODE: 4c99f6b09eb5ce); however, the adid is not associated with the deal.
hb_bidder_BIDDERCODE value: BIDDERCODE
hb_adid_BIDDERCODE value: 4c99f6b09eb5ce
hb_pb_BIDDERCODE value: 5.00
hb_size_BIDDERCODE value: 300x250
hb_deal_BIDDERCODE value: DEAL