Skip to content

Commit

Permalink
Gumgum Bid Adapter: prebid changes to support jp products (#8552)
Browse files Browse the repository at this point in the history
* Gumgum - ADTS-175 Support multiple GG params

* ADJS-1165-prebid-adaptor-changes-to-support-jp-products

* made tweaks to the skin product for the gumgumBidAdapter

* added test for new product id

Co-authored-by: Lisa Benmore <[email protected]>
Co-authored-by: John Bauzon <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2022
1 parent 9770ddb commit c3e0639
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ function buildRequests(validBidRequests, bidderRequest) {
data.pi = 5;
} else if (mediaTypes.video) {
data.pi = mediaTypes.video.linearity === 2 ? 6 : 7; // invideo : video
} else if (params.product && params.product.toLowerCase() === 'skin') {
data.pi = 8;
}
} else { // legacy params
data = { ...data, ...handleLegacyParams(params, sizes) }
Expand Down
20 changes: 19 additions & 1 deletion modules/gumgumBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Maintainer: [email protected]

GumGum adapter for Prebid.js
Please note that both video and in-video products require a mediaType of video.
In-screen and slot products should have a mediaType of banner.
In-screen, slot, and skin products should have a mediaType of banner.

# Test Parameters
```
Expand Down Expand Up @@ -50,6 +50,24 @@ var adUnits = [
}
}
]
},{
code: 'skin-placement',
sizes: [[300, 50]],
mediaTypes: {
banner: {
sizes: [[1, 1]],
}
},
bids: [
{
bidder: 'gumgum',
params: {
zone: 'dc9d6be1', // GumGum Zone ID given to the client
product: 'skin',
bidfloor: 0.03 // CPM bid floor
}
}
]
},{
code: 'video-placement',
sizes: [[300, 50]],
Expand Down
5 changes: 5 additions & 0 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@ describe('gumgumAdapter', function () {
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data.pi).to.equal(3);
});
it('should set the correct pi param if product param is found and is equal to skin', function () {
const request = { ...bidRequests[0], params: { ...zoneParam, product: 'Skin' } };
const bidRequest = spec.buildRequests([request])[0];
expect(bidRequest.data.pi).to.equal(8);
});
it('should default the pi param to 2 if only zone or pubId param is found', function () {
const zoneRequest = { ...bidRequests[0], params: zoneParam };
const pubIdRequest = { ...bidRequests[0], params: pubIdParam };
Expand Down

0 comments on commit c3e0639

Please sign in to comment.