Skip to content

Commit

Permalink
Automatad Bid Adapter: Update CPM sent with WinNotification (prebid#5267
Browse files Browse the repository at this point in the history
)

* updated winurl params

* lint fixes
  • Loading branch information
Kanchika - Automatad authored May 19, 2020
1 parent 198c53b commit b404d20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/automatadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,17 @@ export const spec = {
},
onBidWon: function(bid) {
if (!bid.nurl) { return }
const winCpm = (bid.hasOwnProperty('originalCpm')) ? bid.originalCpm : bid.cpm
const winCurr = (bid.hasOwnProperty('originalCurrency') && bid.hasOwnProperty('originalCpm')) ? bid.originalCurrency : bid.currency
const winUrl = bid.nurl.replace(
/\$\{AUCTION_PRICE\}/,
bid.cpm
winCpm
).replace(
/\$\{AUCTION_IMP_ID\}/,
bid.requestId
).replace(
/\$\{AUCTION_CURRENCY\}/,
bid.currency
winCurr
).replace(
/\$\{AUCTION_ID\}/,
bid.auctionId
Expand Down

0 comments on commit b404d20

Please sign in to comment.