From e3c652f2013484f80aacd4ee650db1fc882f7490 Mon Sep 17 00:00:00 2001 From: Anand Venkatraman Date: Mon, 28 Jan 2019 21:24:02 +0530 Subject: [PATCH] PulsePoint Adapter: crid fix (#3466) * ET-1691: Pulsepoint Analytics adapter for Prebid. (#1) * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: cleanup * ET-1691: minor * ET-1691: revert package.json change * Adding bidRequest to bidFactory.createBid method as per https://github.com/prebid/Prebid.js/issues/509 * ET-1765: Adding support for additional params in PulsePoint adapter (#2) * ET-1850: Fixing https://github.com/prebid/Prebid.js/issues/866 * Minor fix * Adding mandatory parameters to Bid * PulsePoint crid fix --- modules/pulsepointBidAdapter.js | 4 ++-- test/spec/modules/pulsepointBidAdapter_spec.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/pulsepointBidAdapter.js b/modules/pulsepointBidAdapter.js index 7679c2b6a10..206eb734495 100644 --- a/modules/pulsepointBidAdapter.js +++ b/modules/pulsepointBidAdapter.js @@ -99,8 +99,8 @@ function bidResponseAvailable(bidRequest, bidResponse) { const bid = { requestId: id, cpm: idToBidMap[id].price, - creative_id: id, - creativeId: id, + creative_id: idToBidMap[id].crid, + creativeId: idToBidMap[id].crid, adId: id, ttl: DEFAULT_BID_TTL, netRevenue: DEFAULT_NET_REVENUE, diff --git a/test/spec/modules/pulsepointBidAdapter_spec.js b/test/spec/modules/pulsepointBidAdapter_spec.js index ebeedde7783..f40a270af11 100644 --- a/test/spec/modules/pulsepointBidAdapter_spec.js +++ b/test/spec/modules/pulsepointBidAdapter_spec.js @@ -84,7 +84,8 @@ describe('PulsePoint Adapter Tests', function () { bid: [{ impid: ortbRequest.imp[0].id, price: 1.25, - adm: 'This is an Ad' + adm: 'This is an Ad', + crid: 'Creative#123' }] }] }; @@ -97,8 +98,8 @@ describe('PulsePoint Adapter Tests', function () { expect(bid.width).to.equal(300); expect(bid.height).to.equal(250); expect(bid.adId).to.equal('bid12345'); - expect(bid.creative_id).to.equal('bid12345'); - expect(bid.creativeId).to.equal('bid12345'); + expect(bid.creative_id).to.equal('Creative#123'); + expect(bid.creativeId).to.equal('Creative#123'); expect(bid.netRevenue).to.equal(true); expect(bid.currency).to.equal('USD'); expect(bid.ttl).to.equal(20);