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 gpp data in bidrequest #9707

Merged
merged 3 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions modules/gumgumBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ function buildRequests(validBidRequests, bidderRequest) {
if (gppConsent) {
data.gppConsent = {
gppString: bidderRequest.gppConsent.gppString,
applicableSections: bidderRequest.gppConsent.applicableSections
gpp_sid: bidderRequest.gppConsent.applicableSections
}
} else if (!gppConsent && bidderRequest?.ortb2?.regs?.gpp) {
data.gppConsent = {
gppString: bidderRequest.ortb2.regs.gpp,
applicableSections: bidderRequest.ortb2.regs.gpp_sid
gpp_sid: bidderRequest.ortb2.regs.gpp_sid
};
}
if (coppa) {
Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/gumgumBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ describe('gumgumAdapter', function () {
const bidRequest = spec.buildRequests(bidRequests, fakeBidRequest)[0];
expect(bidRequest.data.gppConsent).to.exist;
expect(bidRequest.data.gppConsent.gppString).to.equal(gppConsent.gppString);
expect(bidRequest.data.gppConsent.applicableSections).to.equal(gppConsent.applicableSections);
expect(bidRequest.data.gppConsent.gpp_sid).to.equal(gppConsent.applicableSections);
expect(bidRequest.data.gppConsent.gppString).to.eq('DBACNYA~CPXxRfAPXxRfAAfKABENB-CgAAAAAAAAAAYgAAAAAAAA~1YNN');
});
it('should handle ortb2 parameters', function () {
Expand All @@ -511,7 +511,7 @@ describe('gumgumAdapter', function () {
const bidRequest = spec.buildRequests(bidRequests, fakeBidRequest)[0];
expect(bidRequest.data.gppConsent).to.exist;
expect(bidRequest.data.gppConsent.gppString).to.equal(undefined);
expect(bidRequest.data.gppConsent.applicableSections).to.equal(undefined);
expect(bidRequest.data.gppConsent.gpp_sid).to.equal(undefined);
});
it('should handle ortb2 undefined parameters', function () {
const ortb2 = {
Expand All @@ -523,7 +523,7 @@ describe('gumgumAdapter', function () {
const fakeBidRequest = { gppConsent: ortb2 };
const bidRequest = spec.buildRequests(bidRequests, fakeBidRequest)[0];
expect(bidRequest.data.gppConsent.gppString).to.eq(undefined)
expect(bidRequest.data.gppConsent.applicableSections).to.eq(undefined)
expect(bidRequest.data.gppConsent.gpp_sid).to.eq(undefined)
});
it('should not set coppa parameter if coppa config is set to false', function () {
config.setConfig({
Expand Down