From fce9d49bd337cf31721f747e563a5dfb43dd2750 Mon Sep 17 00:00:00 2001 From: Azhar Date: Fri, 5 Mar 2021 17:42:38 +0530 Subject: [PATCH 1/2] Changed net revenue to True --- modules/pubmaticBidAdapter.js | 2 +- test/spec/modules/pubmaticBidAdapter_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js index 07e5b62ac26..41ca642c869 100644 --- a/modules/pubmaticBidAdapter.js +++ b/modules/pubmaticBidAdapter.js @@ -101,7 +101,7 @@ const NATIVE_MINIMUM_REQUIRED_IMAGE_ASSETS = [ } ] -const NET_REVENUE = false; +const NET_REVENUE = true; const dealChannelValues = { 1: 'PMP', 5: 'PREF', diff --git a/test/spec/modules/pubmaticBidAdapter_spec.js b/test/spec/modules/pubmaticBidAdapter_spec.js index 37deb0bca9c..09573fe9f85 100644 --- a/test/spec/modules/pubmaticBidAdapter_spec.js +++ b/test/spec/modules/pubmaticBidAdapter_spec.js @@ -2614,7 +2614,7 @@ describe('PubMatic adapter', function () { } expect(response[0].dealId).to.equal(bidResponses.body.seatbid[0].bid[0].dealid); expect(response[0].currency).to.equal('USD'); - expect(response[0].netRevenue).to.equal(false); + expect(response[0].netRevenue).to.equal(true); expect(response[0].ttl).to.equal(300); expect(response[0].meta.networkId).to.equal(123); expect(response[0].adserverTargeting.hb_buyid_pubmatic).to.equal('BUYER-ID-987'); @@ -2638,7 +2638,7 @@ describe('PubMatic adapter', function () { } expect(response[1].dealId).to.equal(bidResponses.body.seatbid[1].bid[0].dealid); expect(response[1].currency).to.equal('USD'); - expect(response[1].netRevenue).to.equal(false); + expect(response[1].netRevenue).to.equal(true); expect(response[1].ttl).to.equal(300); expect(response[1].meta.networkId).to.equal(422); expect(response[1].adserverTargeting.hb_buyid_pubmatic).to.equal('BUYER-ID-789'); From dd578b60e7e9df3ea4d46a90ee3b9ee0a21a8f0e Mon Sep 17 00:00:00 2001 From: pm-azhar-mulla Date: Thu, 9 Jun 2022 11:50:18 +0530 Subject: [PATCH 2/2] send adapterCode as bidder when available --- modules/bidViewability.js | 2 +- src/auction.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/bidViewability.js b/modules/bidViewability.js index 837eccd00c1..362401e6d1c 100644 --- a/modules/bidViewability.js +++ b/modules/bidViewability.js @@ -68,7 +68,7 @@ export let impressionViewableHandler = (globalModuleConfig, slot, event) => { // if config is enabled AND VURL array is present then execute each pixel fireViewabilityPixels(globalModuleConfig, respectiveBid); // trigger respective bidder's onBidViewable handler - adapterManager.callBidViewableBidder(respectiveBid.bidder, respectiveBid); + adapterManager.callBidViewableBidder(respectiveBid.adapterCode || respectiveBid.bidder, respectiveBid); // emit the BID_VIEWABLE event with bid details, this event can be consumed by bidders and analytics pixels events.emit(CONSTANTS.EVENTS.BID_VIEWABLE, respectiveBid); } diff --git a/src/auction.js b/src/auction.js index 03ddd25c048..4d1025a0a75 100644 --- a/src/auction.js +++ b/src/auction.js @@ -324,11 +324,11 @@ export function newAuction({adUnits, adUnitCodes, callback, cbTimeout, labels, a function addWinningBid(winningBid) { _winningBids = _winningBids.concat(winningBid); - adapterManager.callBidWonBidder(winningBid.bidder, winningBid, adUnits); + adapterManager.callBidWonBidder(winningBid.adapterCode || winningBid.bidder, winningBid, adUnits); } function setBidTargeting(bid) { - adapterManager.callSetTargetingBidder(bid.bidder, bid); + adapterManager.callSetTargetingBidder(bid.adapterCode || bid.bidder, bid); } return {