@@ -2,10 +2,11 @@ import { getWindowTop, deepAccess, logMessage } from '../src/utils.js';
2
2
import { registerBidder } from '../src/adapters/bidderFactory.js' ;
3
3
import { BANNER , NATIVE , VIDEO } from '../src/mediaTypes.js' ;
4
4
import { ajax } from '../src/ajax.js' ;
5
+ import { config } from '../src/config.js' ;
5
6
6
7
const BIDDER_CODE = 'colossusssp' ;
7
8
const G_URL = 'https://colossusssp.com/?c=o&m=multi' ;
8
- const G_URL_SYNC = 'https://colossusssp.com/?c=o&m=cookie ' ;
9
+ const G_URL_SYNC = 'https://sync. colossusssp.com' ;
9
10
10
11
function isBidResponseValid ( bid ) {
11
12
if ( ! bid . requestId || ! bid . cpm || ! bid . creativeId || ! bid . ttl || ! bid . currency ) {
@@ -175,10 +176,26 @@ export const spec = {
175
176
return response ;
176
177
} ,
177
178
178
- getUserSyncs : ( ) => {
179
+ getUserSyncs : ( syncOptions , serverResponses , gdprConsent , uspConsent ) => {
180
+ let syncType = syncOptions . iframeEnabled ? 'html' : 'hms.gif' ;
181
+ let syncUrl = G_URL_SYNC + `/${ syncType } ?pbjs=1` ;
182
+ if ( gdprConsent && gdprConsent . consentString ) {
183
+ if ( typeof gdprConsent . gdprApplies === 'boolean' ) {
184
+ syncUrl += `&gdpr=${ Number ( gdprConsent . gdprApplies ) } &gdpr_consent=${ gdprConsent . consentString } ` ;
185
+ } else {
186
+ syncUrl += `&gdpr=0&gdpr_consent=${ gdprConsent . consentString } ` ;
187
+ }
188
+ }
189
+ if ( uspConsent && uspConsent . consentString ) {
190
+ syncUrl += `&ccpa_consent=${ uspConsent . consentString } ` ;
191
+ }
192
+
193
+ const coppa = config . getConfig ( 'coppa' ) ? 1 : 0 ;
194
+ syncUrl += `&coppa=${ coppa } ` ;
195
+
179
196
return [ {
180
- type : 'image' ,
181
- url : G_URL_SYNC
197
+ type : syncType ,
198
+ url : syncUrl
182
199
} ] ;
183
200
} ,
184
201
0 commit comments