Skip to content

Commit

Permalink
Undertone Bid Adapter: adding gpid support to bid requests (#10414)
Browse files Browse the repository at this point in the history
* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

* Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

 * Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* fix lint issue in undertone adapter spec

* added user sync function to undertone adapter

* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

* Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* added user sync function to undertone adapter

* added user sync function to undertone adapter

* revert package-lock.json

* added user sync function to undertone adapter

* Update undertoneBidAdapter.js

* Update browsers.json

* Undertone: added GPP support and video plcmt

* Fix lint issues

* Undertone: added support for GPID

* identation fix

---------

Co-authored-by: omerko <omer.koren@perion.com>
Co-authored-by: Omer Koren <omerko@users.noreply.github.com>
Co-authored-by: AnnaPerion <annat@perion.com>
Co-authored-by: Oran Hollaender <oran@perion.com>
Co-authored-by: tamirnPerion <44399211+tamirnPerion@users.noreply.github.com>
Co-authored-by: tamarm <tamarm@perion.com>
Co-authored-by: tamarm <40788385+tamarm-perion@users.noreply.github.com>
Co-authored-by: Keren Gattegno <kereng@perion.com>
  • Loading branch information
9 people authored Sep 13, 2023
1 parent 51a2b9c commit 66a8b6a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
1 change: 1 addition & 0 deletions modules/undertoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const spec = {
domain: domain,
placementId: bidReq.params.placementId != undefined ? bidReq.params.placementId : null,
publisherId: bidReq.params.publisherId,
gpid: deepAccess(bidReq, 'ortb2Imp.ext.gpid', deepAccess(bidReq, 'ortb2Imp.ext.data.pbadslot', '')),
sizes: bidReq.sizes,
params: bidReq.params
};
Expand Down
38 changes: 28 additions & 10 deletions test/spec/modules/undertoneBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,19 @@ const videoBidReq = [{
maxDuration: 30
}
},
mediaTypes: {video: {
context: 'outstream',
playerSize: [640, 480],
placement: 1,
plcmt: 1
}},
ortb2Imp: {
ext: {
gpid: '/1111/gpid#728x90',
}
},
mediaTypes: {
video: {
context: 'outstream',
playerSize: [640, 480],
placement: 1,
plcmt: 1
}
},
sizes: [[300, 250], [300, 600]],
bidId: '263be71e91dd9d',
auctionId: '9ad1fa8d-2297-4660-a018-b39945054746'
Expand All @@ -56,10 +63,19 @@ const videoBidReq = [{
placementId: '10433395',
publisherId: 12345
},
mediaTypes: {video: {
context: 'outstream',
playerSize: [640, 480]
}},
ortb2Imp: {
ext: {
data: {
pbadslot: '/1111/pbadslot#728x90'
}
}
},
mediaTypes: {
video: {
context: 'outstream',
playerSize: [640, 480]
}
},
sizes: [[300, 250], [300, 600]],
bidId: '263be71e91dd9d',
auctionId: '9ad1fa8d-2297-4660-a018-b39945054746'
Expand Down Expand Up @@ -463,12 +479,14 @@ describe('Undertone Adapter', () => {
expect(bidVideo.video.skippable).to.equal(true);
expect(bidVideo.video.placement).to.equal(1);
expect(bidVideo.video.plcmt).to.equal(1);
expect(bidVideo.gpid).to.equal('/1111/gpid#728x90');

expect(bidVideo2.video.skippable).to.equal(null);
expect(bidVideo2.video.maxDuration).to.equal(null);
expect(bidVideo2.video.playbackMethod).to.equal(null);
expect(bidVideo2.video.placement).to.equal(null);
expect(bidVideo2.video.plcmt).to.equal(null);
expect(bidVideo2.gpid).to.equal('/1111/pbadslot#728x90');
});
it('should send all userIds data to server', function () {
const request = spec.buildRequests(bidReqUserIds, bidderReq);
Expand Down

0 comments on commit 66a8b6a

Please sign in to comment.