Skip to content

Commit

Permalink
Colossus Bid Adapter: update bid params (prebid#7907)
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

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 authored Jan 6, 2022
1 parent 30c6f40 commit 0ba84b6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
15 changes: 8 additions & 7 deletions modules/colossussspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export const spec = {
const location = winTop.location;
let placements = [];
let request = {
'deviceWidth': winTop.screen.width,
'deviceHeight': winTop.screen.height,
'language': (navigator && navigator.language) ? navigator.language : '',
'secure': location.protocol === 'https:' ? 1 : 0,
'host': location.host,
'page': location.pathname,
'placements': placements,
deviceWidth: winTop.screen.width,
deviceHeight: winTop.screen.height,
language: (navigator && navigator.language) ? navigator.language : '',
secure: location.protocol === 'https:' ? 1 : 0,
host: location.host,
page: location.pathname,
placements: placements,
};

if (bidderRequest) {
Expand All @@ -85,6 +85,7 @@ export const spec = {
let traff = bid.params.traffic || BANNER
let placement = {
placementId: bid.params.placement_id,
groupId: bid.params.group_id,
bidId: bid.bidId,
sizes: bid.mediaTypes[traff].sizes,
traffic: traff,
Expand Down
16 changes: 15 additions & 1 deletion modules/colossussspBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,19 @@ Module that connects to Colossus SSP demand sources
traffic: 'banner'
}
}]
];
}, {
code: 'placementid_1',
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]]
}
},
bids: [{
bidder: 'colossusssp',
params: {
group_id: 0,
traffic: 'banner'
}
}]
}];
```
6 changes: 4 additions & 2 deletions test/spec/modules/colossussspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ describe('ColossussspAdapter', function () {
bidder: 'colossusssp',
bidderRequestId: '145e1d6a7837c9',
params: {
placement_id: 0
placement_id: 0,
group_id: 0
},
placementCode: 'placementid_0',
auctionId: '74f78609-a92d-4cf1-869f-1b244bbfb5d2',
Expand Down Expand Up @@ -95,9 +96,10 @@ 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', 'gpid');
expect(placement).to.have.all.keys('placementId', 'groupId', 'eids', 'bidId', 'traffic', 'sizes', 'schain', 'floor', 'gpid');
expect(placement.schain).to.be.an('object')
expect(placement.placementId).to.be.a('number');
expect(placement.groupId).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');
Expand Down

0 comments on commit 0ba84b6

Please sign in to comment.