prebid.js 9.2.0 → 9.4.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/creative/constants.js +2 -1
- package/creative/crossDomain.js +16 -4
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioRtdProvider.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.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/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/codefuelBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -0
- package/dist/consentManagementGpp.js +1 -1
- package/dist/consentManagementTcf.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/copper6sspBidAdapter.js +1 -0
- package/dist/cpmstarBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/deltaprojectsBidAdapter.js +1 -1
- package/dist/dependencies.json +51 -13
- package/dist/dianomiBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/illuminBidAdapter.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +184 -178
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openwebBidAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orakiBidAdapter.js +1 -0
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/ozoneBidAdapter.js +1 -1
- package/dist/pairIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/processResponse.js +1 -0
- package/dist/publinkIdSystem.js +1 -1
- package/dist/publirBidAdapter.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/shinezRtbBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smartyadsBidAdapter.js +1 -1
- package/dist/smartyadsUtils.js +1 -0
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stnBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tagorasBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/twistDigitalBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/viantOrtbBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/vidazooUtils.js +1 -0
- 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/yahooAdsBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/x-domain/creative.html +1 -1
- package/libraries/consentManagement/cmUtils.js +38 -0
- package/libraries/processResponse/index.js +12 -0
- package/libraries/smartyadsUtils/getAdUrlByRegion.js +32 -0
- package/libraries/vidazooUtils/bidderUtils.js +480 -0
- package/libraries/vidazooUtils/constants.js +7 -0
- package/modules/adagioRtdProvider.js +9 -7
- package/modules/addefendBidAdapter.js +1 -2
- package/modules/adfBidAdapter.js +1 -10
- package/modules/adlooxRtdProvider.js +1 -1
- package/modules/adnuntiusBidAdapter.js +1 -0
- package/modules/adxcgAnalyticsAdapter.js +1 -2
- package/modules/carodaBidAdapter.js +3 -8
- package/modules/codefuelBidAdapter.js +1 -10
- package/modules/consentManagementGpp.js +2 -38
- package/modules/consentManagementTcf.js +7 -38
- package/modules/conversantAnalyticsAdapter.js +1 -2
- package/modules/copper6sspBidAdapter.js +19 -0
- package/modules/copper6sspBidAdapter.md +79 -0
- package/modules/cpmstarBidAdapter.js +52 -36
- package/modules/cpmstarBidAdapter.md +1 -4
- package/modules/criteoBidAdapter.js +10 -3
- package/modules/dailymotionBidAdapter.js +1 -1
- package/modules/deltaprojectsBidAdapter.js +2 -11
- package/modules/dianomiBidAdapter.js +1 -9
- package/modules/finativeBidAdapter.js +1 -10
- package/modules/gridBidAdapter.js +2 -12
- package/modules/id5AnalyticsAdapter.js +1 -2
- package/modules/illuminBidAdapter.js +9 -304
- package/modules/intentIqIdSystem.js +408 -50
- package/modules/intentIqIdSystem.md +92 -0
- package/modules/kueezRtbBidAdapter.js +17 -312
- package/modules/liveIntentIdSystem.js +2 -2
- package/modules/luponmediaBidAdapter.js +4 -10
- package/modules/mabidderBidAdapter.js +1 -2
- package/modules/medianetAnalyticsAdapter.js +1 -2
- package/modules/medianetBidAdapter.js +1 -1
- package/modules/mgidBidAdapter.js +1 -10
- package/modules/orakiBidAdapter.js +19 -0
- package/modules/orakiBidAdapter.md +79 -0
- package/modules/orbidderBidAdapter.js +4 -2
- package/modules/outbrainBidAdapter.js +8 -43
- package/modules/ozoneBidAdapter.js +9 -7
- package/modules/pairIdSystem.js +27 -10
- package/modules/pixfutureBidAdapter.js +1 -2
- package/modules/prebidServerBidAdapter/index.js +1 -1
- package/modules/seedtagBidAdapter.js +4 -0
- package/modules/shinezRtbBidAdapter.js +12 -304
- package/modules/smartadserverBidAdapter.js +3 -0
- package/modules/smartyadsBidAdapter.js +6 -110
- package/modules/snigelBidAdapter.js +1 -2
- package/modules/tagorasBidAdapter.js +13 -316
- package/modules/tappxBidAdapter.js +1 -2
- package/modules/terceptAnalyticsAdapter.js +1 -2
- package/modules/twistDigitalBidAdapter.js +9 -433
- package/modules/userId/index.js +31 -21
- package/modules/viantOrtbBidAdapter.js +20 -0
- package/modules/vidazooBidAdapter.js +26 -468
- package/modules/visxBidAdapter.js +27 -29
- package/modules/yahooAdsBidAdapter.js +4 -1
- package/modules/yuktamediaAnalyticsAdapter.js +1 -2
- package/modules/zeta_global_sspBidAdapter.js +2 -2
- package/package.json +1 -1
- package/src/adRendering.js +25 -2
- package/src/constants.js +2 -0
- package/src/prebid.js +2 -1
- package/src/utils.js +19 -1
- package/test/spec/creative/crossDomainCreative_spec.js +38 -2
- package/test/spec/fpd/gdpr_spec.js +24 -2
- package/test/spec/libraries/processResponse_spec.js +60 -0
- package/test/spec/modules/adagioRtdProvider_spec.js +12 -0
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -3
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/copper6sspBidAdapter_spec.js +514 -0
- package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
- package/test/spec/modules/dailymotionBidAdapter_spec.js +18 -14
- package/test/spec/modules/illuminBidAdapter_spec.js +26 -13
- package/test/spec/modules/intentIqIdSystem_spec.js +264 -36
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +26 -15
- package/test/spec/modules/orakiBidAdapter_spec.js +510 -0
- package/test/spec/modules/outbrainBidAdapter_spec.js +32 -1
- package/test/spec/modules/seedtagBidAdapter_spec.js +27 -0
- package/test/spec/modules/shinezRtbBidAdapter_spec.js +26 -14
- package/test/spec/modules/smartadserverBidAdapter_spec.js +7 -0
- package/test/spec/modules/smartyadsBidAdapter_spec.js +6 -83
- package/test/spec/modules/tagorasBidAdapter_spec.js +26 -15
- package/test/spec/modules/twistDigitalBidAdapter_spec.js +19 -22
- package/test/spec/modules/userId_spec.js +86 -47
- package/test/spec/modules/viantOrtbBidAdapter_spec.js +87 -6
- package/test/spec/modules/vidazooBidAdapter_spec.js +21 -23
- package/test/spec/modules/visxBidAdapter_spec.js +180 -0
- package/test/spec/modules/yahooAdsBidAdapter_spec.js +1 -1
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +11 -0
- package/test/spec/unit/pbjs_api_spec.js +6 -1
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
import {deepSetValue, isEmpty, isNumber, isPlainObject, isStr, logError, logInfo, logWarn} from '../src/utils.js';
|
|
8
8
|
import {config} from '../src/config.js';
|
|
9
9
|
import {gppDataHandler} from '../src/adapterManager.js';
|
|
10
|
-
import {timedAuctionHook} from '../src/utils/perfMetrics.js';
|
|
11
10
|
import {enrichFPD} from '../src/fpd/enrichment.js';
|
|
12
11
|
import {getGlobal} from '../src/prebidGlobal.js';
|
|
13
12
|
import {cmpClient, MODE_CALLBACK} from '../libraries/cmp/cmpClient.js';
|
|
14
13
|
import {GreedyPromise} from '../src/utils/promise.js';
|
|
15
14
|
import {buildActivityParams} from '../src/activities/params.js';
|
|
15
|
+
import {consentManagementHook} from '../libraries/consentManagement/cmUtils.js';
|
|
16
16
|
|
|
17
17
|
const DEFAULT_CMP = 'iab';
|
|
18
18
|
const DEFAULT_CONSENT_TIMEOUT = 10000;
|
|
@@ -228,20 +228,6 @@ function loadConsentData(cb) {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
/**
|
|
232
|
-
* Like `loadConsentData`, but cache and re-use previously loaded data.
|
|
233
|
-
* @param cb
|
|
234
|
-
*/
|
|
235
|
-
function loadIfMissing(cb) {
|
|
236
|
-
if (consentData) {
|
|
237
|
-
logInfo('User consent information already known. Pulling internally stored information...');
|
|
238
|
-
// eslint-disable-next-line standard/no-callback-literal
|
|
239
|
-
cb(false);
|
|
240
|
-
} else {
|
|
241
|
-
loadConsentData(cb);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
231
|
/**
|
|
246
232
|
* If consentManagement module is enabled (ie included in setConfig), this hook function will attempt to fetch the
|
|
247
233
|
* user's encoded consent string from the supported CMP. Once obtained, the module will store this
|
|
@@ -250,29 +236,7 @@ function loadIfMissing(cb) {
|
|
|
250
236
|
* @param {object} reqBidsConfigObj required; This is the same param that's used in pbjs.requestBids.
|
|
251
237
|
* @param {function} fn required; The next function in the chain, used by hook.js
|
|
252
238
|
*/
|
|
253
|
-
export const requestBidsHook =
|
|
254
|
-
loadIfMissing(function (shouldCancelAuction, errMsg, ...extraArgs) {
|
|
255
|
-
if (errMsg) {
|
|
256
|
-
let log = logWarn;
|
|
257
|
-
if (shouldCancelAuction) {
|
|
258
|
-
log = logError;
|
|
259
|
-
errMsg = `${errMsg} Canceling auction as per consentManagement config.`;
|
|
260
|
-
}
|
|
261
|
-
log(errMsg, ...extraArgs);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (shouldCancelAuction) {
|
|
265
|
-
fn.stopTiming();
|
|
266
|
-
if (typeof reqBidsConfigObj.bidsBackHandler === 'function') {
|
|
267
|
-
reqBidsConfigObj.bidsBackHandler();
|
|
268
|
-
} else {
|
|
269
|
-
logError('Error executing bidsBackHandler');
|
|
270
|
-
}
|
|
271
|
-
} else {
|
|
272
|
-
fn.call(this, reqBidsConfigObj);
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
});
|
|
239
|
+
export const requestBidsHook = consentManagementHook('gpp', () => consentData, loadConsentData);
|
|
276
240
|
|
|
277
241
|
function processCmpData(consentData) {
|
|
278
242
|
if (
|
|
@@ -8,11 +8,11 @@ import {deepSetValue, isNumber, isPlainObject, isStr, logError, logInfo, logWarn
|
|
|
8
8
|
import {config} from '../src/config.js';
|
|
9
9
|
import {gdprDataHandler} from '../src/adapterManager.js';
|
|
10
10
|
import {includes} from '../src/polyfill.js';
|
|
11
|
-
import {timedAuctionHook} from '../src/utils/perfMetrics.js';
|
|
12
11
|
import {registerOrtbProcessor, REQUEST} from '../src/pbjsORTB.js';
|
|
13
12
|
import {enrichFPD} from '../src/fpd/enrichment.js';
|
|
14
13
|
import {getGlobal} from '../src/prebidGlobal.js';
|
|
15
14
|
import {cmpClient} from '../libraries/cmp/cmpClient.js';
|
|
15
|
+
import {consentManagementHook} from '../libraries/consentManagement/cmUtils.js';
|
|
16
16
|
|
|
17
17
|
const DEFAULT_CMP = 'iab';
|
|
18
18
|
const DEFAULT_CONSENT_TIMEOUT = 10000;
|
|
@@ -22,6 +22,7 @@ export let userCMP;
|
|
|
22
22
|
export let consentTimeout;
|
|
23
23
|
export let gdprScope;
|
|
24
24
|
export let staticConsentData;
|
|
25
|
+
let dsaPlatform = false;
|
|
25
26
|
let actionTimeout;
|
|
26
27
|
|
|
27
28
|
let consentData;
|
|
@@ -156,20 +157,6 @@ function loadConsentData(cb) {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
/**
|
|
160
|
-
* Like `loadConsentData`, but cache and re-use previously loaded data.
|
|
161
|
-
* @param cb
|
|
162
|
-
*/
|
|
163
|
-
function loadIfMissing(cb) {
|
|
164
|
-
if (consentData) {
|
|
165
|
-
logInfo('User consent information already known. Pulling internally stored information...');
|
|
166
|
-
// eslint-disable-next-line standard/no-callback-literal
|
|
167
|
-
cb(false);
|
|
168
|
-
} else {
|
|
169
|
-
loadConsentData(cb);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
160
|
/**
|
|
174
161
|
* If consentManagement module is enabled (ie included in setConfig), this hook function will attempt to fetch the
|
|
175
162
|
* user's encoded consent string from the supported CMP. Once obtained, the module will store this
|
|
@@ -178,29 +165,7 @@ function loadIfMissing(cb) {
|
|
|
178
165
|
* @param {object} reqBidsConfigObj required; This is the same param that's used in pbjs.requestBids.
|
|
179
166
|
* @param {function} fn required; The next function in the chain, used by hook.js
|
|
180
167
|
*/
|
|
181
|
-
export const requestBidsHook =
|
|
182
|
-
loadIfMissing(function (shouldCancelAuction, errMsg, ...extraArgs) {
|
|
183
|
-
if (errMsg) {
|
|
184
|
-
let log = logWarn;
|
|
185
|
-
if (shouldCancelAuction) {
|
|
186
|
-
log = logError;
|
|
187
|
-
errMsg = `${errMsg} Canceling auction as per consentManagement config.`;
|
|
188
|
-
}
|
|
189
|
-
log(errMsg, ...extraArgs);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (shouldCancelAuction) {
|
|
193
|
-
fn.stopTiming();
|
|
194
|
-
if (typeof reqBidsConfigObj.bidsBackHandler === 'function') {
|
|
195
|
-
reqBidsConfigObj.bidsBackHandler();
|
|
196
|
-
} else {
|
|
197
|
-
logError('Error executing bidsBackHandler');
|
|
198
|
-
}
|
|
199
|
-
} else {
|
|
200
|
-
fn.call(this, reqBidsConfigObj);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
});
|
|
168
|
+
export const requestBidsHook = consentManagementHook('gdpr', () => consentData, loadConsentData);
|
|
204
169
|
|
|
205
170
|
/**
|
|
206
171
|
* This function checks the consent data provided by CMP to ensure it's in an expected state.
|
|
@@ -282,6 +247,7 @@ export function setConsentConfig(config) {
|
|
|
282
247
|
|
|
283
248
|
// if true, then gdprApplies should be set to true
|
|
284
249
|
gdprScope = config.defaultGdprScope === true;
|
|
250
|
+
dsaPlatform = !!config.dsaPlatform;
|
|
285
251
|
|
|
286
252
|
logInfo('consentManagement module has been activated...');
|
|
287
253
|
|
|
@@ -315,6 +281,9 @@ export function enrichFPDHook(next, fpd) {
|
|
|
315
281
|
}
|
|
316
282
|
deepSetValue(ortb2, 'user.ext.consent', consent.consentString);
|
|
317
283
|
}
|
|
284
|
+
if (dsaPlatform) {
|
|
285
|
+
deepSetValue(ortb2, 'regs.ext.dsa.dsarequired', 3);
|
|
286
|
+
}
|
|
318
287
|
return ortb2;
|
|
319
288
|
}));
|
|
320
289
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {ajax} from '../src/ajax.js';
|
|
2
2
|
import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
|
|
3
3
|
import { EVENTS } from '../src/constants.js';
|
|
4
|
-
import {getGlobal} from '../src/prebidGlobal.js';
|
|
5
4
|
import adapterManager from '../src/adapterManager.js';
|
|
6
5
|
import {logInfo, logWarn, logError, logMessage, deepAccess, isInteger} from '../src/utils.js';
|
|
7
6
|
import {getRefererInfo} from '../src/refererDetection.js';
|
|
@@ -515,7 +514,7 @@ cnvrHelper.createPayload = function(payloadType, auctionId, timestamp) {
|
|
|
515
514
|
cnvrSampleRate: initOptions.cnvr_sample_rate,
|
|
516
515
|
auction: {
|
|
517
516
|
auctionId: auctionId,
|
|
518
|
-
preBidVersion:
|
|
517
|
+
preBidVersion: '$prebid.version$',
|
|
519
518
|
sid: initOptions.site_id,
|
|
520
519
|
auctionTimestamp: timestamp
|
|
521
520
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
3
|
+
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';
|
|
4
|
+
|
|
5
|
+
const BIDDER_CODE = 'copper6ssp';
|
|
6
|
+
const AD_URL = 'https://endpoint.copper6.com/pbjs';
|
|
7
|
+
const SYNC_URL = 'https://сsync.copper6.com';
|
|
8
|
+
|
|
9
|
+
export const spec = {
|
|
10
|
+
code: BIDDER_CODE,
|
|
11
|
+
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
|
|
12
|
+
|
|
13
|
+
isBidRequestValid: isBidRequestValid(),
|
|
14
|
+
buildRequests: buildRequests(AD_URL),
|
|
15
|
+
interpretResponse,
|
|
16
|
+
getUserSyncs: getUserSyncs(SYNC_URL)
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: Copper6SSP Bidder Adapter
|
|
5
|
+
Module Type: Copper6SSP Bidder Adapter
|
|
6
|
+
Maintainer: info@copper6.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Connects to Copper6SSP exchange for bids.
|
|
12
|
+
Copper6SSP bid adapter supports Banner, Video (instream and outstream) and Native.
|
|
13
|
+
|
|
14
|
+
# Test Parameters
|
|
15
|
+
```
|
|
16
|
+
var adUnits = [
|
|
17
|
+
// Will return static test banner
|
|
18
|
+
{
|
|
19
|
+
code: 'adunit1',
|
|
20
|
+
mediaTypes: {
|
|
21
|
+
banner: {
|
|
22
|
+
sizes: [ [300, 250], [320, 50] ],
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
bids: [
|
|
26
|
+
{
|
|
27
|
+
bidder: 'copper6ssp',
|
|
28
|
+
params: {
|
|
29
|
+
placementId: 'testBanner',
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
code: 'addunit2',
|
|
36
|
+
mediaTypes: {
|
|
37
|
+
video: {
|
|
38
|
+
playerSize: [ [640, 480] ],
|
|
39
|
+
context: 'instream',
|
|
40
|
+
minduration: 5,
|
|
41
|
+
maxduration: 60,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
bids: [
|
|
45
|
+
{
|
|
46
|
+
bidder: 'copper6ssp',
|
|
47
|
+
params: {
|
|
48
|
+
placementId: 'testVideo',
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
code: 'addunit3',
|
|
55
|
+
mediaTypes: {
|
|
56
|
+
native: {
|
|
57
|
+
title: {
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
body: {
|
|
61
|
+
required: true
|
|
62
|
+
},
|
|
63
|
+
icon: {
|
|
64
|
+
required: true,
|
|
65
|
+
size: [64, 64]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
bids: [
|
|
70
|
+
{
|
|
71
|
+
bidder: 'copper6ssp',
|
|
72
|
+
params: {
|
|
73
|
+
placementId: 'testNative',
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as utils from '../src/utils.js';
|
|
2
|
-
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
|
-
import {
|
|
4
|
-
import {config} from '../src/config.js';
|
|
5
|
-
import {
|
|
2
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
|
+
import { VIDEO, BANNER } from '../src/mediaTypes.js';
|
|
4
|
+
import { config } from '../src/config.js';
|
|
5
|
+
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
|
|
6
6
|
|
|
7
7
|
const BIDDER_CODE = 'cpmstar';
|
|
8
8
|
|
|
@@ -12,15 +12,18 @@ const ENDPOINT_PRODUCTION = 'https://server.cpmstar.com/view.aspx';
|
|
|
12
12
|
|
|
13
13
|
const DEFAULT_TTL = 300;
|
|
14
14
|
const DEFAULT_CURRENCY = 'USD';
|
|
15
|
+
const DEFAULT_NET_REVENUE = true;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
17
|
+
export const converter = ortbConverter({
|
|
18
|
+
context: {
|
|
19
|
+
ttl: DEFAULT_TTL,
|
|
20
|
+
netRevenue: DEFAULT_NET_REVENUE
|
|
21
|
+
}
|
|
22
|
+
});
|
|
21
23
|
|
|
22
24
|
export const spec = {
|
|
23
25
|
code: BIDDER_CODE,
|
|
26
|
+
gvlid: 1317,
|
|
24
27
|
supportedMediaTypes: [BANNER, VIDEO],
|
|
25
28
|
pageID: Math.floor(Math.random() * 10e6),
|
|
26
29
|
|
|
@@ -43,22 +46,30 @@ export const spec = {
|
|
|
43
46
|
|
|
44
47
|
buildRequests: function (validBidRequests, bidderRequest) {
|
|
45
48
|
var requests = [];
|
|
46
|
-
// This reference to window.top can cause issues when loaded in an iframe if not protected with a try/catch.
|
|
47
49
|
|
|
48
50
|
for (var i = 0; i < validBidRequests.length; i++) {
|
|
49
51
|
var bidRequest = validBidRequests[i];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
'
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
const referer = bidderRequest.refererInfo.page ? bidderRequest.refererInfo.page : bidderRequest.refererInfo.domain;
|
|
53
|
+
const e = utils.getBidIdParameter('endpoint', bidRequest.params);
|
|
54
|
+
const ENDPOINT = e == 'dev' ? ENDPOINT_DEV : e == 'staging' ? ENDPOINT_STAGING : ENDPOINT_PRODUCTION;
|
|
55
|
+
const url = new URL(ENDPOINT);
|
|
56
|
+
const body = {};
|
|
57
|
+
const mediaType = spec.getMediaType(bidRequest);
|
|
58
|
+
const playerSize = spec.getPlayerSize(bidRequest);
|
|
59
|
+
url.searchParams.set('media', mediaType);
|
|
60
|
+
if (mediaType == VIDEO) {
|
|
61
|
+
url.searchParams.set('fv', 0);
|
|
62
|
+
if (playerSize) {
|
|
63
|
+
url.searchParams.set('w', playerSize?.[0]);
|
|
64
|
+
url.searchParams.set('h', playerSize?.[1]);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
url.searchParams.set('json', 'c_b');
|
|
68
|
+
url.searchParams.set('mv', 1);
|
|
69
|
+
url.searchParams.set('poolid', utils.getBidIdParameter('placementId', bidRequest.params));
|
|
70
|
+
url.searchParams.set('reachedTop', bidderRequest.refererInfo.reachedTop);
|
|
71
|
+
url.searchParams.set('requestid', bidRequest.bidId);
|
|
72
|
+
url.searchParams.set('referer', referer);
|
|
62
73
|
|
|
63
74
|
if (bidRequest.schain && bidRequest.schain.nodes) {
|
|
64
75
|
var schain = bidRequest.schain;
|
|
@@ -67,45 +78,49 @@ export const spec = {
|
|
|
67
78
|
for (var i2 = 0; i2 < schain.nodes.length; i2++) {
|
|
68
79
|
var node = schain.nodes[i2];
|
|
69
80
|
schainString += '!' +
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
(node.asi || '') + ',' +
|
|
82
|
+
(node.sid || '') + ',' +
|
|
83
|
+
(node.hp || '') + ',' +
|
|
84
|
+
(node.rid || '') + ',' +
|
|
85
|
+
(node.name || '') + ',' +
|
|
86
|
+
(node.domain || '');
|
|
76
87
|
}
|
|
77
|
-
url
|
|
88
|
+
url.searchParams.set('schain', schainString);
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
if (bidderRequest.gdprConsent) {
|
|
81
92
|
if (bidderRequest.gdprConsent.consentString != null) {
|
|
82
|
-
url
|
|
93
|
+
url.searchParams.set('gdpr_consent', bidderRequest.gdprConsent.consentString);
|
|
83
94
|
}
|
|
84
95
|
if (bidderRequest.gdprConsent.gdprApplies != null) {
|
|
85
|
-
url
|
|
96
|
+
url.searchParams.set('gdpr', (bidderRequest.gdprConsent.gdprApplies ? 1 : 0));
|
|
86
97
|
}
|
|
87
98
|
}
|
|
88
99
|
|
|
89
100
|
if (bidderRequest.uspConsent != null) {
|
|
90
|
-
url
|
|
101
|
+
url.searchParams.set('us_privacy', bidderRequest.uspConsent);
|
|
91
102
|
}
|
|
92
103
|
|
|
93
104
|
if (config.getConfig('coppa')) {
|
|
94
|
-
url
|
|
105
|
+
url.searchParams.set('tfcd', (config.getConfig('coppa') ? 1 : 0));
|
|
95
106
|
}
|
|
96
107
|
|
|
97
|
-
let body = {};
|
|
98
108
|
let adUnitCode = bidRequest.adUnitCode;
|
|
99
109
|
if (adUnitCode) {
|
|
100
110
|
body.adUnitCode = adUnitCode;
|
|
101
111
|
}
|
|
102
112
|
if (mediaType == VIDEO) {
|
|
103
113
|
body.video = utils.deepAccess(bidRequest, 'mediaTypes.video');
|
|
114
|
+
} else if (mediaType == BANNER) {
|
|
115
|
+
body.banner = utils.deepAccess(bidRequest, 'mediaTypes.banner');
|
|
104
116
|
}
|
|
105
117
|
|
|
118
|
+
const ortb = converter.toORTB({ bidderRequest, bidRequests: [bidRequest] });
|
|
119
|
+
Object.assign(body, ortb);
|
|
120
|
+
|
|
106
121
|
requests.push({
|
|
107
122
|
method: 'POST',
|
|
108
|
-
url: url,
|
|
123
|
+
url: url.toString(),
|
|
109
124
|
bidRequest: bidRequest,
|
|
110
125
|
data: body
|
|
111
126
|
});
|
|
@@ -144,7 +159,7 @@ export const spec = {
|
|
|
144
159
|
width: rawBid.width || 0,
|
|
145
160
|
height: rawBid.height || 0,
|
|
146
161
|
currency: rawBid.currency ? rawBid.currency : DEFAULT_CURRENCY,
|
|
147
|
-
netRevenue: rawBid.netRevenue ? rawBid.netRevenue :
|
|
162
|
+
netRevenue: rawBid.netRevenue ? rawBid.netRevenue : DEFAULT_NET_REVENUE,
|
|
148
163
|
ttl: rawBid.ttl ? rawBid.ttl : DEFAULT_TTL,
|
|
149
164
|
creativeId: rawBid.creativeid || 0,
|
|
150
165
|
meta: {
|
|
@@ -191,4 +206,5 @@ export const spec = {
|
|
|
191
206
|
}
|
|
192
207
|
|
|
193
208
|
};
|
|
209
|
+
|
|
194
210
|
registerBidder(spec);
|
|
@@ -540,9 +540,16 @@ function hasValidVideoMediaType(bidRequest) {
|
|
|
540
540
|
var requiredMediaTypesParams = ['mimes', 'playerSize', 'maxduration', 'protocols', 'api', 'skip', 'placement', 'playbackmethod'];
|
|
541
541
|
|
|
542
542
|
requiredMediaTypesParams.forEach(function (param) {
|
|
543
|
-
if (
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
if (param === 'placement') {
|
|
544
|
+
if (deepAccess(bidRequest, 'mediaTypes.video.' + param) === undefined && deepAccess(bidRequest, 'params.video.' + param) === undefined && deepAccess(bidRequest, 'mediaTypes.video.plcmt') === undefined && deepAccess(bidRequest, 'params.video.plcmt') === undefined) {
|
|
545
|
+
isValid = false;
|
|
546
|
+
logError('Criteo Bid Adapter: mediaTypes.video.' + param + ' or mediaTypes.video.plcmt is required');
|
|
547
|
+
}
|
|
548
|
+
} else {
|
|
549
|
+
if (deepAccess(bidRequest, 'mediaTypes.video.' + param) === undefined && deepAccess(bidRequest, 'params.video.' + param) === undefined) {
|
|
550
|
+
isValid = false;
|
|
551
|
+
logError('Criteo Bid Adapter: mediaTypes.video.' + param + ' is required');
|
|
552
|
+
}
|
|
546
553
|
}
|
|
547
554
|
});
|
|
548
555
|
|
|
@@ -224,7 +224,7 @@ export const spec = {
|
|
|
224
224
|
const pixelSyncs = [];
|
|
225
225
|
|
|
226
226
|
serverResponses.forEach((response) => {
|
|
227
|
-
(response
|
|
227
|
+
(response?.body?.userSyncs || []).forEach((syncUrl) => {
|
|
228
228
|
if (syncUrl.type === 'image') {
|
|
229
229
|
pixelSyncs.push({ url: syncUrl.url, type: 'image' });
|
|
230
230
|
}
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
isFn,
|
|
9
9
|
isNumber,
|
|
10
10
|
logError,
|
|
11
|
-
logWarn
|
|
11
|
+
logWarn,
|
|
12
|
+
setOnAny
|
|
12
13
|
} from '../src/utils.js';
|
|
13
14
|
import {config} from '../src/config.js';
|
|
14
15
|
|
|
@@ -234,16 +235,6 @@ export function getBidFloor(bid, mediaType, size, currency) {
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
|
|
237
|
-
/** -- Helper methods -- */
|
|
238
|
-
function setOnAny(collection, key) {
|
|
239
|
-
for (let i = 0, result; i < collection.length; i++) {
|
|
240
|
-
result = deepAccess(collection[i], key);
|
|
241
|
-
if (result) {
|
|
242
|
-
return result;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
238
|
/** -- Register -- */
|
|
248
239
|
export const spec = {
|
|
249
240
|
code: BIDDER_CODE,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
parseSizesInput,
|
|
11
11
|
deepSetValue,
|
|
12
12
|
formatQS,
|
|
13
|
+
setOnAny
|
|
13
14
|
} from '../src/utils.js';
|
|
14
15
|
import { config } from '../src/config.js';
|
|
15
16
|
import { Renderer } from '../src/Renderer.js';
|
|
@@ -355,15 +356,6 @@ function parseNative(bid) {
|
|
|
355
356
|
return result;
|
|
356
357
|
}
|
|
357
358
|
|
|
358
|
-
function setOnAny(collection, key) {
|
|
359
|
-
for (let i = 0, result; i < collection.length; i++) {
|
|
360
|
-
result = deepAccess(collection[i], key);
|
|
361
|
-
if (result) {
|
|
362
|
-
return result;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
359
|
function flatten(arr) {
|
|
368
360
|
return [].concat(...arr);
|
|
369
361
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
5
5
|
import {NATIVE} from '../src/mediaTypes.js';
|
|
6
|
-
import {_map,
|
|
6
|
+
import {_map, deepSetValue, isEmpty, setOnAny} from '../src/utils.js';
|
|
7
7
|
import {config} from '../src/config.js';
|
|
8
8
|
import {convertOrtbRequestToProprietaryNative} from '../src/native.js';
|
|
9
9
|
|
|
@@ -224,15 +224,6 @@ function parseNative(bid) {
|
|
|
224
224
|
return result;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function setOnAny(collection, key) {
|
|
228
|
-
for (let i = 0, result; i < collection.length; i++) {
|
|
229
|
-
result = deepAccess(collection[i], key);
|
|
230
|
-
if (result) {
|
|
231
|
-
return result;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
227
|
function flatten(arr) {
|
|
237
228
|
return [].concat(...arr);
|
|
238
229
|
}
|
|
@@ -15,6 +15,7 @@ import { Renderer } from '../src/Renderer.js';
|
|
|
15
15
|
import { VIDEO, BANNER } from '../src/mediaTypes.js';
|
|
16
16
|
import { config } from '../src/config.js';
|
|
17
17
|
import { getStorageManager } from '../src/storageManager.js';
|
|
18
|
+
import { getBidFromResponse } from '../libraries/processResponse/index.js';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
|
|
@@ -441,7 +442,7 @@ export const spec = {
|
|
|
441
442
|
|
|
442
443
|
if (!errorMessage && serverResponse.seatbid) {
|
|
443
444
|
serverResponse.seatbid.forEach(respItem => {
|
|
444
|
-
_addBidResponse(
|
|
445
|
+
_addBidResponse(getBidFromResponse(respItem, LOG_ERROR_MESS), bidRequest, bidResponses, RendererConst, bidderCode);
|
|
445
446
|
});
|
|
446
447
|
}
|
|
447
448
|
if (errorMessage) logError(errorMessage);
|
|
@@ -512,17 +513,6 @@ function _getFloor (mediaTypes, bid) {
|
|
|
512
513
|
return floor;
|
|
513
514
|
}
|
|
514
515
|
|
|
515
|
-
function _getBidFromResponse(respItem) {
|
|
516
|
-
if (!respItem) {
|
|
517
|
-
logError(LOG_ERROR_MESS.emptySeatbid);
|
|
518
|
-
} else if (!respItem.bid) {
|
|
519
|
-
logError(LOG_ERROR_MESS.hasNoArrayOfBids + JSON.stringify(respItem));
|
|
520
|
-
} else if (!respItem.bid[0]) {
|
|
521
|
-
logError(LOG_ERROR_MESS.noBid);
|
|
522
|
-
}
|
|
523
|
-
return respItem && respItem.bid && respItem.bid[0];
|
|
524
|
-
}
|
|
525
|
-
|
|
526
516
|
function _addBidResponse(serverBid, bidRequest, bidResponses, RendererConst, bidderCode) {
|
|
527
517
|
if (!serverBid) return;
|
|
528
518
|
let errorMessage;
|
|
@@ -4,7 +4,6 @@ import adapterManager from '../src/adapterManager.js';
|
|
|
4
4
|
import { ajax } from '../src/ajax.js';
|
|
5
5
|
import { logInfo, logError } from '../src/utils.js';
|
|
6
6
|
import * as events from '../src/events.js';
|
|
7
|
-
import {getGlobal} from '../src/prebidGlobal.js';
|
|
8
7
|
|
|
9
8
|
const {
|
|
10
9
|
AUCTION_END,
|
|
@@ -33,7 +32,7 @@ const FLUSH_EVENTS = [
|
|
|
33
32
|
|
|
34
33
|
const CONFIG_URL_PREFIX = 'https://api.id5-sync.com/analytics'
|
|
35
34
|
const TZ = new Date().getTimezoneOffset();
|
|
36
|
-
const PBJS_VERSION =
|
|
35
|
+
const PBJS_VERSION = 'v' + '$prebid.version$';
|
|
37
36
|
const ID5_REDACTED = '__ID5_REDACTED__';
|
|
38
37
|
const isArray = Array.isArray;
|
|
39
38
|
|