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

Colossus Adapter: add pbAdSlot support #7464

Merged
merged 60 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b87237c
add video&native traffic colossus ssp
vladis-teqblaze Mar 26, 2018
1ca4e28
Native obj validation
vladis-teqblaze Apr 10, 2018
b5c1850
Native obj validation #2
vladis-teqblaze Apr 22, 2018
e969f27
Added size field in requests
vladis-teqblaze Apr 22, 2018
67693e1
fixed test
vladis-teqblaze Apr 22, 2018
e7ab418
fix merge conflicts
Nov 18, 2019
3320c68
fix merge conflicts
Nov 18, 2019
44e59b8
move to 3.0
Nov 18, 2019
7133a72
move to 3.0
Nov 18, 2019
3dba3ac
fix IE11 new URL issue
Nov 18, 2019
7f14e4d
fix IE11 new URL issue
Nov 18, 2019
78609ff
fix IE11 new URL issue
Nov 18, 2019
4c5d711
https for 3.0
Nov 20, 2019
1027b54
add https test
Nov 21, 2019
684639c
add ccp and schain features
Dec 5, 2019
1c6681c
fix test
Dec 5, 2019
436ff0f
sync with upstream, fix conflicts
Dec 5, 2019
2f9efee
sync with upstream, fix conflicts
Dec 5, 2019
c40dbe3
Update colossussspBidAdapter.js
Dec 9, 2019
7d2e9f3
Update colossussspBidAdapter.js
Dec 10, 2019
8055e57
Merge branch 'master' of https://github.com/prebid/Prebid.js
Feb 28, 2020
53bb18e
identity extensions
Feb 28, 2020
51faedc
identity extensions
Feb 28, 2020
6cee3e7
fix
Mar 6, 2020
461e4ff
fix
Mar 6, 2020
e78a9dc
fix
Mar 6, 2020
1547d0a
fix
Mar 6, 2020
803be44
fix
Mar 6, 2020
47a78af
add tests for user ids
Mar 10, 2020
9ff6f10
fix
Mar 10, 2020
b02455a
fix
Mar 10, 2020
a4b93a1
fix
Mar 10, 2020
1e74169
fix
Mar 10, 2020
74a42cd
fix
Mar 10, 2020
d65984e
fix
Mar 10, 2020
1595a00
fix
Mar 10, 2020
42c5e53
add gdpr support
Mar 10, 2020
480f127
add gdpr support
Mar 10, 2020
5d9299c
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 30, 2020
3a4c32c
Merge remote-tracking branch 'upstream/master'
Apr 14, 2020
a51a3e1
id5id support
Apr 16, 2020
562a1e5
Update colossussspBidAdapter.js
Jan 15, 2021
3a99998
Update colossussspBidAdapter.js
Jan 15, 2021
ffdefbd
Merge branch 'master' into master
Jan 15, 2021
0cb39f1
Update colossussspBidAdapter.js
Jan 15, 2021
38182c0
Update colossussspBidAdapter.js
Jan 15, 2021
d2b3331
Update colossussspBidAdapter.js
Jan 15, 2021
6e2a64b
Update colossussspBidAdapter_spec.js
Jan 15, 2021
32c71f2
Merge remote-tracking branch 'upstream/master'
Jan 20, 2021
f0c5c24
use floor module
Jan 20, 2021
586367d
Revert "use floor module"
Jan 20, 2021
4fa75dd
use floor module
Jan 20, 2021
4e16010
update to 5v
Aug 2, 2021
3f62aa0
fix conflicts
Aug 2, 2021
d8e9722
fix
Aug 2, 2021
00dd7a4
add uid2 and bidFloor support
Aug 29, 2021
bb93f94
fix
Aug 29, 2021
be17cfe
fix conflicts
Aug 29, 2021
58b1381
Merge remote-tracking branch 'prebid/master'
Sep 23, 2021
a30eff4
add pbadslot support
Sep 23, 2021
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: 4 additions & 0 deletions modules/colossussspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export const spec = {
if (bid.schain) {
placement.schain = bid.schain;
}
let gpid = utils.deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
if (gpid) {
placement.gpid = gpid;
}
if (bid.userId) {
getUserId(placement.eids, bid.userId.britepoolid, 'britepool.com');
getUserId(placement.eids, bid.userId.idl_env, 'identityLink');
Expand Down
20 changes: 14 additions & 6 deletions test/spec/modules/colossussspBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect} from 'chai';
import {spec} from '../../../modules/colossussspBidAdapter.js';
import { expect } from 'chai';
import { spec } from '../../../modules/colossussspBidAdapter.js';

describe('ColossussspAdapter', function () {
let bid = {
Expand All @@ -16,6 +16,13 @@ describe('ColossussspAdapter', function () {
sizes: [[300, 250]]
}
},
ortb2Imp: {
ext: {
data: {
pbadslot: '/19968336/prebid_cache_video_adunit'
}
}
},
transactionId: '3bb2f6da-87a6-4029-aeb0-bfe951372e62',
schain: {
ver: '1.0',
Expand Down Expand Up @@ -71,7 +78,7 @@ describe('ColossussspAdapter', function () {
it('Returns valid URL', function () {
expect(serverRequest.url).to.equal('https://colossusssp.com/?c=o&m=multi');
});
it('Should contain ccpa', function() {
it('Should contain ccpa', function () {
expect(serverRequest.data.ccpa).to.be.an('string')
})

Expand All @@ -88,13 +95,14 @@ describe('ColossussspAdapter', function () {
let placements = data['placements'];
for (let i = 0; i < placements.length; i++) {
let placement = placements[i];
expect(placement).to.have.all.keys('placementId', 'eids', 'bidId', 'traffic', 'sizes', 'schain', 'floor');
expect(placement).to.have.all.keys('placementId', 'eids', 'bidId', 'traffic', 'sizes', 'schain', 'floor', 'gpid');
expect(placement.schain).to.be.an('object')
expect(placement.placementId).to.be.a('number');
expect(placement.bidId).to.be.a('string');
expect(placement.traffic).to.be.a('string');
expect(placement.sizes).to.be.an('array');
expect(placement.floor).to.be.an('object');
expect(placement.gpid).to.be.an('string');
}
});
it('Returns empty data if no valid requests are passed', function () {
Expand Down Expand Up @@ -135,7 +143,7 @@ describe('ColossussspAdapter', function () {

describe('interpretResponse', function () {
let resObject = {
body: [ {
body: [{
requestId: '123',
mediaType: 'banner',
cpm: 0.3,
Expand All @@ -150,7 +158,7 @@ describe('ColossussspAdapter', function () {
advertiserDomains: ['google.com'],
advertiserId: 1234
}
} ]
}]
};
let serverResponses = spec.interpretResponse(resObject);
it('Returns an array of valid server responses if response object is valid', function () {
Expand Down