Skip to content

Commit

Permalink
OGURY ADAPTER - adding prebid.js and ogury adapter versions (#7891)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezaz authored Dec 27, 2021
1 parent da5a28e commit 527851c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions modules/oguryBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const DEFAULT_TIMEOUT = 1000;
const BID_HOST = 'https://mweb-hb.presage.io/api/header-bidding-request';
const TIMEOUT_MONITORING_HOST = 'https://ms-ads-monitoring-events.presage.io';
const MS_COOKIE_SYNC_DOMAIN = 'https://ms-cookie-sync.presage.io';
const ADAPTER_VERSION = '1.2.7';

function isBidRequestValid(bid) {
const adUnitSizes = getAdUnitSizes(bid);
Expand Down Expand Up @@ -55,7 +56,11 @@ function buildRequests(validBidRequests, bidderRequest) {
consent: ''
}
},
imp: []
imp: [],
ext: {
adapterversion: ADAPTER_VERSION,
prebidversion: '$prebid.version$'
}
};

if (bidderRequest.hasOwnProperty('gdprConsent') &&
Expand Down Expand Up @@ -123,7 +128,9 @@ function interpretResponse(openRtbBidResponse) {
meta: {
advertiserDomains: bid.adomain
},
nurl: bid.nurl
nurl: bid.nurl,
adapterVersion: ADAPTER_VERSION,
prebidVersion: '$prebid.version$'
};

bidResponse.ad = bid.adm;
Expand Down
12 changes: 10 additions & 2 deletions test/spec/modules/oguryBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ describe('OguryBidAdapter', function () {
ext: {
consent: bidderRequest.gdprConsent.consentString
},
},
ext: {
prebidversion: '$prebid.version$',
adapterversion: '1.2.7'
}
};

Expand Down Expand Up @@ -425,7 +429,9 @@ describe('OguryBidAdapter', function () {
meta: {
advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[0].adomain
},
nurl: openRtbBidResponse.body.seatbid[0].bid[0].nurl
nurl: openRtbBidResponse.body.seatbid[0].bid[0].nurl,
adapterVersion: '1.2.7',
prebidVersion: '$prebid.version$'
}, {
requestId: openRtbBidResponse.body.seatbid[0].bid[1].impid,
cpm: openRtbBidResponse.body.seatbid[0].bid[1].price,
Expand All @@ -440,7 +446,9 @@ describe('OguryBidAdapter', function () {
meta: {
advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[1].adomain
},
nurl: openRtbBidResponse.body.seatbid[0].bid[1].nurl
nurl: openRtbBidResponse.body.seatbid[0].bid[1].nurl,
adapterVersion: '1.2.7',
prebidVersion: '$prebid.version$'
}]

let request = spec.buildRequests(bidRequests, bidderRequest);
Expand Down

0 comments on commit 527851c

Please sign in to comment.