prebid.js 7.18.0 → 7.20.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/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adqueryIdSystem.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aolBidAdapter.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/{andBeyondMediaBidAdapter.js → beyondmediaBidAdapter.js} +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -0
- 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/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dchain.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dependencies.json +9 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dianomiBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/enrichmentFpdModule.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fpd.js +1 -0
- package/dist/ftrackIdSystem.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/googleAnalyticsAdapter.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/hadronAnalyticsAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kinessoIdSystem.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentAnalyticsAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -0
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mass.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +198 -194
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/optimonAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pianoDmpAnalyticsAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubperfAnalyticsAdapter.js +1 -1
- package/dist/pubstackAnalyticsAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pulsepointAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/quantcastIdSystem.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/s2sTesting.js +1 -1
- package/dist/scaleableAnalyticsAdapter.js +1 -1
- package/dist/schain.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/sigmoidAnalyticsAdapter.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/sonobiAnalyticsAdapter.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/staqAnalyticsAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tapadIdSystem.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -0
- package/dist/terceptAnalyticsAdapter.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/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.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_sspAnalyticsAdapter.js +1 -1
- package/libraries/fpd/sua.js +98 -0
- package/modules/.submodules.json +1 -0
- package/modules/adfBidAdapter.js +1 -1
- package/modules/adkernelAdnBidAdapter.js +1 -0
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/adqueryIdSystem.js +8 -8
- package/modules/adxcgBidAdapter.js +1 -1
- package/modules/amxBidAdapter.js +1 -1
- package/modules/aolBidAdapter.js +25 -2
- package/modules/appnexusBidAdapter.js +19 -2
- package/modules/{andBeyondMediaBidAdapter.js → beyondmediaBidAdapter.js} +0 -0
- package/modules/{andBeyondMediaBidAdapter.md → beyondmediaBidAdapter.md} +1 -1
- package/modules/categoryTranslation.js +4 -4
- package/modules/cleanioRtdProvider.js +3 -4
- package/modules/colossussspBidAdapter.js +2 -1
- package/modules/connectIdSystem.js +16 -1
- package/modules/conversantAnalyticsAdapter.js +560 -0
- package/modules/conversantAnalyticsAdapter.md +47 -0
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/currency.js +11 -11
- package/modules/dchain.js +2 -2
- package/modules/debugging/bidInterceptor.js +2 -2
- package/modules/debugging/debugging.js +10 -2
- package/modules/debugging/legacy.js +2 -2
- package/modules/dgkeywordRtdProvider.js +21 -3
- package/modules/dianomiBidAdapter.js +1 -1
- package/modules/enrichmentFpdModule.js +33 -14
- package/modules/eplanningBidAdapter.js +48 -2
- package/modules/finativeBidAdapter.js +1 -1
- package/modules/gridBidAdapter.js +187 -117
- package/modules/improvedigitalBidAdapter.js +2 -2
- package/modules/ixBidAdapter.js +94 -23
- package/modules/liveIntentIdSystem.js +39 -5
- package/modules/lotamePanoramaIdSystem.js +10 -6
- package/modules/magniteAnalyticsAdapter.js +902 -0
- package/modules/magniteAnalyticsAdapter.md +18 -0
- package/modules/mass.js +2 -2
- package/modules/mediakeysBidAdapter.js +6 -1
- package/modules/mediakeysBidAdapter.md +50 -40
- package/modules/multibid/index.js +5 -5
- package/modules/nativoBidAdapter.js +1 -1
- package/modules/pixfutureBidAdapter.js +46 -15
- package/modules/prebidServerBidAdapter/index.js +54 -19
- package/modules/priceFloors.js +8 -22
- package/modules/readpeakBidAdapter.js +1 -1
- package/modules/rubiconAnalyticsAdapter.js +14 -9
- package/modules/rubiconBidAdapter.js +2 -3
- package/modules/seedingAllianceBidAdapter.js +1 -1
- package/modules/sharethroughBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.js +5 -5
- package/modules/talkadsBidAdapter.js +1 -0
- package/modules/teadsIdSystem.js +234 -0
- package/modules/teadsIdSystem.md +22 -0
- package/modules/truereachBidAdapter.js +1 -0
- package/modules/ttdBidAdapter.js +1 -1
- package/modules/userId/index.js +21 -14
- package/modules/vrtcalBidAdapter.js +7 -1
- package/modules/vuukleBidAdapter.js +34 -3
- package/modules/yahoosspBidAdapter.js +4 -2
- package/modules/yandexBidAdapter.js +31 -8
- package/package.json +2 -2
- package/src/adapterManager.js +2 -4
- package/src/adapters/bidderFactory.js +13 -11
- package/src/auction.js +140 -69
- package/src/constants.json +8 -0
- package/src/cpmBucketManager.js +22 -3
- package/src/native.js +1 -5
- package/src/prebid.js +5 -6
- package/src/targeting.js +31 -14
- package/test/fixtures/fixtures.js +2 -1
- package/test/spec/auctionmanager_spec.js +109 -21
- package/test/spec/cpmBucketManager_spec.js +239 -177
- package/test/spec/fpd/sua_spec.js +244 -0
- package/test/spec/modules/adfBidAdapter_spec.js +2 -3
- package/test/spec/modules/adqueryIdSystem_spec.js +0 -2
- package/test/spec/modules/adxcgBidAdapter_spec.js +2 -3
- package/test/spec/modules/amxBidAdapter_spec.js +3 -2
- package/test/spec/modules/aolBidAdapter_spec.js +42 -9
- package/test/spec/modules/appnexusBidAdapter_spec.js +24 -0
- package/test/spec/modules/{andBeyondMediaBidAdapter_spec.js → beyondmediaBidAdapter_spec.js} +1 -1
- package/test/spec/modules/colossussspBidAdapter_spec.js +4 -2
- package/test/spec/modules/connectIdSystem_spec.js +20 -0
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +963 -0
- package/test/spec/modules/currency_spec.js +14 -6
- package/test/spec/modules/debugging_mod_spec.js +9 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +83 -1
- package/test/spec/modules/dianomiBidAdapter_spec.js +2 -3
- package/test/spec/modules/enrichmentFpdModule_spec.js +50 -7
- package/test/spec/modules/eplanningBidAdapter_spec.js +285 -1
- package/test/spec/modules/fpdModule_spec.js +9 -0
- package/test/spec/modules/gridBidAdapter_spec.js +87 -31
- package/test/spec/modules/ixBidAdapter_spec.js +221 -2
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +62 -8
- package/test/spec/modules/liveIntentIdSystem_spec.js +62 -8
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +0 -1
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +1942 -0
- package/test/spec/modules/mediakeysBidAdapter_spec.js +20 -3
- package/test/spec/modules/nativoBidAdapter_spec.js +13 -2
- package/test/spec/modules/prebidServerBidAdapter_spec.js +202 -15
- package/test/spec/modules/priceFloors_spec.js +5 -5
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +2 -3
- package/test/spec/modules/seedtagBidAdapter_spec.js +15 -18
- package/test/spec/modules/sharethroughBidAdapter_spec.js +2 -1
- package/test/spec/modules/taboolaBidAdapter_spec.js +112 -13
- package/test/spec/modules/teadsIdSystem_spec.js +271 -0
- package/test/spec/modules/ttdBidAdapter_spec.js +3 -3
- package/test/spec/modules/userId_spec.js +39 -4
- package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -1
- package/test/spec/modules/vuukleBidAdapter_spec.js +87 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +48 -1
- package/test/spec/modules/yandexBidAdapter_spec.js +8 -5
- package/test/spec/native_spec.js +5 -0
- package/test/spec/unit/core/bidderFactory_spec.js +66 -11
- package/test/spec/unit/core/targeting_spec.js +28 -9
- package/test/spec/unit/pbjs_api_spec.js +48 -2
|
@@ -147,7 +147,7 @@ export const spec = {
|
|
|
147
147
|
return [];
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
return
|
|
150
|
+
return bidResponses.map((bidResponse) => getBid(bids, currency, bidResponse)).filter(Boolean);
|
|
151
151
|
},
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -204,7 +204,7 @@ function getBidResponses({body}) {
|
|
|
204
204
|
|
|
205
205
|
const {seatbid, cur} = body;
|
|
206
206
|
|
|
207
|
-
if (!seatbid.length || !seatbid[0].bid) {
|
|
207
|
+
if (!seatbid.length || !seatbid[0].bid || !seatbid[0].bid.length) {
|
|
208
208
|
return [];
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -214,14 +214,14 @@ function getBidResponses({body}) {
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function getBid(
|
|
217
|
+
function getBid(bids, currency, bidResponse) {
|
|
218
218
|
if (!bidResponse) {
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
const {
|
|
222
222
|
price: cpm, crid: creativeId, adm: ad, w: width, h: height, exp: ttl, adomain: advertiserDomains, meta = {}
|
|
223
223
|
} = bidResponse;
|
|
224
|
-
|
|
224
|
+
let requestId = bids[bidResponse.impid - 1].bidId;
|
|
225
225
|
if (advertiserDomains && advertiserDomains.length > 0) {
|
|
226
226
|
meta.advertiserDomains = advertiserDomains
|
|
227
227
|
}
|
|
@@ -237,7 +237,7 @@ function getBid(requestId, currency, bidResponse) {
|
|
|
237
237
|
width,
|
|
238
238
|
height,
|
|
239
239
|
meta,
|
|
240
|
-
netRevenue:
|
|
240
|
+
netRevenue: true
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -63,6 +63,7 @@ export const spec = {
|
|
|
63
63
|
cur: CURRENCY,
|
|
64
64
|
timeout: poBidderRequest.timeout,
|
|
65
65
|
auction_id: paValidBidRequests[0].auctionId,
|
|
66
|
+
// TODO: should this use auctionId? see #8573
|
|
66
67
|
transaction_id: paValidBidRequests[0].transactionId,
|
|
67
68
|
bids: laBids,
|
|
68
69
|
gdpr: { applies: false, consent: false },
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module adds TeadsId to the User ID module
|
|
3
|
+
* The {@link module:modules/userId} module is required
|
|
4
|
+
* @module modules/teadsIdSystem
|
|
5
|
+
* @requires module:modules/userId
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {isStr, isNumber, logError, logInfo, isEmpty, timestamp} from '../src/utils.js'
|
|
9
|
+
import {ajax} from '../src/ajax.js';
|
|
10
|
+
import {submodule} from '../src/hook.js';
|
|
11
|
+
import {getStorageManager} from '../src/storageManager.js';
|
|
12
|
+
import {uspDataHandler} from '../src/adapterManager.js';
|
|
13
|
+
|
|
14
|
+
const MODULE_NAME = 'teadsId';
|
|
15
|
+
const GVL_ID = 132;
|
|
16
|
+
const FP_TEADS_ID_COOKIE_NAME = '_tfpvi';
|
|
17
|
+
const EXPIRED_COOKIE_DATE = 'Thu, 01 Jan 1970 00:00:01 GMT';
|
|
18
|
+
|
|
19
|
+
export const gdprStatus = {
|
|
20
|
+
GDPR_DOESNT_APPLY: 0,
|
|
21
|
+
CMP_NOT_FOUND_OR_ERROR: 22,
|
|
22
|
+
GDPR_APPLIES_PUBLISHER: 12,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const gdprReason = {
|
|
26
|
+
GDPR_DOESNT_APPLY: 0,
|
|
27
|
+
CMP_NOT_FOUND: 220,
|
|
28
|
+
GDPR_APPLIES_PUBLISHER_CLASSIC: 120,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const storage = getStorageManager({gvlid: GVL_ID, moduleName: MODULE_NAME});
|
|
32
|
+
|
|
33
|
+
/** @type {Submodule} */
|
|
34
|
+
export const teadsIdSubmodule = {
|
|
35
|
+
/**
|
|
36
|
+
* used to link submodule with config
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
name: MODULE_NAME,
|
|
40
|
+
/**
|
|
41
|
+
* decode the stored id value for passing to bid requests
|
|
42
|
+
* @function
|
|
43
|
+
* @param {string} value
|
|
44
|
+
* @returns {{teadsId:string}}
|
|
45
|
+
*/
|
|
46
|
+
decode(value) {
|
|
47
|
+
return {teadsId: value}
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* performs action to obtain id and return a value in the callback's response argument
|
|
51
|
+
* @function
|
|
52
|
+
* @param {SubmoduleConfig} [submoduleConfig]
|
|
53
|
+
* @param {ConsentData} [consentData]
|
|
54
|
+
* @returns {IdResponse|undefined}
|
|
55
|
+
*/
|
|
56
|
+
getId(submoduleConfig, consentData) {
|
|
57
|
+
const resp = function (callback) {
|
|
58
|
+
const url = buildAnalyticsTagUrl(submoduleConfig, consentData);
|
|
59
|
+
|
|
60
|
+
const callbacks = {
|
|
61
|
+
success: (bodyResponse, responseObj) => {
|
|
62
|
+
if (responseObj && responseObj.status === 200) {
|
|
63
|
+
if (isStr(bodyResponse) && !isEmpty(bodyResponse)) {
|
|
64
|
+
const cookiesMaxAge = getTimestampFromDays(365); // 1 year
|
|
65
|
+
const expirationCookieDate = getCookieExpirationDate(cookiesMaxAge);
|
|
66
|
+
storage.setCookie(FP_TEADS_ID_COOKIE_NAME, bodyResponse, expirationCookieDate);
|
|
67
|
+
callback(bodyResponse);
|
|
68
|
+
} else {
|
|
69
|
+
storage.setCookie(FP_TEADS_ID_COOKIE_NAME, '', EXPIRED_COOKIE_DATE);
|
|
70
|
+
callback();
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
logInfo(`${MODULE_NAME}: Server error while fetching ID`);
|
|
74
|
+
callback();
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
error: error => {
|
|
78
|
+
logError(`${MODULE_NAME}: ID fetch encountered an error`, error);
|
|
79
|
+
callback();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
ajax(url, callbacks, undefined, {method: 'GET'});
|
|
84
|
+
};
|
|
85
|
+
return {callback: resp};
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Build the full URL from the Submodule config & consentData
|
|
91
|
+
* @param submoduleConfig
|
|
92
|
+
* @param consentData
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
export function buildAnalyticsTagUrl(submoduleConfig, consentData) {
|
|
96
|
+
const pubId = getPublisherId(submoduleConfig);
|
|
97
|
+
const teadsViewerId = getTeadsViewerId();
|
|
98
|
+
const status = getGdprStatus(consentData);
|
|
99
|
+
const gdprConsentString = getGdprConsentString(consentData);
|
|
100
|
+
const ccpaConsentString = getCcpaConsentString(uspDataHandler?.getConsentData());
|
|
101
|
+
const gdprReason = getGdprReasonFromStatus(status);
|
|
102
|
+
const params = {
|
|
103
|
+
analytics_tag_id: pubId,
|
|
104
|
+
tfpvi: teadsViewerId,
|
|
105
|
+
gdpr_consent: gdprConsentString,
|
|
106
|
+
gdpr_status: status,
|
|
107
|
+
gdpr_reason: gdprReason,
|
|
108
|
+
ccpa_consent: ccpaConsentString,
|
|
109
|
+
sv: 'prebid-v1',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const url = 'https://at.teads.tv/fpc';
|
|
113
|
+
const queryParams = new URLSearchParams();
|
|
114
|
+
|
|
115
|
+
for (const param in params) {
|
|
116
|
+
queryParams.append(param, params[param]);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return url + '?' + queryParams.toString();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Extract the Publisher ID from the Submodule config
|
|
124
|
+
* @returns {string}
|
|
125
|
+
* @param submoduleConfig
|
|
126
|
+
*/
|
|
127
|
+
export function getPublisherId(submoduleConfig) {
|
|
128
|
+
const pubId = submoduleConfig?.params?.pubId;
|
|
129
|
+
const prefix = 'PUB_';
|
|
130
|
+
if (isNumber(pubId)) {
|
|
131
|
+
return prefix + pubId.toString();
|
|
132
|
+
}
|
|
133
|
+
if (isStr(pubId) && parseInt(pubId)) {
|
|
134
|
+
return prefix + pubId;
|
|
135
|
+
}
|
|
136
|
+
return '';
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Extract the GDPR status from the given consentData
|
|
141
|
+
* @param consentData
|
|
142
|
+
* @returns {number}
|
|
143
|
+
*/
|
|
144
|
+
export function getGdprStatus(consentData) {
|
|
145
|
+
const gdprApplies = consentData?.gdprApplies;
|
|
146
|
+
if (gdprApplies === true) {
|
|
147
|
+
return gdprStatus.GDPR_APPLIES_PUBLISHER;
|
|
148
|
+
} else if (gdprApplies === false) {
|
|
149
|
+
return gdprStatus.GDPR_DOESNT_APPLY;
|
|
150
|
+
} else {
|
|
151
|
+
return gdprStatus.CMP_NOT_FOUND_OR_ERROR;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Extract the GDPR consent string from the given consentData
|
|
157
|
+
* @param consentData
|
|
158
|
+
* @returns {string}
|
|
159
|
+
*/
|
|
160
|
+
export function getGdprConsentString(consentData) {
|
|
161
|
+
const consentString = consentData?.consentString;
|
|
162
|
+
if (isStr(consentString)) {
|
|
163
|
+
return consentString;
|
|
164
|
+
} else {
|
|
165
|
+
return '';
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Map the GDPR reason from the given GDPR status
|
|
171
|
+
* @param status
|
|
172
|
+
* @returns {number}
|
|
173
|
+
*/
|
|
174
|
+
function getGdprReasonFromStatus(status) {
|
|
175
|
+
switch (status) {
|
|
176
|
+
case gdprStatus.GDPR_DOESNT_APPLY:
|
|
177
|
+
return gdprReason.GDPR_DOESNT_APPLY;
|
|
178
|
+
case gdprStatus.CMP_NOT_FOUND_OR_ERROR:
|
|
179
|
+
return gdprReason.CMP_NOT_FOUND;
|
|
180
|
+
case gdprStatus.GDPR_APPLIES_PUBLISHER:
|
|
181
|
+
return gdprReason.GDPR_APPLIES_PUBLISHER_CLASSIC;
|
|
182
|
+
default:
|
|
183
|
+
return -1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Return the well formatted CCPA consent string
|
|
189
|
+
* @param ccpaConsentString
|
|
190
|
+
* @returns {string|*}
|
|
191
|
+
*/
|
|
192
|
+
export function getCcpaConsentString(ccpaConsentString) {
|
|
193
|
+
if (isStr(ccpaConsentString)) {
|
|
194
|
+
return ccpaConsentString;
|
|
195
|
+
} else {
|
|
196
|
+
return '';
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Get the cookie expiration date string from a given Date and a max age
|
|
202
|
+
* @param {number} maxAge
|
|
203
|
+
* @returns {string}
|
|
204
|
+
*/
|
|
205
|
+
export function getCookieExpirationDate(maxAge) {
|
|
206
|
+
return new Date(timestamp() + maxAge).toUTCString()
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Get cookie from Cookie or Local Storage
|
|
211
|
+
* @returns {string}
|
|
212
|
+
*/
|
|
213
|
+
function getTeadsViewerId() {
|
|
214
|
+
const teadsViewerId = readCookie()
|
|
215
|
+
if (isStr(teadsViewerId)) {
|
|
216
|
+
return teadsViewerId
|
|
217
|
+
} else {
|
|
218
|
+
return '';
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function readCookie() {
|
|
223
|
+
return storage.cookiesAreEnabled(null) ? storage.getCookie(FP_TEADS_ID_COOKIE_NAME, null) : null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Return a number of milliseconds from given days number
|
|
228
|
+
* @param days
|
|
229
|
+
* @returns {number}
|
|
230
|
+
*/
|
|
231
|
+
export function getTimestampFromDays(days) {
|
|
232
|
+
return days * 24 * 60 * 60 * 1000;
|
|
233
|
+
}
|
|
234
|
+
submodule('userId', teadsIdSubmodule);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
Module Name: Teads Id System
|
|
4
|
+
Module Type: User Id System
|
|
5
|
+
Maintainer: innov-ssp@teads.com
|
|
6
|
+
|
|
7
|
+
# Description
|
|
8
|
+
|
|
9
|
+
Teads user identification system. GDPR & CCPA compliant.
|
|
10
|
+
|
|
11
|
+
## Example configuration for publishers:
|
|
12
|
+
|
|
13
|
+
pbjs.setConfig({
|
|
14
|
+
userSync: {
|
|
15
|
+
userIds: [{
|
|
16
|
+
name: 'teadsId',
|
|
17
|
+
params: {
|
|
18
|
+
pubId: 1234
|
|
19
|
+
}
|
|
20
|
+
}]
|
|
21
|
+
}
|
|
22
|
+
});
|
package/modules/ttdBidAdapter.js
CHANGED
|
@@ -59,7 +59,7 @@ function getBidFloor(bid) {
|
|
|
59
59
|
|
|
60
60
|
function getSource(validBidRequests) {
|
|
61
61
|
let source = {
|
|
62
|
-
tid: validBidRequests[0].
|
|
62
|
+
tid: validBidRequests[0].auctionId
|
|
63
63
|
};
|
|
64
64
|
if (validBidRequests[0].schain) {
|
|
65
65
|
utils.deepSetValue(source, 'ext.schain', validBidRequests[0].schain);
|
package/modules/userId/index.js
CHANGED
|
@@ -425,6 +425,7 @@ function processSubmoduleCallbacks(submodules, cb) {
|
|
|
425
425
|
}
|
|
426
426
|
// cache decoded value (this is copied to every adUnit bid)
|
|
427
427
|
submodule.idObj = submodule.submodule.decode(idObj, submodule.config);
|
|
428
|
+
updatePPID(submodule.idObj);
|
|
428
429
|
} else {
|
|
429
430
|
logInfo(`${MODULE_NAME}: ${submodule.submodule.name} - request id responded with an empty value`);
|
|
430
431
|
}
|
|
@@ -613,9 +614,9 @@ function idSystemInitializer({delay = GreedyPromise.timeout} = {}) {
|
|
|
613
614
|
|
|
614
615
|
let initIdSystem;
|
|
615
616
|
|
|
616
|
-
function getPPID() {
|
|
617
|
+
function getPPID(eids = getUserIdsAsEids() || []) {
|
|
617
618
|
// userSync.ppid should be one of the 'source' values in getUserIdsAsEids() eg pubcid.org or id5-sync.com
|
|
618
|
-
const matchingUserId = ppidSource &&
|
|
619
|
+
const matchingUserId = ppidSource && eids.find(userID => userID.source === ppidSource);
|
|
619
620
|
if (matchingUserId && typeof deepAccess(matchingUserId, 'uids.0.id') === 'string') {
|
|
620
621
|
const ppidValue = matchingUserId.uids[0].id.replace(/[\W_]/g, '');
|
|
621
622
|
if (ppidValue.length >= 32 && ppidValue.length <= 150) {
|
|
@@ -642,18 +643,6 @@ export const requestBidsHook = timedAuctionHook('userId', function requestBidsHo
|
|
|
642
643
|
]).then(() => {
|
|
643
644
|
// pass available user id data to bid adapters
|
|
644
645
|
addIdDataToAdUnitBids(reqBidsConfigObj.adUnits || getGlobal().adUnits, initializedSubmodules);
|
|
645
|
-
const ppid = getPPID();
|
|
646
|
-
if (ppid) {
|
|
647
|
-
if (isGptPubadsDefined()) {
|
|
648
|
-
window.googletag.pubads().setPublisherProvidedId(ppid);
|
|
649
|
-
} else {
|
|
650
|
-
window.googletag = window.googletag || {};
|
|
651
|
-
window.googletag.cmd = window.googletag.cmd || [];
|
|
652
|
-
window.googletag.cmd.push(function() {
|
|
653
|
-
window.googletag.pubads().setPublisherProvidedId(ppid);
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
646
|
uidMetrics().join(useMetrics(reqBidsConfigObj.metrics), {propagate: false, includeGroups: true});
|
|
658
647
|
// calling fn allows prebid to continue processing
|
|
659
648
|
fn.call(this, reqBidsConfigObj);
|
|
@@ -853,6 +842,24 @@ function populateSubmoduleId(submodule, consentData, storedConsentData, forceRef
|
|
|
853
842
|
if (response.id) { submodule.idObj = submodule.submodule.decode(response.id, submodule.config); }
|
|
854
843
|
}
|
|
855
844
|
}
|
|
845
|
+
updatePPID(submodule.idObj);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
function updatePPID(userIds = getUserIds()) {
|
|
849
|
+
if (userIds && ppidSource) {
|
|
850
|
+
const ppid = getPPID(createEidsArray(userIds));
|
|
851
|
+
if (ppid) {
|
|
852
|
+
if (isGptPubadsDefined()) {
|
|
853
|
+
window.googletag.pubads().setPublisherProvidedId(ppid);
|
|
854
|
+
} else {
|
|
855
|
+
window.googletag = window.googletag || {};
|
|
856
|
+
window.googletag.cmd = window.googletag.cmd || [];
|
|
857
|
+
window.googletag.cmd.push(function() {
|
|
858
|
+
window.googletag.pubads().setPublisherProvidedId(ppid);
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
856
863
|
}
|
|
857
864
|
|
|
858
865
|
function initSubmodules(dest, submodules, consentData, forceRefresh = false) {
|
|
@@ -27,6 +27,11 @@ export const spec = {
|
|
|
27
27
|
let ccpa = '';
|
|
28
28
|
let coppa = 0;
|
|
29
29
|
let tmax = 0;
|
|
30
|
+
let eids = [];
|
|
31
|
+
|
|
32
|
+
if (bidRequests[0].userIdAsEids && bidRequests[0].userIdAsEids.length > 0) {
|
|
33
|
+
eids = bidRequests[0].userIdAsEids;
|
|
34
|
+
}
|
|
30
35
|
|
|
31
36
|
if (bid && bid.gdprConsent) {
|
|
32
37
|
gdprApplies = bid.gdprConsent.gdprApplies ? 1 : 0;
|
|
@@ -74,7 +79,8 @@ export const spec = {
|
|
|
74
79
|
},
|
|
75
80
|
user: {
|
|
76
81
|
ext: {
|
|
77
|
-
consent: gdprConsent
|
|
82
|
+
consent: gdprConsent,
|
|
83
|
+
eids: eids
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
};
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { parseSizesInput } from '../src/utils.js';
|
|
1
|
+
import { parseSizesInput, deepAccess } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
|
+
import { BANNER } from '../src/mediaTypes.js';
|
|
4
|
+
import { config } from '../src/config.js';
|
|
3
5
|
|
|
4
6
|
const BIDDER_CODE = 'vuukle';
|
|
5
7
|
const URL = 'https://pb.vuukle.com/adapter';
|
|
6
8
|
const TIME_TO_LIVE = 360;
|
|
9
|
+
const VENDOR_ID = 1004;
|
|
7
10
|
|
|
8
11
|
export const spec = {
|
|
9
12
|
code: BIDDER_CODE,
|
|
13
|
+
gvlid: VENDOR_ID,
|
|
14
|
+
supportedMediaTypes: [ BANNER ],
|
|
10
15
|
|
|
11
16
|
isBidRequestValid: function(bid) {
|
|
12
17
|
return true
|
|
13
18
|
},
|
|
14
19
|
|
|
15
|
-
buildRequests: function(bidRequests) {
|
|
20
|
+
buildRequests: function(bidRequests, bidderRequest) {
|
|
21
|
+
bidderRequest = bidderRequest || {};
|
|
16
22
|
const requests = bidRequests.map(function (bid) {
|
|
17
23
|
const parseSized = parseSizesInput(bid.sizes);
|
|
18
24
|
const arrSize = parseSized[0].split('x');
|
|
@@ -25,10 +31,27 @@ export const spec = {
|
|
|
25
31
|
rnd: Math.random(),
|
|
26
32
|
bidId: bid.bidId,
|
|
27
33
|
source: 'pbjs',
|
|
34
|
+
schain: JSON.stringify(bid.schain),
|
|
35
|
+
requestId: bid.bidderRequestId,
|
|
36
|
+
tmax: bidderRequest.timeout,
|
|
37
|
+
gdpr: (bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) ? 1 : 0,
|
|
38
|
+
consentGiven: vuukleGetConsentGiven(bidderRequest.gdprConsent),
|
|
28
39
|
version: '$prebid.version$',
|
|
29
|
-
v:
|
|
40
|
+
v: 2,
|
|
30
41
|
};
|
|
31
42
|
|
|
43
|
+
if (bidderRequest.uspConsent) {
|
|
44
|
+
params.uspConsent = bidderRequest.uspConsent;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (config.getConfig('coppa') === true) {
|
|
48
|
+
params.coppa = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (bidderRequest.gdprConsent && bidderRequest.gdprConsent.consentString) {
|
|
52
|
+
params.consent = bidderRequest.gdprConsent.consentString;
|
|
53
|
+
}
|
|
54
|
+
|
|
32
55
|
return {
|
|
33
56
|
method: 'GET',
|
|
34
57
|
url: URL,
|
|
@@ -65,3 +88,11 @@ export const spec = {
|
|
|
65
88
|
},
|
|
66
89
|
}
|
|
67
90
|
registerBidder(spec);
|
|
91
|
+
|
|
92
|
+
function vuukleGetConsentGiven(gdprConsent) {
|
|
93
|
+
let consentGiven = 0;
|
|
94
|
+
if (typeof gdprConsent !== 'undefined') {
|
|
95
|
+
consentGiven = deepAccess(gdprConsent, `vendorData.vendor.consents.${VENDOR_ID}`) ? 1 : 0;
|
|
96
|
+
}
|
|
97
|
+
return consentGiven;
|
|
98
|
+
}
|
|
@@ -30,6 +30,7 @@ const SUPPORTED_USER_ID_SOURCES = [
|
|
|
30
30
|
'criteo.com',
|
|
31
31
|
'crwdcntrl.net',
|
|
32
32
|
'deepintent.com',
|
|
33
|
+
'epsilon.com',
|
|
33
34
|
'hcn.health',
|
|
34
35
|
'id5-sync.com',
|
|
35
36
|
'idx.lat',
|
|
@@ -46,7 +47,6 @@ const SUPPORTED_USER_ID_SOURCES = [
|
|
|
46
47
|
'parrable.com',
|
|
47
48
|
'pubcid.org',
|
|
48
49
|
'quantcast.com',
|
|
49
|
-
'quantcast.com',
|
|
50
50
|
'tapad.com',
|
|
51
51
|
'uidapi.com',
|
|
52
52
|
'verizonmedia.com',
|
|
@@ -237,7 +237,9 @@ function generateOpenRtbObject(bidderRequest, bid) {
|
|
|
237
237
|
device: {
|
|
238
238
|
dnt: 0,
|
|
239
239
|
ua: navigator.userAgent,
|
|
240
|
-
ip: deepAccess(bid, 'params.bidOverride.device.ip') || deepAccess(bid, 'params.ext.ip') || undefined
|
|
240
|
+
ip: deepAccess(bid, 'params.bidOverride.device.ip') || deepAccess(bid, 'params.ext.ip') || undefined,
|
|
241
|
+
w: window.screen.width,
|
|
242
|
+
h: window.screen.height
|
|
241
243
|
},
|
|
242
244
|
regs: {
|
|
243
245
|
ext: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {formatQS, deepAccess} from '../src/utils.js';
|
|
1
|
+
import { formatQS, deepAccess, triggerPixel } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
|
|
4
4
|
const BIDDER_CODE = 'yandex';
|
|
5
|
-
const BIDDER_URL = 'https://bs
|
|
5
|
+
const BIDDER_URL = 'https://bs.yandex.ru/metadsp';
|
|
6
6
|
const DEFAULT_TTL = 180;
|
|
7
|
+
const DEFAULT_CURRENCY = 'EUR';
|
|
7
8
|
const SSP_ID = 10500;
|
|
8
9
|
|
|
9
10
|
export const spec = {
|
|
@@ -19,9 +20,13 @@ export const spec = {
|
|
|
19
20
|
const consentString = deepAccess(bidderRequest, 'gdprConsent.consentString');
|
|
20
21
|
|
|
21
22
|
let referrer = '';
|
|
23
|
+
let domain = '';
|
|
24
|
+
let page = '';
|
|
25
|
+
|
|
22
26
|
if (bidderRequest && bidderRequest.refererInfo) {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
referrer = bidderRequest.refererInfo.ref;
|
|
28
|
+
domain = bidderRequest.refererInfo.domain;
|
|
29
|
+
page = bidderRequest.refererInfo.page;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
return validBidRequests.map((bidRequest) => {
|
|
@@ -30,17 +35,25 @@ export const spec = {
|
|
|
30
35
|
|
|
31
36
|
const queryParams = {
|
|
32
37
|
'imp-id': impId,
|
|
33
|
-
'target-ref': targetRef ||
|
|
38
|
+
'target-ref': targetRef || domain,
|
|
34
39
|
'ssp-id': SSP_ID,
|
|
35
40
|
};
|
|
36
41
|
if (gdprApplies !== undefined) {
|
|
37
42
|
queryParams['gdpr'] = 1;
|
|
38
43
|
queryParams['tcf-consent'] = consentString;
|
|
39
44
|
}
|
|
45
|
+
|
|
46
|
+
const floorInfo = bidRequest.getFloor ? bidRequest.getFloor({
|
|
47
|
+
currency: DEFAULT_CURRENCY
|
|
48
|
+
}) : {};
|
|
49
|
+
const bidfloor = floorInfo.floor;
|
|
50
|
+
const bidfloorcur = floorInfo.currency;
|
|
51
|
+
|
|
40
52
|
const imp = {
|
|
41
53
|
id: impId,
|
|
54
|
+
bidfloor,
|
|
55
|
+
bidfloorcur,
|
|
42
56
|
};
|
|
43
|
-
|
|
44
57
|
const bannerParams = deepAccess(bidRequest, 'mediaTypes.banner');
|
|
45
58
|
if (bannerParams) {
|
|
46
59
|
const [ w, h ] = bannerParams.sizes[0];
|
|
@@ -58,7 +71,8 @@ export const spec = {
|
|
|
58
71
|
id: bidRequest.bidId,
|
|
59
72
|
imp: [imp],
|
|
60
73
|
site: {
|
|
61
|
-
|
|
74
|
+
ref_url: referrer,
|
|
75
|
+
page_url: page,
|
|
62
76
|
},
|
|
63
77
|
},
|
|
64
78
|
options: {
|
|
@@ -84,7 +98,7 @@ export const spec = {
|
|
|
84
98
|
let prBid = {
|
|
85
99
|
requestId: bidRequest.bidId,
|
|
86
100
|
cpm: rtbBid.price,
|
|
87
|
-
currency: cur ||
|
|
101
|
+
currency: cur || DEFAULT_CURRENCY,
|
|
88
102
|
width: rtbBid.w,
|
|
89
103
|
height: rtbBid.h,
|
|
90
104
|
creativeId: rtbBid.adid,
|
|
@@ -102,6 +116,15 @@ export const spec = {
|
|
|
102
116
|
return prBid;
|
|
103
117
|
});
|
|
104
118
|
},
|
|
119
|
+
|
|
120
|
+
onBidWon: function (bid) {
|
|
121
|
+
const nurl = bid['nurl'];
|
|
122
|
+
|
|
123
|
+
if (!nurl) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
triggerPixel(nurl);
|
|
127
|
+
}
|
|
105
128
|
}
|
|
106
129
|
|
|
107
130
|
registerBidder(spec);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prebid.js",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.20.0",
|
|
4
4
|
"description": "Header Bidding Management Library",
|
|
5
5
|
"main": "src/prebid.js",
|
|
6
6
|
"scripts": {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"express": "^4.15.4",
|
|
127
127
|
"fun-hooks": "^0.9.9",
|
|
128
128
|
"just-clone": "^1.0.2",
|
|
129
|
-
"live-connect-js": "2.
|
|
129
|
+
"live-connect-js": "2.4.0"
|
|
130
130
|
},
|
|
131
131
|
"optionalDependencies": {
|
|
132
132
|
"fsevents": "^2.3.2"
|
package/src/adapterManager.js
CHANGED
|
@@ -357,8 +357,6 @@ adapterManager.callBids = (adUnits, bidRequests, addBidResponse, doneCb, request
|
|
|
357
357
|
|
|
358
358
|
let counter = 0;
|
|
359
359
|
|
|
360
|
-
// $.source.tid MUST be a unique UUID and also THE SAME between all PBS Requests for a given Auction
|
|
361
|
-
const sourceTid = generateUUID();
|
|
362
360
|
_s2sConfigs.forEach((s2sConfig) => {
|
|
363
361
|
if (s2sConfig && uniqueServerBidRequests[counter] && getS2SBidderSet(s2sConfig).has(uniqueServerBidRequests[counter].bidderCode)) {
|
|
364
362
|
// s2s should get the same client side timeout as other client side requests.
|
|
@@ -374,7 +372,7 @@ adapterManager.callBids = (adUnits, bidRequests, addBidResponse, doneCb, request
|
|
|
374
372
|
let uniqueServerRequests = serverBidRequests.filter(serverBidRequest => serverBidRequest.uniquePbsTid === uniquePbsTid);
|
|
375
373
|
|
|
376
374
|
if (s2sAdapter) {
|
|
377
|
-
let s2sBidRequest = {
|
|
375
|
+
let s2sBidRequest = {'ad_units': adUnitsS2SCopy, s2sConfig, ortb2Fragments};
|
|
378
376
|
if (s2sBidRequest.ad_units.length) {
|
|
379
377
|
let doneCbs = uniqueServerRequests.map(bidRequest => {
|
|
380
378
|
bidRequest.start = timestamp();
|
|
@@ -387,7 +385,7 @@ adapterManager.callBids = (adUnits, bidRequests, addBidResponse, doneCb, request
|
|
|
387
385
|
// fire BID_REQUESTED event for each s2s bidRequest
|
|
388
386
|
uniqueServerRequests.forEach(bidRequest => {
|
|
389
387
|
// add the new sourceTid
|
|
390
|
-
events.emit(CONSTANTS.EVENTS.BID_REQUESTED, {...bidRequest, tid:
|
|
388
|
+
events.emit(CONSTANTS.EVENTS.BID_REQUESTED, {...bidRequest, tid: bidRequest.auctionId});
|
|
391
389
|
});
|
|
392
390
|
|
|
393
391
|
// make bid requests
|