Skip to content

Commit

Permalink
MinuteMediaPlus Bid Adapter: Pass gpid to server. (prebid#9830)
Browse files Browse the repository at this point in the history
  • Loading branch information
saar120 authored and jorgeluisrocha committed May 18, 2023
1 parent bdd42c8 commit cd2fec7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions modules/minutemediaplusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
const pId = extractPID(params);
const subDomain = extractSubDomain(params);

const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid', deepAccess(bid, 'ortb2Imp.ext.data.pbadslot', ''));

if (isFn(bid.getFloor)) {
const floorInfo = bid.getFloor({
currency: 'USD',
Expand Down Expand Up @@ -105,6 +107,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
res: `${screen.width}x${screen.height}`,
schain: schain,
mediaTypes: mediaTypes,
gpid: gpid,
auctionId: auctionId,
transactionId: transactionId,
bidderRequestId: bidderRequestId,
Expand Down
11 changes: 9 additions & 2 deletions test/spec/modules/minutemediaplusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ const BID = {
'bidderWinsCount': 1,
'requestId': 'b0777d85-d061-450e-9bc7-260dd54bbb7a',
'schain': 'a0819c69-005b-41ed-af06-1be1e0aefefc',
'mediaTypes': [BANNER]
'mediaTypes': [BANNER],
'ortb2Imp': {
'ext': {
'gpid': '1234567890'
}
}
};

const VIDEO_BID = {
Expand Down Expand Up @@ -315,7 +320,8 @@ describe('MinuteMediaPlus Bid Adapter', function () {
protocols: [2, 3, 5, 6],
startdelay: 0
}
}
},
gpid: ''
}
});
});
Expand Down Expand Up @@ -373,6 +379,7 @@ describe('MinuteMediaPlus Bid Adapter', function () {
schain: BID.schain,
res: `${window.top.screen.width}x${window.top.screen.height}`,
mediaTypes: [BANNER],
gpid: '1234567890',
uqs: getTopWindowQueryParams(),
'ext.param1': 'loremipsum',
'ext.param2': 'dolorsitamet',
Expand Down

0 comments on commit cd2fec7

Please sign in to comment.