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 Bidder: update user sync #8050

Merged
merged 71 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 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
97f9e69
fix conflicts
Nov 25, 2021
3459b8d
fix conflicts
Nov 25, 2021
5597d45
add onBidWon
Nov 25, 2021
afdc2db
refactor
Nov 25, 2021
df5163b
add test for onBidWon()
Dec 1, 2021
7aa74cb
fix
Dec 1, 2021
b039e90
add group_id
Jan 5, 2022
d57e129
Trigger circleci
Jan 6, 2022
e63a8e3
fix
Jan 10, 2022
aae3d00
Merge remote-tracking branch 'prebid/master'
Feb 10, 2022
93e9965
update user sync
Feb 11, 2022
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
25 changes: 21 additions & 4 deletions modules/colossussspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { getWindowTop, deepAccess, logMessage } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import { ajax } from '../src/ajax.js';
import { config } from '../src/config.js';

const BIDDER_CODE = 'colossusssp';
const G_URL = 'https://colossusssp.com/?c=o&m=multi';
const G_URL_SYNC = 'https://colossusssp.com/?c=o&m=cookie';
const G_URL_SYNC = 'https://sync.colossusssp.com';

function isBidResponseValid(bid) {
if (!bid.requestId || !bid.cpm || !bid.creativeId || !bid.ttl || !bid.currency) {
Expand Down Expand Up @@ -175,10 +176,26 @@ export const spec = {
return response;
},

getUserSyncs: () => {
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
let syncType = syncOptions.iframeEnabled ? 'html' : 'hms.gif';
let syncUrl = G_URL_SYNC + `/${syncType}?pbjs=1`;
if (gdprConsent && gdprConsent.consentString) {
if (typeof gdprConsent.gdprApplies === 'boolean') {
syncUrl += `&gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
} else {
syncUrl += `&gdpr=0&gdpr_consent=${gdprConsent.consentString}`;
}
}
if (uspConsent && uspConsent.consentString) {
syncUrl += `&ccpa_consent=${uspConsent.consentString}`;
}

const coppa = config.getConfig('coppa') ? 1 : 0;
syncUrl += `&coppa=${coppa}`;

return [{
type: 'image',
url: G_URL_SYNC
type: syncType,
url: syncUrl
}];
},

Expand Down
6 changes: 3 additions & 3 deletions test/spec/modules/colossussspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ describe('ColossussspAdapter', function () {
})

describe('getUserSyncs', function () {
let userSync = spec.getUserSyncs();
let userSync = spec.getUserSyncs({}, {}, {}, {});
it('Returns valid URL and type', function () {
expect(userSync).to.be.an('array').with.lengthOf(1);
expect(userSync[0].type).to.exist;
expect(userSync[0].url).to.exist;
expect(userSync[0].type).to.be.equal('image');
expect(userSync[0].url).to.be.equal('https://colossusssp.com/?c=o&m=cookie');
expect(userSync[0].type).to.be.equal('hms.gif');
expect(userSync[0].url).to.be.equal('https://sync.colossusssp.com/hms.gif?pbjs=1&coppa=0');
});
});
});