Skip to content

Commit

Permalink
ADSS-1756-pass-gpid-to-video-requests (#10809)
Browse files Browse the repository at this point in the history
Co-authored-by: John Bauzon <john.bauzon@gumgum.com>
  • Loading branch information
john-ivan and john-bauzon-gumgum authored Dec 8, 2023
1 parent 32ff256 commit b47a38b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,16 @@ function buildRequests(validBidRequests, bidderRequest) {
// ADTS-134 Retrieve ID envelopes
for (const eid in eids) data[eid] = eids[eid];

// ADJS-1024 & ADSS-1297 & ADTS-175
gpid && (data.gpid = gpid);

if (mediaTypes.banner) {
sizes = mediaTypes.banner.sizes;
} else if (mediaTypes.video) {
sizes = mediaTypes.video.playerSize;
data = _getVidParams(mediaTypes.video);
}

// ADJS-1024 & ADSS-1297 & ADTS-175
gpid && (data.gpid = gpid);

if (pageViewId) {
data.pv = pageViewId;
}
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ describe('gumgumAdapter', function () {
expect(bidRequest.data.gpid).to.equal(pbadslot);
});

it('should set the global placement id (gpid) if media type is video', function () {
const pbadslot = 'cde456'
const req = { ...bidRequests[0], ortb2Imp: { ext: { data: { pbadslot } } }, params: zoneParam, mediaTypes: vidMediaTypes }
const bidRequest = spec.buildRequests([req])[0];
expect(bidRequest.data).to.have.property('gpid');
expect(bidRequest.data.gpid).to.equal(pbadslot);
});

it('should set the bid floor if getFloor module is not present but static bid floor is defined', function () {
const req = { ...bidRequests[0], params: { bidfloor: 42 } }
const bidRequest = spec.buildRequests([req])[0];
Expand Down

0 comments on commit b47a38b

Please sign in to comment.