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

Ogury Bid Adapter: adding prebid.js and ogury adapter versions #7891

Merged
merged 1 commit into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
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
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