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

GumGum Bid Adapter: Send ae parameter in the request #11913

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ function buildRequests(validBidRequests, bidderRequest) {
const { currency, floor } = _getFloor(mediaTypes, params.bidfloor, bidRequest);
const eids = getEids(userId);
const gpid = deepAccess(ortb2Imp, 'ext.gpid') || deepAccess(ortb2Imp, 'ext.data.pbadslot');
const paapiEligible = deepAccess(ortb2Imp, 'ext.ae') === 1
MartinGumGum marked this conversation as resolved.
Show resolved Hide resolved
let sizes = [1, 1];
let data = {};
data.displaymanager = 'Prebid.js - gumgum';
Expand Down Expand Up @@ -402,7 +403,9 @@ function buildRequests(validBidRequests, bidderRequest) {
} else { // legacy params
data = { ...data, ...handleLegacyParams(params, sizes) };
}

if (paapiEligible) {
data.ae = paapiEligible
}
if (gdprConsent) {
data.gdprApplies = gdprConsent.gdprApplies ? 1 : 0;
}
Expand Down
17 changes: 17 additions & 0 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,23 @@ describe('gumgumAdapter', function () {
expect(bidRequest.data).to.have.property('gpid');
expect(bidRequest.data.gpid).to.equal('/17037559/jeusol/jeusol_D_1');
});
it('should set ae value to 1 for PAAPI', function () {
const req = { ...bidRequests[0],
ortb2Imp: {
ext: {
ae: 1,
data: {
adserver: {
name: 'test',
adslot: 123456
}
}
}
} }
const bidRequest = spec.buildRequests([req])[0];
expect(bidRequest.data).to.have.property('ae');
expect(bidRequest.data.ae).to.equal(true);
});

it('should set the global placement id (gpid) if in pbadslot property', function () {
const pbadslot = 'abc123'
Expand Down