Skip to content

Commit

Permalink
Colossus Bid Adapter: gpp support (prebid#10096)
Browse files Browse the repository at this point in the history
* add video&native traffic colossus ssp

* Native obj validation

* Native obj validation #2

* Added size field in requests

* fixed test

* fix merge conflicts

* move to 3.0

* move to 3.0

* fix IE11 new URL issue

* fix IE11 new URL issue

* fix IE11 new URL issue

* https for 3.0

* add https test

* add ccp and schain features

* fix test

* sync with upstream, fix conflicts

* Update colossussspBidAdapter.js

remove commented code

* Update colossussspBidAdapter.js

lint fix

* identity extensions

* identity extensions

* fix

* fix

* fix

* fix

* fix

* add tests for user ids

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* add gdpr support

* add gdpr support

* id5id support

* Update colossussspBidAdapter.js

add bidfloor parameter

* Update colossussspBidAdapter.js

check bidfloor

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter_spec.js

* use floor module

* Revert "use floor module"

This reverts commit f0c5c24.

* use floor module

* update to 5v

* fix

* add uid2 and bidFloor support

* fix

* add pbadslot support

* fix conflicts

* add onBidWon

* refactor

* add test for onBidWon()

* fix

* add group_id

* Trigger circleci

* fix

* update user sync

* fix window.location

* fix test

* updates

* fix conflict

* fix

* updates

* remove traffic param

* add transactionId to request data for colossusssp adapter

* Send tid in placements array

* update user sync

* updated tests

* remove changes package-lock file

* fix

* add First Party Data

* gpp support

---------

Co-authored-by: Vladislav Isaiko <vladis@smartyads.com>
Co-authored-by: Aiholkin <artem.iholkin@smartyads.com>
Co-authored-by: Mykhailo Yaremchuk <m.yaremchuk@smartyads.com>
  • Loading branch information
4 people committed Jun 14, 2023
1 parent 8c39bab commit 1e82414
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/colossussspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ export const spec = {
request.gdpr_consent = bidderRequest.gdprConsent.consentString || 'ALL';
request.gdpr_require = bidderRequest.gdprConsent.gdprApplies ? 1 : 0;
}

// Add GPP consent
if (bidderRequest.gppConsent) {
request.gpp = bidderRequest.gppConsent.gppString;
request.gpp_sid = bidderRequest.gppConsent.applicableSections;
} else if (bidderRequest.ortb2?.regs?.gpp) {
request.gpp = bidderRequest.ortb2.regs.gpp;
request.gpp_sid = bidderRequest.ortb2.regs.gpp_sid;
}
}

for (let i = 0; i < validBidRequests.length; i++) {
Expand Down
29 changes: 29 additions & 0 deletions test/spec/modules/colossussspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,35 @@ describe('ColossussspAdapter', function () {
});
});

describe('gpp consent', function () {
it('bidderRequest.gppConsent', () => {
bidderRequest.gppConsent = {
gppString: 'abc123',
applicableSections: [8]
};

let serverRequest = spec.buildRequests([bid], bidderRequest);
let data = serverRequest.data;
expect(data).to.be.an('object');
expect(data).to.have.property('gpp');
expect(data).to.have.property('gpp_sid');

delete bidderRequest.gppConsent;
})

it('bidderRequest.ortb2.regs.gpp', () => {
bidderRequest.ortb2.regs = bidderRequest.ortb2.regs || {};
bidderRequest.ortb2.regs.gpp = 'abc123';
bidderRequest.ortb2.regs.gpp_sid = [8];

let serverRequest = spec.buildRequests([bid], bidderRequest);
let data = serverRequest.data;
expect(data).to.be.an('object');
expect(data).to.have.property('gpp');
expect(data).to.have.property('gpp_sid');
})
});

describe('interpretResponse', function () {
let resObject = {
body: [{
Expand Down

0 comments on commit 1e82414

Please sign in to comment.