Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Somo: fix an issue where the requestId was being set to the wrong value #4596

Merged
merged 1 commit into from Dec 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/somoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ export const spec = {

function bidResponseAvailable(bidRequest, bidResponse) {
let bidResponses = [];

if (bidResponse.body) {
let bidData = bidResponse.body.seatbid[0].bid[0];
const bid = {
requestId: bidData.impid,
requestId: bidResponse.body.id,
cpm: bidData.price,
width: bidData.w,
height: bidData.h,
Expand All @@ -74,6 +75,7 @@ function bidResponseAvailable(bidRequest, bidResponse) {
adId: bidData.impid,
netRevenue: false,
currency: 'USD',
adUnitCode: bidRequest.bidRequest.adUnitCode
};
if (isVideo(bidRequest.bidRequest)) {
bid.vastXml = bidData.adm;
Expand All @@ -89,7 +91,7 @@ function bidResponseAvailable(bidRequest, bidResponse) {

function openRtbRequest(bidRequest, bidderRequest) {
var openRtbRequest = {
id: bidRequest.bidderRequestId,
id: bidRequest.bidId,
imp: [openRtbImpression(bidRequest)],
at: 1,
tmax: 400,
Expand Down