prebid.js 7.4.0 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +11 -6
- package/dist/1plusXRtdProvider.js +1 -0
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adoceanBidAdapter.js +1 -1
- package/dist/adotBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adrinoBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bliinkBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/newspassidBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +131 -128
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/rasBidAdapter.js +1 -0
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/1plusXRtdProviderExample.html +112 -0
- package/karma.conf.maker.js +3 -1
- package/modules/.submodules.json +2 -1
- package/modules/1plusXRtdProvider.js +251 -0
- package/modules/1plusXRtdProvider.md +65 -0
- package/modules/adgenerationBidAdapter.js +24 -1
- package/modules/adnuntiusBidAdapter.js +26 -8
- package/modules/adoceanBidAdapter.js +10 -3
- package/modules/adotBidAdapter.js +13 -4
- package/modules/adrinoBidAdapter.js +10 -2
- package/modules/adrinoBidAdapter.md +6 -0
- package/modules/adtelligentBidAdapter.js +2 -1
- package/modules/appnexusBidAdapter.js +3 -3
- package/modules/atsAnalyticsAdapter.js +4 -5
- package/modules/big-richmediaBidAdapter.js +3 -3
- package/modules/bliinkBidAdapter.js +120 -193
- package/modules/bliinkBidAdapter.md +2 -5
- package/modules/byDataAnalyticsAdapter.js +172 -74
- package/modules/byDataAnalyticsAdapter.md +5 -6
- package/modules/consumableBidAdapter.js +21 -1
- package/modules/criteoBidAdapter.js +7 -1
- package/modules/currency.js +2 -2
- package/modules/cwireBidAdapter.md +1 -1
- package/modules/eplanningBidAdapter.js +82 -97
- package/modules/gdprEnforcement.js +8 -14
- package/modules/gridNMBidAdapter.js +45 -4
- package/modules/hadronAnalyticsAdapter.md +5 -5
- package/modules/hadronIdSystem.js +18 -5
- package/modules/hadronIdSystem.md +15 -11
- package/modules/hadronRtdProvider.js +14 -1
- package/modules/hadronRtdProvider.md +17 -13
- package/modules/imRtdProvider.js +0 -8
- package/modules/impactifyBidAdapter.js +6 -2
- package/modules/ixBidAdapter.js +133 -23
- package/modules/ixBidAdapter.md +2 -5
- package/modules/jixieBidAdapter.js +10 -10
- package/modules/kargoAnalyticsAdapter.js +88 -6
- package/modules/kargoAnalyticsAdapter.md +33 -0
- package/modules/minutemediaBidAdapter.js +1 -0
- package/modules/naveggIdSystem.js +1 -12
- package/modules/newspassidBidAdapter.js +649 -0
- package/modules/nextMillenniumBidAdapter.js +17 -1
- package/modules/nextMillenniumBidAdapter.md +1 -1
- package/modules/oguryBidAdapter.js +2 -0
- package/modules/onetagBidAdapter.js +44 -7
- package/modules/prebidServerBidAdapter/index.js +7 -0
- package/modules/priceFloors.js +1 -1
- package/modules/pubCommonId.js +1 -2
- package/modules/pubxaiAnalyticsAdapter.js +6 -1
- package/modules/rasBidAdapter.js +149 -0
- package/modules/rasBidAdapter.md +50 -0
- package/modules/rubiconBidAdapter.js +5 -0
- package/modules/seedingAllianceBidAdapter.js +3 -0
- package/modules/seedtagBidAdapter.js +37 -1
- package/modules/sharedIdSystem.js +11 -5
- package/modules/sharethroughBidAdapter.js +9 -24
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.md +3 -3
- package/modules/targetVideoBidAdapter.js +18 -0
- package/modules/userId/index.js +39 -21
- package/package.json +1 -1
- package/src/auction.js +6 -5
- package/src/consentHandler.js +11 -11
- package/src/debugging.js +5 -3
- package/src/hook.js +2 -2
- package/src/storageManager.js +4 -5
- package/src/utils/promise.js +96 -21
- package/src/utils.js +3 -2
- package/test/helpers/consentData.js +2 -1
- package/test/spec/auctionmanager_spec.js +1 -6
- package/test/spec/debugging_spec.js +2 -2
- package/test/spec/modules/1plusXRtdProvider_spec.js +430 -0
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
- package/test/spec/modules/adoceanBidAdapter_spec.js +4 -1
- package/test/spec/modules/adotBidAdapter_spec.js +12 -9
- package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
- package/test/spec/modules/bliinkBidAdapter_spec.js +323 -136
- package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
- package/test/spec/modules/consumableBidAdapter_spec.js +122 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
- package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
- package/test/spec/modules/gdprEnforcement_spec.js +53 -100
- package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
- package/test/spec/modules/hadronIdSystem_spec.js +2 -2
- package/test/spec/modules/idxIdSystem_spec.js +1 -1
- package/test/spec/modules/imRtdProvider_spec.js +0 -1
- package/test/spec/modules/ixBidAdapter_spec.js +212 -5
- package/test/spec/modules/jixieBidAdapter_spec.js +8 -8
- package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
- package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
- package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
- package/test/spec/modules/onetagBidAdapter_spec.js +53 -4
- package/test/spec/modules/parrableIdSystem_spec.js +2 -1
- package/test/spec/modules/prebidServerBidAdapter_spec.js +20 -0
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
- package/test/spec/modules/rasBidAdapter_spec.js +190 -0
- package/test/spec/modules/rubiconBidAdapter_spec.js +27 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
- package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
- package/test/spec/modules/targetVideoBidAdapter_spec.js +43 -0
- package/test/spec/modules/userId_spec.js +15 -2
- package/test/spec/unit/pbjs_api_spec.js +1 -5
- package/test/spec/unit/utils/promise_spec.js +283 -38
- package/test/helpers/syncPromise.js +0 -71
|
@@ -6,6 +6,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
|
6
6
|
import { ajax } from '../src/ajax.js'
|
|
7
7
|
|
|
8
8
|
const BIDDER_CODE = 'ogury';
|
|
9
|
+
const GVLID = 31;
|
|
9
10
|
const DEFAULT_TIMEOUT = 1000;
|
|
10
11
|
const BID_HOST = 'https://mweb-hb.presage.io/api/header-bidding-request';
|
|
11
12
|
const TIMEOUT_MONITORING_HOST = 'https://ms-ads-monitoring-events.presage.io';
|
|
@@ -198,6 +199,7 @@ function onTimeout(timeoutData) {
|
|
|
198
199
|
|
|
199
200
|
export const spec = {
|
|
200
201
|
code: BIDDER_CODE,
|
|
202
|
+
gvlid: GVLID,
|
|
201
203
|
supportedMediaTypes: [BANNER],
|
|
202
204
|
isBidRequestValid,
|
|
203
205
|
getUserSyncs,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
4
|
-
import {INSTREAM, OUTSTREAM} from '../src/video.js';
|
|
5
|
-
import {Renderer} from '../src/Renderer.js';
|
|
3
|
+
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
4
|
+
import { INSTREAM, OUTSTREAM } from '../src/video.js';
|
|
5
|
+
import { Renderer } from '../src/Renderer.js';
|
|
6
6
|
import {find} from '../src/polyfill.js';
|
|
7
|
-
import {getStorageManager} from '../src/storageManager.js';
|
|
8
|
-
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
9
|
-
import {createEidsArray} from './userId/eids.js';
|
|
10
|
-
import {deepClone} from '../src/utils.js';
|
|
7
|
+
import { getStorageManager } from '../src/storageManager.js';
|
|
8
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
9
|
+
import { createEidsArray } from './userId/eids.js';
|
|
10
|
+
import { deepClone, logError, deepAccess } from '../src/utils.js';
|
|
11
11
|
|
|
12
12
|
const ENDPOINT = 'https://onetag-sys.com/prebid-request';
|
|
13
13
|
const USER_SYNC_ENDPOINT = 'https://onetag-sys.com/usync/';
|
|
@@ -68,6 +68,9 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
68
68
|
if (validBidRequests && validBidRequests.length !== 0 && validBidRequests[0].userId) {
|
|
69
69
|
payload.userId = createEidsArray(validBidRequests[0].userId);
|
|
70
70
|
}
|
|
71
|
+
if (validBidRequests && validBidRequests.length !== 0 && validBidRequests[0].schain && isSchainValid(validBidRequests[0].schain)) {
|
|
72
|
+
payload.schain = validBidRequests[0].schain;
|
|
73
|
+
}
|
|
71
74
|
try {
|
|
72
75
|
if (storage.hasLocalStorage()) {
|
|
73
76
|
payload.onetagSid = storage.getDataFromLocalStorage('onetag_sid');
|
|
@@ -245,6 +248,7 @@ function requestsToBids(bidRequests) {
|
|
|
245
248
|
// Other params
|
|
246
249
|
videoObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.video);
|
|
247
250
|
videoObj['type'] = VIDEO;
|
|
251
|
+
videoObj['priceFloors'] = getBidFloor(bidRequest, VIDEO, videoObj['playerSize']);
|
|
248
252
|
return videoObj;
|
|
249
253
|
});
|
|
250
254
|
const bannerBidRequests = bidRequests.filter(bidRequest => isValid(BANNER, bidRequest)).map(bidRequest => {
|
|
@@ -253,6 +257,7 @@ function requestsToBids(bidRequests) {
|
|
|
253
257
|
bannerObj['sizes'] = parseSizes(bidRequest);
|
|
254
258
|
bannerObj['type'] = BANNER;
|
|
255
259
|
bannerObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.banner);
|
|
260
|
+
bannerObj['priceFloors'] = getBidFloor(bidRequest, BANNER, bannerObj['sizes']);
|
|
256
261
|
return bannerObj;
|
|
257
262
|
});
|
|
258
263
|
return videoBidRequests.concat(bannerBidRequests);
|
|
@@ -265,6 +270,7 @@ function setGeneralInfo(bidRequest) {
|
|
|
265
270
|
this['bidderRequestId'] = bidRequest.bidderRequestId;
|
|
266
271
|
this['auctionId'] = bidRequest.auctionId;
|
|
267
272
|
this['transactionId'] = bidRequest.transactionId;
|
|
273
|
+
this['gpid'] = deepAccess(bidRequest, 'ortb2Imp.ext.gpid') || deepAccess(bidRequest, 'ortb2Imp.ext.data.pbadslot');
|
|
268
274
|
this['pubId'] = params.pubId;
|
|
269
275
|
this['ext'] = params.ext;
|
|
270
276
|
if (params.pubClick) {
|
|
@@ -373,6 +379,37 @@ function getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
|
373
379
|
return syncs;
|
|
374
380
|
}
|
|
375
381
|
|
|
382
|
+
function getBidFloor(bidRequest, mediaType, sizes) {
|
|
383
|
+
const priceFloors = [];
|
|
384
|
+
if (typeof bidRequest.getFloor === 'function') {
|
|
385
|
+
sizes.forEach(size => {
|
|
386
|
+
const floor = bidRequest.getFloor({
|
|
387
|
+
currency: 'EUR',
|
|
388
|
+
mediaType: mediaType || '*',
|
|
389
|
+
size: [size.width, size.height]
|
|
390
|
+
});
|
|
391
|
+
floor.size = deepClone(size);
|
|
392
|
+
if (!floor.floor) { floor.floor = null; }
|
|
393
|
+
priceFloors.push(floor);
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
return priceFloors;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export function isSchainValid(schain) {
|
|
400
|
+
let isValid = false;
|
|
401
|
+
const requiredFields = ['asi', 'sid', 'hp'];
|
|
402
|
+
if (!schain || !schain.nodes) return isValid;
|
|
403
|
+
isValid = schain.nodes.reduce((status, node) => {
|
|
404
|
+
if (!status) return status;
|
|
405
|
+
return requiredFields.every(field => node.hasOwnProperty(field));
|
|
406
|
+
}, true);
|
|
407
|
+
if (!isValid) {
|
|
408
|
+
logError('OneTag: required schain params missing');
|
|
409
|
+
}
|
|
410
|
+
return isValid;
|
|
411
|
+
}
|
|
412
|
+
|
|
376
413
|
export const spec = {
|
|
377
414
|
code: BIDDER_CODE,
|
|
378
415
|
gvlid: GVLID,
|
|
@@ -984,6 +984,13 @@ Object.assign(ORTB2.prototype, {
|
|
|
984
984
|
});
|
|
985
985
|
bidObject.requestTimestamp = this.requestTimestamp;
|
|
986
986
|
bidObject.cpm = cpm;
|
|
987
|
+
if (bid?.ext?.prebid?.meta?.adaptercode) {
|
|
988
|
+
bidObject.adapterCode = bid.ext.prebid.meta.adaptercode;
|
|
989
|
+
} else if (bidRequest?.bidder) {
|
|
990
|
+
bidObject.adapterCode = bidRequest.bidder;
|
|
991
|
+
} else {
|
|
992
|
+
bidObject.adapterCode = seatbid.seat;
|
|
993
|
+
}
|
|
987
994
|
|
|
988
995
|
// temporarily leaving attaching it to each bidResponse so no breaking change
|
|
989
996
|
// BUT: this is a flat map, so it should be only attached to bidderRequest, a the change above does
|
package/modules/priceFloors.js
CHANGED
|
@@ -751,7 +751,7 @@ export function addBidResponseHook(fn, adUnitCode, bid) {
|
|
|
751
751
|
flooredBid.status = CONSTANTS.BID_STATUS.BID_REJECTED;
|
|
752
752
|
// if floor not met update bid with 0 cpm so it is not included downstream and marked as no-bid
|
|
753
753
|
flooredBid.cpm = 0;
|
|
754
|
-
logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met`, bid);
|
|
754
|
+
logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met (adjusted cpm: ${bid?.floorData?.cpmAfterAdjustments}, floor: ${floorInfo?.matchingFloor})`, bid);
|
|
755
755
|
return fn.call(this, adUnitCode, flooredBid);
|
|
756
756
|
}
|
|
757
757
|
return fn.call(this, adUnitCode, bid);
|
package/modules/pubCommonId.js
CHANGED
|
@@ -9,8 +9,7 @@ import * as events from '../src/events.js';
|
|
|
9
9
|
import CONSTANTS from '../src/constants.json';
|
|
10
10
|
import { getStorageManager } from '../src/storageManager.js';
|
|
11
11
|
|
|
12
|
-
const
|
|
13
|
-
const storage = getStorageManager({moduleType: MODULE_TYPE});
|
|
12
|
+
const storage = getStorageManager();
|
|
14
13
|
|
|
15
14
|
const ID_NAME = '_pubcid';
|
|
16
15
|
const OPTOUT_NAME = '_pubcid_optout';
|
|
@@ -91,7 +91,12 @@ function mapBidResponse(bidResponse, status) {
|
|
|
91
91
|
} else {
|
|
92
92
|
Object.assign(bid, {
|
|
93
93
|
bidId: bidResponse.requestId,
|
|
94
|
-
floorProvider: events.floorDetail
|
|
94
|
+
floorProvider: events.floorDetail?.floorProvider || null,
|
|
95
|
+
floorFetchStatus: events.floorDetail?.fetchStatus || null,
|
|
96
|
+
floorLocation: events.floorDetail?.location || null,
|
|
97
|
+
floorModelVersion: events.floorDetail?.modelVersion || null,
|
|
98
|
+
floorSkipRate: events.floorDetail?.skipRate || 0,
|
|
99
|
+
isFloorSkipped: events.floorDetail?.skipped || false,
|
|
95
100
|
isWinningBid: true,
|
|
96
101
|
placementId: bidResponse.params ? deepAccess(bidResponse, 'params.0.placementId') : null,
|
|
97
102
|
renderedSize: bidResponse.size,
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import { BANNER } from '../src/mediaTypes.js';
|
|
3
|
+
import { isEmpty, getAdUnitSizes, parseSizesInput, deepAccess } from '../src/utils.js';
|
|
4
|
+
|
|
5
|
+
const BIDDER_CODE = 'ras';
|
|
6
|
+
const VERSION = '1.0';
|
|
7
|
+
|
|
8
|
+
const getEndpoint = (network) => `https://csr.onet.pl/${encodeURIComponent(network)}/csr-006/csr.json?`;
|
|
9
|
+
|
|
10
|
+
function parseParams(params, bidderRequest) {
|
|
11
|
+
const newParams = {};
|
|
12
|
+
const du = deepAccess(bidderRequest, 'refererInfo.page');
|
|
13
|
+
const dr = deepAccess(bidderRequest, 'refererInfo.ref');
|
|
14
|
+
|
|
15
|
+
if (du) {
|
|
16
|
+
newParams.du = du;
|
|
17
|
+
}
|
|
18
|
+
if (dr) {
|
|
19
|
+
newParams.dr = dr;
|
|
20
|
+
}
|
|
21
|
+
const pageContext = params.pageContext;
|
|
22
|
+
if (!pageContext) {
|
|
23
|
+
return newParams;
|
|
24
|
+
}
|
|
25
|
+
if (pageContext.du) {
|
|
26
|
+
newParams.du = pageContext.du;
|
|
27
|
+
}
|
|
28
|
+
if (pageContext.dr) {
|
|
29
|
+
newParams.dr = pageContext.dr;
|
|
30
|
+
}
|
|
31
|
+
if (pageContext.dv) {
|
|
32
|
+
newParams.DV = pageContext.dv;
|
|
33
|
+
}
|
|
34
|
+
if (pageContext.keyWords && Array.isArray(pageContext.keyWords)) {
|
|
35
|
+
newParams.kwrd = pageContext.keyWords.join('+');
|
|
36
|
+
}
|
|
37
|
+
if (pageContext.capping) {
|
|
38
|
+
newParams.local_capping = pageContext.capping;
|
|
39
|
+
}
|
|
40
|
+
if (pageContext.keyValues && typeof pageContext.keyValues === 'object') {
|
|
41
|
+
for (const param in pageContext.keyValues) {
|
|
42
|
+
if (pageContext.keyValues.hasOwnProperty(param)) {
|
|
43
|
+
const kvName = 'kv' + param;
|
|
44
|
+
newParams[kvName] = pageContext.keyValues[param];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return newParams;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const buildBid = (ad) => {
|
|
52
|
+
if (ad.type === 'empty') {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
requestId: ad.id,
|
|
57
|
+
cpm: ad.bid_rate ? ad.bid_rate.toFixed(2) : 0,
|
|
58
|
+
width: ad.width || 0,
|
|
59
|
+
height: ad.height || 0,
|
|
60
|
+
ttl: 300,
|
|
61
|
+
creativeId: ad.adid ? parseInt(ad.adid.split(',')[2], 10) : 0,
|
|
62
|
+
netRevenue: true,
|
|
63
|
+
currency: ad.currency || 'USD',
|
|
64
|
+
dealId: null,
|
|
65
|
+
meta: {
|
|
66
|
+
mediaType: BANNER
|
|
67
|
+
},
|
|
68
|
+
ad: ad.html || null
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const getContextParams = (bidRequests, bidderRequest) => {
|
|
73
|
+
const bid = bidRequests[0];
|
|
74
|
+
const { params } = bid;
|
|
75
|
+
const requestParams = {
|
|
76
|
+
site: params.site,
|
|
77
|
+
area: params.area,
|
|
78
|
+
cre_format: 'html',
|
|
79
|
+
systems: 'das',
|
|
80
|
+
kvprver: VERSION,
|
|
81
|
+
ems_url: 1,
|
|
82
|
+
bid_rate: 1,
|
|
83
|
+
...parseParams(params, bidderRequest)
|
|
84
|
+
};
|
|
85
|
+
return Object.keys(requestParams).map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(requestParams[key])).join('&');
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const getSlots = (bidRequests) => {
|
|
89
|
+
let queryString = '';
|
|
90
|
+
const batchSize = bidRequests.length;
|
|
91
|
+
for (let i = 0; i < batchSize; i++) {
|
|
92
|
+
const adunit = bidRequests[i];
|
|
93
|
+
const sizes = parseSizesInput(getAdUnitSizes(adunit)).join(',');
|
|
94
|
+
queryString += `&slot${i}=${encodeURIComponent(adunit.params.slot)}&id${i}=${encodeURIComponent(adunit.bidId)}&composition${i}=CHILD`;
|
|
95
|
+
if (sizes.length) {
|
|
96
|
+
queryString += `&iusizes${i}=${encodeURIComponent(sizes)}`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return queryString;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const getGdprParams = (bidderRequest) => {
|
|
103
|
+
const gdprApplies = deepAccess(bidderRequest, 'gdprConsent.gdprApplies');
|
|
104
|
+
let consentString = deepAccess(bidderRequest, 'gdprConsent.consentString');
|
|
105
|
+
let queryString = '';
|
|
106
|
+
if (gdprApplies !== undefined) {
|
|
107
|
+
queryString += `&gdpr_applies=${encodeURIComponent(gdprApplies)}`;
|
|
108
|
+
}
|
|
109
|
+
if (consentString !== undefined) {
|
|
110
|
+
queryString += `&euconsent=${encodeURIComponent(consentString)}`;
|
|
111
|
+
}
|
|
112
|
+
return queryString;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const spec = {
|
|
116
|
+
code: BIDDER_CODE,
|
|
117
|
+
supportedMediaTypes: [BANNER],
|
|
118
|
+
|
|
119
|
+
isBidRequestValid: function (bidRequest) {
|
|
120
|
+
if (!bidRequest || !bidRequest.params || typeof bidRequest.params !== 'object') {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const { params } = bidRequest;
|
|
124
|
+
return Boolean(params.network && params.site && params.area && params.slot);
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
buildRequests: function (bidRequests, bidderRequest) {
|
|
128
|
+
const slotsQuery = getSlots(bidRequests);
|
|
129
|
+
const contextQuery = getContextParams(bidRequests, bidderRequest);
|
|
130
|
+
const gdprQuery = getGdprParams(bidderRequest);
|
|
131
|
+
const bidIds = bidRequests.map((bid) => ({ slot: bid.params.slot, bidId: bid.bidId }));
|
|
132
|
+
const network = bidRequests[0].params.network;
|
|
133
|
+
return [{
|
|
134
|
+
method: 'GET',
|
|
135
|
+
url: getEndpoint(network) + contextQuery + slotsQuery + gdprQuery,
|
|
136
|
+
bidIds: bidIds
|
|
137
|
+
}];
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
interpretResponse: function (serverResponse, bidRequest) {
|
|
141
|
+
const response = serverResponse.body;
|
|
142
|
+
if (!response || !response.ads || response.ads.length === 0) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
return response.ads.map(buildBid).filter((bid) => !isEmpty(bid));
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: Ringier Axel Springer Bidder Adapter
|
|
5
|
+
Module Type: Bidder Adapter
|
|
6
|
+
Maintainer: support@ringpublishing.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Module that connects to Ringer Axel Springer demand sources.
|
|
12
|
+
Only banner format is supported.
|
|
13
|
+
|
|
14
|
+
# Test Parameters
|
|
15
|
+
```js
|
|
16
|
+
var adUnits = [{
|
|
17
|
+
code: 'test-div-ad',
|
|
18
|
+
mediaTypes: {
|
|
19
|
+
banner: {
|
|
20
|
+
sizes: [[300, 250], [300, 600]]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
bids: [{
|
|
24
|
+
bidder: 'ras',
|
|
25
|
+
params: {
|
|
26
|
+
network: '4178463',
|
|
27
|
+
site: 'test',
|
|
28
|
+
area: 'areatest',
|
|
29
|
+
slot: 'slot'
|
|
30
|
+
}
|
|
31
|
+
}]
|
|
32
|
+
}];
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
# Parameters
|
|
36
|
+
|
|
37
|
+
| Name | Scope | Type | Description | Example
|
|
38
|
+
| --- | --- | --- | --- | ---
|
|
39
|
+
| network | required | String | Specific identifier provided by RAS | `"4178463"`
|
|
40
|
+
| site | required | String | Specific identifier name (case-insensitive) that is associated with this ad unit and provided by RAS | `"example_com"`
|
|
41
|
+
| area | required | String | Ad unit category name; only case-insensitive alphanumeric with underscores and hyphens are allowed | `"sport"`
|
|
42
|
+
| slot | required | String | Ad unit placement name (case-insensitive) provided by RAS | `"slot"`
|
|
43
|
+
| pageContext | optional | Object | Web page context data | `{}`
|
|
44
|
+
| pageContext.dr | optional | String | Document referrer URL address | `"https://example.com/"`
|
|
45
|
+
| pageContext.du | optional | String | Document URL address | `"https://example.com/sport/football/article.html?id=932016a5-02fc-4d5c-b643-fafc2f270f06"`
|
|
46
|
+
| pageContext.dv | optional | String | Document virtual address as slash-separated path that may consist of any number of parts (case-insensitive alphanumeric with underscores and hyphens); first part should be the same as `site` value and second as `area` value; next parts may reflect website navigation | `"example_com/sport/football"`
|
|
47
|
+
| pageContext.keyWords | optional | String[] | List of keywords associated with this ad unit; only case-insensitive alphanumeric with underscores and hyphens are allowed | `["euro", "lewandowski"]`
|
|
48
|
+
| pageContext.keyValues | optional | Object | Key-values associated with this ad unit (case-insensitive); following characters are not allowed in the values: `" ' = ! + # * ~ ; ^ ( ) < > [ ] & @` | `{}`
|
|
49
|
+
| pageContext.keyValues.ci | optional | String | Content unique identifier | `"932016a5-02fc-4d5c-b643-fafc2f270f06"`
|
|
50
|
+
| pageContext.keyValues.adunit | optional | String | Ad unit name | `"example_com/sport"`
|
|
@@ -320,6 +320,11 @@ export const spec = {
|
|
|
320
320
|
// set ext.prebid.auctiontimestamp using auction time
|
|
321
321
|
deepSetValue(data.imp[0], 'ext.prebid.auctiontimestamp', bidderRequest.auctionStart);
|
|
322
322
|
|
|
323
|
+
// set storedrequests to undefined so not sent to PBS
|
|
324
|
+
// top level and imp level both 'ext.prebid' objects are set above so no exception thrown here
|
|
325
|
+
data.ext.prebid.storedrequest = undefined;
|
|
326
|
+
data.imp[0].ext.prebid.storedrequest = undefined;
|
|
327
|
+
|
|
323
328
|
return {
|
|
324
329
|
method: 'POST',
|
|
325
330
|
url: `https://${rubiConf.videoHost || 'prebid-server'}.rubiconproject.com/openrtb2/auction`,
|
|
@@ -7,6 +7,7 @@ import { _map, deepSetValue, isEmpty, deepAccess } from '../src/utils.js';
|
|
|
7
7
|
import { config } from '../src/config.js';
|
|
8
8
|
|
|
9
9
|
const BIDDER_CODE = 'seedingAlliance';
|
|
10
|
+
const GVL_ID = 371;
|
|
10
11
|
const DEFAULT_CUR = 'EUR';
|
|
11
12
|
const ENDPOINT_URL = 'https://b.nativendo.de/cds/rtb/bid?format=openrtb2.5&ssp=pb';
|
|
12
13
|
|
|
@@ -52,6 +53,8 @@ const NATIVE_PARAMS = {
|
|
|
52
53
|
export const spec = {
|
|
53
54
|
code: BIDDER_CODE,
|
|
54
55
|
|
|
56
|
+
gvlid: GVL_ID,
|
|
57
|
+
|
|
55
58
|
supportedMediaTypes: [NATIVE],
|
|
56
59
|
|
|
57
60
|
isBidRequestValid: function(bid) {
|
|
@@ -147,6 +147,36 @@ function buildBidResponse(seedtagBid) {
|
|
|
147
147
|
return bid;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @returns Measure time to first byte implementation
|
|
153
|
+
* @see https://web.dev/ttfb/
|
|
154
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API
|
|
155
|
+
*/
|
|
156
|
+
function ttfb() {
|
|
157
|
+
const ttfb = (() => {
|
|
158
|
+
// Timing API V2
|
|
159
|
+
try {
|
|
160
|
+
const entry = performance.getEntriesByType('navigation')[0];
|
|
161
|
+
return Math.round(entry.responseStart - entry.startTime);
|
|
162
|
+
} catch (e) {
|
|
163
|
+
// Timing API V1
|
|
164
|
+
try {
|
|
165
|
+
const entry = performance.timing;
|
|
166
|
+
return Math.round(entry.responseStart - entry.fetchStart);
|
|
167
|
+
} catch (e) {
|
|
168
|
+
// Timing API not available
|
|
169
|
+
return 0;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
})();
|
|
173
|
+
|
|
174
|
+
// prevent negative or excessive value
|
|
175
|
+
// @see https://github.com/googleChrome/web-vitals/issues/162
|
|
176
|
+
// https://github.com/googleChrome/web-vitals/issues/137
|
|
177
|
+
return ttfb >= 0 && ttfb <= performance.now() ? ttfb : 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
150
180
|
export function getTimeoutUrl (data) {
|
|
151
181
|
let queryParams = '';
|
|
152
182
|
if (
|
|
@@ -195,7 +225,9 @@ export const spec = {
|
|
|
195
225
|
timeout: bidderRequest.timeout,
|
|
196
226
|
version: '$prebid.version$',
|
|
197
227
|
connectionType: getConnectionType(),
|
|
198
|
-
|
|
228
|
+
auctionStart: bidderRequest.auctionStart || Date.now(),
|
|
229
|
+
ttfb: ttfb(),
|
|
230
|
+
bidRequests: _map(validBidRequests, buildBidRequest),
|
|
199
231
|
};
|
|
200
232
|
|
|
201
233
|
if (payload.cmp) {
|
|
@@ -204,6 +236,10 @@ export const spec = {
|
|
|
204
236
|
payload['cd'] = bidderRequest.gdprConsent.consentString;
|
|
205
237
|
}
|
|
206
238
|
|
|
239
|
+
if (bidderRequest.uspConsent) {
|
|
240
|
+
payload['uspConsent'] = bidderRequest.uspConsent
|
|
241
|
+
}
|
|
242
|
+
|
|
207
243
|
const payloadString = JSON.stringify(payload)
|
|
208
244
|
return {
|
|
209
245
|
method: 'POST',
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* @requires module:modules/userId
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { parseUrl, buildUrl, triggerPixel, logInfo, hasDeviceAccess, generateUUID } from '../src/utils.js';
|
|
9
9
|
import {submodule} from '../src/hook.js';
|
|
10
|
-
import {coppaDataHandler} from '../src/adapterManager.js';
|
|
10
|
+
import { coppaDataHandler } from '../src/adapterManager.js';
|
|
11
11
|
import {getStorageManager} from '../src/storageManager.js';
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
export const storage = getStorageManager({moduleName: 'pubCommonId'
|
|
13
|
+
const GVLID = 887;
|
|
14
|
+
export const storage = getStorageManager({gvlid: GVLID, moduleName: 'pubCommonId'});
|
|
15
15
|
const COOKIE = 'cookie';
|
|
16
16
|
const LOCAL_STORAGE = 'html5';
|
|
17
17
|
const OPTOUT_NAME = '_pubcid_optout';
|
|
@@ -74,6 +74,11 @@ export const sharedIdSystemSubmodule = {
|
|
|
74
74
|
*/
|
|
75
75
|
name: 'sharedId',
|
|
76
76
|
aliasName: 'pubCommonId',
|
|
77
|
+
/**
|
|
78
|
+
* Vendor id of prebid
|
|
79
|
+
* @type {Number}
|
|
80
|
+
*/
|
|
81
|
+
gvlid: GVLID,
|
|
77
82
|
|
|
78
83
|
/**
|
|
79
84
|
* decode the stored id value for passing to bid requests
|
|
@@ -88,7 +93,8 @@ export const sharedIdSystemSubmodule = {
|
|
|
88
93
|
return undefined;
|
|
89
94
|
}
|
|
90
95
|
logInfo(' Decoded value PubCommonId ' + value);
|
|
91
|
-
|
|
96
|
+
const idObj = {'pubcid': value};
|
|
97
|
+
return idObj;
|
|
92
98
|
},
|
|
93
99
|
/**
|
|
94
100
|
* performs action to obtain id
|
|
@@ -4,7 +4,7 @@ import { config } from '../src/config.js';
|
|
|
4
4
|
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
5
5
|
import { createEidsArray } from './userId/eids.js';
|
|
6
6
|
|
|
7
|
-
const VERSION = '4.1.
|
|
7
|
+
const VERSION = '4.1.1';
|
|
8
8
|
const BIDDER_CODE = 'sharethrough';
|
|
9
9
|
const SUPPLY_ID = 'WYu2BXv1';
|
|
10
10
|
|
|
@@ -34,9 +34,8 @@ export const sharethroughAdapterSpec = {
|
|
|
34
34
|
cur: ['USD'],
|
|
35
35
|
tmax: timeout,
|
|
36
36
|
site: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
page: deepAccess(bidderRequest, 'refererInfo.page') || window.location.href,
|
|
37
|
+
domain: deepAccess(bidderRequest, 'refererInfo.domain', window.location.hostname),
|
|
38
|
+
page: deepAccess(bidderRequest, 'refererInfo.page', window.location.href),
|
|
40
39
|
ref: deepAccess(bidderRequest, 'refererInfo.ref'),
|
|
41
40
|
...firstPartyData.site,
|
|
42
41
|
},
|
|
@@ -66,7 +65,7 @@ export const sharethroughAdapterSpec = {
|
|
|
66
65
|
|
|
67
66
|
req.user = nullish(firstPartyData.user, {});
|
|
68
67
|
if (!req.user.ext) req.user.ext = {};
|
|
69
|
-
req.user.ext.eids =
|
|
68
|
+
req.user.ext.eids = createEidsArray(deepAccess(bidRequests[0], 'userId')) || [];
|
|
70
69
|
|
|
71
70
|
if (bidderRequest.gdprConsent) {
|
|
72
71
|
const gdprApplies = bidderRequest.gdprConsent.gdprApplies === true;
|
|
@@ -181,21 +180,12 @@ export const sharethroughAdapterSpec = {
|
|
|
181
180
|
});
|
|
182
181
|
},
|
|
183
182
|
|
|
184
|
-
getUserSyncs: (syncOptions, serverResponses
|
|
185
|
-
const
|
|
186
|
-
const syncs = [];
|
|
187
|
-
const shouldCookieSync = syncOptions.pixelEnabled &&
|
|
188
|
-
serverResponses.length > 0 &&
|
|
189
|
-
serverResponses[0].body &&
|
|
190
|
-
serverResponses[0].body.cookieSyncUrls;
|
|
191
|
-
|
|
192
|
-
if (shouldCookieSync) {
|
|
193
|
-
serverResponses[0].body.cookieSyncUrls.forEach(url => {
|
|
194
|
-
syncs.push({ type: 'image', url: url + syncParams });
|
|
195
|
-
});
|
|
196
|
-
}
|
|
183
|
+
getUserSyncs: (syncOptions, serverResponses) => {
|
|
184
|
+
const shouldCookieSync = syncOptions.pixelEnabled && deepAccess(serverResponses, '0.body.cookieSyncUrls') !== undefined;
|
|
197
185
|
|
|
198
|
-
return
|
|
186
|
+
return shouldCookieSync
|
|
187
|
+
? serverResponses[0].body.cookieSyncUrls.map(url => ({ type: 'image', url: url }))
|
|
188
|
+
: [];
|
|
199
189
|
},
|
|
200
190
|
|
|
201
191
|
// Empty implementation for prebid core to be able to find it
|
|
@@ -244,11 +234,6 @@ function getBidRequestFloor(bid) {
|
|
|
244
234
|
return floor !== null ? floor : bid.params.floor;
|
|
245
235
|
}
|
|
246
236
|
|
|
247
|
-
function userIdAsEids(bidRequest) {
|
|
248
|
-
const eids = createEidsArray(deepAccess(bidRequest, 'userId')) || [];
|
|
249
|
-
return eids;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
237
|
function getProtocol() {
|
|
253
238
|
return window.location.protocol;
|
|
254
239
|
}
|
|
@@ -40,10 +40,10 @@ The Taboola Bidding adapter requires setup before beginning. Please contact us o
|
|
|
40
40
|
|
|
41
41
|
| Name | Scope | Description | Example | Type |
|
|
42
42
|
|----------------|----------|---------------------------------------------------------|----------------------------|--------------|
|
|
43
|
-
| `tagId` | required | Tag ID / Placement Name <br>
|
|
44
|
-
| `publisherId` | required |
|
|
43
|
+
| `tagId` | required | Tag ID / Placement Name <br> | `'Below The Article'` | `String` |
|
|
44
|
+
| `publisherId` | required | Numeric Publisher ID <br>(as provided by Taboola) | `'1234567'` | `String` |
|
|
45
45
|
| `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `Array` |
|
|
46
46
|
| `badv` | optional | Blocked Advertiser Domains | `'example.com'` | `String Url` |
|
|
47
|
-
| `bidfloor` | optional | CPM bid floor | `0.25` | `
|
|
47
|
+
| `bidfloor` | optional | CPM bid floor | `0.25` | `Float` |
|
|
48
48
|
|
|
49
49
|
|
|
@@ -42,6 +42,24 @@ export const spec = {
|
|
|
42
42
|
},
|
|
43
43
|
schain: schain
|
|
44
44
|
};
|
|
45
|
+
|
|
46
|
+
if (bidderRequest && bidderRequest.gdprConsent) {
|
|
47
|
+
payload.gdpr_consent = {
|
|
48
|
+
consent_string: bidderRequest.gdprConsent.consentString,
|
|
49
|
+
consent_required: bidderRequest.gdprConsent.gdprApplies
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
if (bidderRequest.gdprConsent.addtlConsent && bidderRequest.gdprConsent.addtlConsent.indexOf('~') !== -1) {
|
|
53
|
+
let ac = bidderRequest.gdprConsent.addtlConsent;
|
|
54
|
+
let acStr = ac.substring(ac.indexOf('~') + 1);
|
|
55
|
+
payload.gdpr_consent.addtl_consent = acStr.split('.').map(id => parseInt(id, 10));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (bidderRequest && bidderRequest.uspConsent) {
|
|
60
|
+
payload.us_privacy = bidderRequest.uspConsent
|
|
61
|
+
}
|
|
62
|
+
|
|
45
63
|
return formatRequest(payload, bidderRequest);
|
|
46
64
|
},
|
|
47
65
|
|