Skip to content

Commit

Permalink
Update openrtb bid response fields
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlane committed Feb 9, 2018
1 parent e91a1d0 commit 3700692
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions modules/prebidServerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ const LEGACY_PROTOCOL = {
} else if (bidObj.adm) {
bidObject.ad = bidObj.adm;
} else if (bidObj.nurl) {
bidObject.adUrl = bidObj.nurl
bidObject.adUrl = bidObj.nurl;
}
}

Expand Down Expand Up @@ -376,13 +376,23 @@ const OPEN_RTB_PROTOCOL = {
let bidObject = bidfactory.createBid(status);

bidObject.source = TYPE;
bidObject.creative_id = bid.crid;
bidObject.bidderCode = seatbid.seat;
bidObject.cpm = cpm;
bidObject.ad = bid.adm;

if (bid.adm && bid.nurl) {
bidObject.ad = bid.adm;
bidObject.ad += utils.createTrackPixelHtml(decodeURIComponent(bid.nurl));
} else if (bid.adm) {
bidObject.ad = bid.adm;
} else if (bid.nurl) {
bidObject.adUrl = bid.nurl;
}

bidObject.width = bid.w;
bidObject.height = bid.h;
if (bid.dealid) { bidObject.dealId = bid.dealid; }
bidObject.requestId = bid.id;
bidObject.creative_id = bid.crid;
bidObject.creativeId = bid.crid;

// TODO: Remove when prebid-server returns ttl, currency and netRevenue
Expand Down

0 comments on commit 3700692

Please sign in to comment.