prebid.js 6.26.0 → 6.29.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/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/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adoceanBidAdapter.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/akamaiDapRtdProvider.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/automatadBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.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/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- 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/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/hadronRtdProvider.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/incrxBidAdapter.js +1 -0
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/inskinBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invisiblyAnalyticsAdapter.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/kargoBidAdapter.js +1 -1
- package/dist/koblerBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.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/malltvAnalyticsAdapter.js +1 -1
- package/dist/mantisBidAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/medianetRtdProvider.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/merkleIdSystem.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/not-for-prod/prebid.js +178 -176
- package/dist/novatiqIdSystem.js +1 -1
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/oneVideoBidAdapter.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/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +3 -3
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/pubCommonId.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/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/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/scaleableAnalyticsAdapter.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/sigmoidAnalyticsAdapter.js +1 -1
- package/dist/slimcutBidAdapter.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/sortableAnalyticsAdapter.js +1 -1
- package/dist/sortableBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/spotxBidAdapter.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 -0
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/telariaBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/trustxBidAdapter.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/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/akamaidap_segments_example.html +5 -3
- package/modules/.submodules.json +1 -0
- package/modules/adfBidAdapter.js +0 -3
- package/modules/adlooxAnalyticsAdapter.js +9 -5
- package/modules/adlooxAnalyticsAdapter.md +3 -3
- package/modules/adlooxRtdProvider.js +3 -5
- package/modules/adlooxRtdProvider.md +2 -2
- package/modules/adoceanBidAdapter.js +29 -1
- package/modules/adyoulikeBidAdapter.js +3 -0
- package/modules/akamaiDapRtdProvider.js +469 -139
- package/modules/akamaiDapRtdProvider.md +5 -3
- package/modules/automatadBidAdapter.js +9 -5
- package/modules/colossussspBidAdapter.js +17 -17
- package/modules/conversantBidAdapter.js +2 -2
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/ftrackIdSystem.js +5 -8
- package/modules/gdprEnforcement.js +15 -9
- package/modules/gridBidAdapter.js +4 -0
- package/modules/hadronAnalyticsAdapter.js +5 -1
- package/modules/hadronRtdProvider.js +15 -13
- package/modules/incrxBidAdapter.js +87 -0
- package/modules/{vertozBidAdapter.md → incrxBidAdapter.md} +6 -6
- package/modules/inskinBidAdapter.js +4 -3
- package/modules/insticatorBidAdapter.js +109 -42
- package/modules/ixBidAdapter.js +3 -2
- package/modules/ixBidAdapter.md +1 -1
- package/modules/kargoBidAdapter.js +32 -1
- package/modules/koblerBidAdapter.js +54 -45
- package/modules/koblerBidAdapter.md +12 -17
- package/modules/mantisBidAdapter.js +4 -8
- package/modules/medianetBidAdapter.js +2 -2
- package/modules/medianetRtdProvider.js +4 -6
- package/modules/merkleIdSystem.js +43 -31
- package/modules/naveggIdSystem.js +3 -2
- package/modules/novatiqIdSystem.js +6 -1
- package/modules/pubCommonId.js +2 -1
- package/modules/pubmaticAnalyticsAdapter.js +49 -33
- package/modules/relaidoBidAdapter.js +0 -3
- package/modules/sharedIdSystem.js +5 -11
- package/modules/slimcutBidAdapter.js +2 -2
- package/modules/spotxBidAdapter.js +1 -1
- package/modules/synacormediaBidAdapter.js +11 -2
- package/modules/taboolaBidAdapter.js +265 -0
- package/modules/taboolaBidAdapter.md +49 -0
- package/modules/telariaBidAdapter.js +3 -3
- package/modules/userId/eids.js +25 -5
- package/modules/zeta_global_sspBidAdapter.js +3 -2
- package/package.json +1 -1
- package/src/AnalyticsAdapter.js +5 -1
- package/src/adloader.js +6 -1
- package/src/storageManager.js +5 -4
- package/test/mocks/analyticsStub.js +13 -0
- package/test/mocks/xhr.js +22 -0
- package/test/spec/AnalyticsAdapter_spec.js +4 -0
- package/test/spec/modules/adfBidAdapter_spec.js +1 -1
- package/test/spec/modules/adoceanBidAdapter_spec.js +25 -1
- package/test/spec/modules/adriverIdSystem_spec.js +7 -3
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +16 -1
- package/test/spec/modules/akamaiDapRtdProvider_spec.js +457 -109
- package/test/spec/modules/automatadBidAdapter_spec.js +4 -0
- package/test/spec/modules/conversantBidAdapter_spec.js +36 -5
- package/test/spec/modules/datablocksBidAdapter_spec.js +9 -8
- package/test/spec/modules/eids_spec.js +48 -3
- package/test/spec/modules/fintezaAnalyticsAdapter_spec.js +4 -4
- package/test/spec/modules/ftrackIdSystem_spec.js +11 -22
- package/test/spec/modules/gdprEnforcement_spec.js +100 -53
- package/test/spec/modules/gridBidAdapter_spec.js +11 -0
- package/test/spec/modules/incrxBidAdapter_spec.js +100 -0
- package/test/spec/modules/insticatorBidAdapter_spec.js +46 -1
- package/test/spec/modules/ixBidAdapter_spec.js +1 -1
- package/test/spec/modules/kargoBidAdapter_spec.js +27 -0
- package/test/spec/modules/koblerBidAdapter_spec.js +160 -124
- package/test/spec/modules/medianetRtdProvider_spec.js +146 -0
- package/test/spec/modules/merkleIdSystem_spec.js +58 -37
- package/test/spec/modules/naveggIdSystem_spec.js +25 -1
- package/test/spec/modules/proxistoreBidAdapter_spec.js +0 -2
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +117 -0
- package/test/spec/modules/sovrnBidAdapter_spec.js +253 -264
- package/test/spec/modules/synacormediaBidAdapter_spec.js +74 -0
- package/test/spec/modules/taboolaBidAdapter_spec.js +455 -0
- package/test/spec/modules/userId_spec.js +27 -1
- package/test/spec/modules/vidazooBidAdapter_spec.js +9 -4
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +4 -2
- package/test/test_deps.js +1 -0
|
@@ -11,7 +11,7 @@ import {submodule} from '../src/hook.js'
|
|
|
11
11
|
import {getStorageManager} from '../src/storageManager.js';
|
|
12
12
|
|
|
13
13
|
const MODULE_NAME = 'merkleId';
|
|
14
|
-
const ID_URL = 'https://
|
|
14
|
+
const ID_URL = 'https://prebid.sv.rkdms.com/identity/';
|
|
15
15
|
const DEFAULT_REFRESH = 7 * 3600;
|
|
16
16
|
const SESSION_COOKIE_NAME = '_svsid';
|
|
17
17
|
|
|
@@ -30,19 +30,19 @@ function getSession(configParams) {
|
|
|
30
30
|
function setCookie(name, value, expires) {
|
|
31
31
|
let expTime = new Date();
|
|
32
32
|
expTime.setTime(expTime.getTime() + expires * 1000 * 60);
|
|
33
|
-
storage.setCookie(name, value, expTime.toUTCString());
|
|
33
|
+
storage.setCookie(name, value, expTime.toUTCString(), 'Lax');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function setSession(storage, response) {
|
|
37
|
-
logInfo('Merkle setting
|
|
38
|
-
if (response && response
|
|
39
|
-
setCookie(SESSION_COOKIE_NAME, response
|
|
37
|
+
logInfo('Merkle setting ' + `${SESSION_COOKIE_NAME}`);
|
|
38
|
+
if (response && response[SESSION_COOKIE_NAME] && typeof response[SESSION_COOKIE_NAME] === 'string') {
|
|
39
|
+
setCookie(SESSION_COOKIE_NAME, response[SESSION_COOKIE_NAME], storage.expires);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function constructUrl(configParams) {
|
|
44
44
|
const session = getSession(configParams);
|
|
45
|
-
let url = configParams.endpoint + `?
|
|
45
|
+
let url = configParams.endpoint + `?sv_domain=${configParams.sv_domain}&sv_pubid=${configParams.sv_pubid}&ssp_ids=${configParams.ssp_ids.join()}`;
|
|
46
46
|
if (session) {
|
|
47
47
|
url = `${url}&sv_session=${session}`;
|
|
48
48
|
}
|
|
@@ -86,45 +86,52 @@ function generateId(configParams, configStorage) {
|
|
|
86
86
|
/** @type {Submodule} */
|
|
87
87
|
export const merkleIdSubmodule = {
|
|
88
88
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
* used to link submodule with config
|
|
90
|
+
* @type {string}
|
|
91
|
+
*/
|
|
92
92
|
name: MODULE_NAME,
|
|
93
|
+
|
|
93
94
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
* decode the stored id value for passing to bid requests
|
|
96
|
+
* @function
|
|
97
|
+
* @param {string} value
|
|
98
|
+
* @returns {{eids:arrayofields}}
|
|
99
|
+
*/
|
|
99
100
|
decode(value) {
|
|
101
|
+
// Legacy support for a single id
|
|
100
102
|
const id = (value && value.pam_id && typeof value.pam_id.id === 'string') ? value.pam_id : undefined;
|
|
101
103
|
logInfo('Merkle id ' + JSON.stringify(id));
|
|
102
|
-
|
|
104
|
+
|
|
105
|
+
if (id) {
|
|
106
|
+
return {'merkleId': id}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Supports multiple IDs for different SSPs
|
|
110
|
+
const merkleIds = (value && value?.merkleId && Array.isArray(value.merkleId)) ? value.merkleId : undefined;
|
|
111
|
+
logInfo('merkleIds: ' + JSON.stringify(merkleIds));
|
|
112
|
+
|
|
113
|
+
return merkleIds ? {'merkleId': merkleIds} : undefined;
|
|
103
114
|
},
|
|
115
|
+
|
|
104
116
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
* performs action to obtain id and return a value in the callback's response argument
|
|
118
|
+
* @function
|
|
119
|
+
* @param {SubmoduleConfig} [config]
|
|
120
|
+
* @param {ConsentData} [consentData]
|
|
121
|
+
* @returns {IdResponse|undefined}
|
|
122
|
+
*/
|
|
111
123
|
getId(config, consentData) {
|
|
112
124
|
logInfo('User ID - merkleId generating id');
|
|
113
125
|
|
|
114
126
|
const configParams = (config && config.params) || {};
|
|
115
127
|
|
|
116
|
-
if (
|
|
117
|
-
logError('User ID - merkleId submodule requires a valid
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (typeof configParams.sv_cid !== 'string') {
|
|
122
|
-
logError('User ID - merkleId submodule requires a valid sv_cid string to be defined');
|
|
128
|
+
if (typeof configParams.sv_pubid !== 'string') {
|
|
129
|
+
logError('User ID - merkleId submodule requires a valid sv_pubid string to be defined');
|
|
123
130
|
return;
|
|
124
131
|
}
|
|
125
132
|
|
|
126
|
-
if (
|
|
127
|
-
logError('User ID - merkleId submodule requires a valid
|
|
133
|
+
if (!Array.isArray(configParams.ssp_ids)) {
|
|
134
|
+
logError('User ID - merkleId submodule requires a valid ssp_ids array to be defined');
|
|
128
135
|
return;
|
|
129
136
|
}
|
|
130
137
|
|
|
@@ -132,6 +139,7 @@ export const merkleIdSubmodule = {
|
|
|
132
139
|
logError('User ID - merkleId submodule does not currently handle consent strings');
|
|
133
140
|
return;
|
|
134
141
|
}
|
|
142
|
+
|
|
135
143
|
if (typeof configParams.endpoint !== 'string') {
|
|
136
144
|
logWarn('User ID - merkleId submodule endpoint string is not defined');
|
|
137
145
|
configParams.endpoint = ID_URL
|
|
@@ -146,7 +154,7 @@ export const merkleIdSubmodule = {
|
|
|
146
154
|
return {callback: resp};
|
|
147
155
|
},
|
|
148
156
|
extendId: function (config = {}, consentData, storedId) {
|
|
149
|
-
logInfo('User ID -
|
|
157
|
+
logInfo('User ID - stored id ' + storedId);
|
|
150
158
|
const configParams = (config && config.params) || {};
|
|
151
159
|
|
|
152
160
|
if (typeof configParams.endpoint !== 'string') {
|
|
@@ -162,15 +170,18 @@ export const merkleIdSubmodule = {
|
|
|
162
170
|
if (typeof configParams.sv_domain !== 'string') {
|
|
163
171
|
configParams.sv_domain = merkleIdSubmodule.findRootDomain();
|
|
164
172
|
}
|
|
173
|
+
|
|
165
174
|
const configStorage = (config && config.storage) || {};
|
|
166
175
|
if (configStorage && configStorage.refreshInSeconds && typeof configParams.refreshInSeconds === 'number') {
|
|
167
176
|
return {id: storedId};
|
|
168
177
|
}
|
|
178
|
+
|
|
169
179
|
let refreshInSeconds = DEFAULT_REFRESH;
|
|
170
180
|
if (configParams && configParams.refreshInSeconds && typeof configParams.refreshInSeconds === 'number') {
|
|
171
181
|
refreshInSeconds = configParams.refreshInSeconds;
|
|
172
182
|
logInfo('User ID - merkleId param refreshInSeconds' + refreshInSeconds);
|
|
173
183
|
}
|
|
184
|
+
|
|
174
185
|
const storedDate = new Date(storedId.date);
|
|
175
186
|
let refreshNeeded = false;
|
|
176
187
|
if (storedDate) {
|
|
@@ -181,6 +192,7 @@ export const merkleIdSubmodule = {
|
|
|
181
192
|
return {callback: resp};
|
|
182
193
|
}
|
|
183
194
|
}
|
|
195
|
+
|
|
184
196
|
logInfo('User ID - merkleId not refreshed');
|
|
185
197
|
return {id: storedId};
|
|
186
198
|
}
|
|
@@ -36,10 +36,11 @@ function readnavIDFromCookie() {
|
|
|
36
36
|
|
|
37
37
|
function readnvgnavFromLocalStorage() {
|
|
38
38
|
var i;
|
|
39
|
-
const query =
|
|
39
|
+
const query = /[nvga]{3}\d+/;
|
|
40
40
|
for (i in window.localStorage) {
|
|
41
41
|
if (i.match(query) || (!query && typeof i === 'string')) {
|
|
42
|
-
|
|
42
|
+
const naveggId = storage.getDataFromLocalStorage(i.match(query).input).split('|')[0]
|
|
43
|
+
return naveggId.split('_')[0];
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -18,6 +18,11 @@ export const novatiqIdSubmodule = {
|
|
|
18
18
|
* @type {string}
|
|
19
19
|
*/
|
|
20
20
|
name: 'novatiq',
|
|
21
|
+
/**
|
|
22
|
+
* used to specify vendor id
|
|
23
|
+
* @type {number}
|
|
24
|
+
*/
|
|
25
|
+
gvlid: 1119,
|
|
21
26
|
|
|
22
27
|
/**
|
|
23
28
|
* decode the stored id value for passing to bid requests
|
|
@@ -202,7 +207,7 @@ export const novatiqIdSubmodule = {
|
|
|
202
207
|
let sharedId = null;
|
|
203
208
|
if (this.useSharedId(configParams)) {
|
|
204
209
|
let cookieOrStorageID = this.getCookieOrStorageID(configParams);
|
|
205
|
-
const storage = getStorageManager({moduleName: 'pubCommonId'});
|
|
210
|
+
const storage = getStorageManager({gvlid: this.gvlid, moduleName: 'pubCommonId'});
|
|
206
211
|
|
|
207
212
|
// first check local storage
|
|
208
213
|
if (storage.hasLocalStorage()) {
|
package/modules/pubCommonId.js
CHANGED
|
@@ -9,7 +9,8 @@ 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
|
|
12
|
+
const MODULE_TYPE = 'fpid-module';
|
|
13
|
+
const storage = getStorageManager({moduleType: MODULE_TYPE});
|
|
13
14
|
|
|
14
15
|
const ID_NAME = '_pubcid';
|
|
15
16
|
const OPTOUT_NAME = '_pubcid_optout';
|
|
@@ -83,6 +83,8 @@ function setMediaTypes(types, bid) {
|
|
|
83
83
|
function copyRequiredBidDetails(bid) {
|
|
84
84
|
return pick(bid, [
|
|
85
85
|
'bidder',
|
|
86
|
+
'bidderCode',
|
|
87
|
+
'adapterCode',
|
|
86
88
|
'bidId',
|
|
87
89
|
'status', () => NO_BID, // default a bid to NO_BID until response is recieved or bid is timed out
|
|
88
90
|
'finalSource as source',
|
|
@@ -90,7 +92,7 @@ function copyRequiredBidDetails(bid) {
|
|
|
90
92
|
'adUnit', () => pick(bid, [
|
|
91
93
|
'adUnitCode',
|
|
92
94
|
'transactionId',
|
|
93
|
-
'sizes as dimensions', sizes => sizes.map(sizeToDimensions),
|
|
95
|
+
'sizes as dimensions', sizes => sizes && sizes.map(sizeToDimensions),
|
|
94
96
|
'mediaTypes', (types) => setMediaTypes(types, bid)
|
|
95
97
|
])
|
|
96
98
|
]);
|
|
@@ -185,11 +187,11 @@ function getDevicePlatform() {
|
|
|
185
187
|
}
|
|
186
188
|
|
|
187
189
|
function getValueForKgpv(bid, adUnitId) {
|
|
188
|
-
if (bid.params.regexPattern) {
|
|
190
|
+
if (bid.params && bid.params.regexPattern) {
|
|
189
191
|
return bid.params.regexPattern;
|
|
190
192
|
} else if (bid.bidResponse && bid.bidResponse.regexPattern) {
|
|
191
193
|
return bid.bidResponse.regexPattern;
|
|
192
|
-
} else if (bid.params.kgpv) {
|
|
194
|
+
} else if (bid.params && bid.params.kgpv) {
|
|
193
195
|
return bid.params.kgpv;
|
|
194
196
|
} else {
|
|
195
197
|
return adUnitId;
|
|
@@ -218,30 +220,31 @@ function getAdDomain(bidResponse) {
|
|
|
218
220
|
function gatherPartnerBidsForAdUnitForLogger(adUnit, adUnitId, highestBid) {
|
|
219
221
|
highestBid = (highestBid && highestBid.length > 0) ? highestBid[0] : null;
|
|
220
222
|
return Object.keys(adUnit.bids).reduce(function(partnerBids, bidId) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
223
|
+
adUnit.bids[bidId].forEach(function(bid) {
|
|
224
|
+
partnerBids.push({
|
|
225
|
+
'pn': getAdapterNameForAlias(bid.adapterCode || bid.bidder),
|
|
226
|
+
'bc': bid.bidderCode || bid.bidder,
|
|
227
|
+
'bidid': bid.bidId || bidId,
|
|
228
|
+
'db': bid.bidResponse ? 0 : 1,
|
|
229
|
+
'kgpv': getValueForKgpv(bid, adUnitId),
|
|
230
|
+
'kgpsv': bid.params && bid.params.kgpv ? bid.params.kgpv : adUnitId,
|
|
231
|
+
'psz': bid.bidResponse ? (bid.bidResponse.dimensions.width + 'x' + bid.bidResponse.dimensions.height) : '0x0',
|
|
232
|
+
'eg': bid.bidResponse ? bid.bidResponse.bidGrossCpmUSD : 0,
|
|
233
|
+
'en': bid.bidResponse ? bid.bidResponse.bidPriceUSD : 0,
|
|
234
|
+
'di': bid.bidResponse ? (bid.bidResponse.dealId || EMPTY_STRING) : EMPTY_STRING,
|
|
235
|
+
'dc': bid.bidResponse ? (bid.bidResponse.dealChannel || EMPTY_STRING) : EMPTY_STRING,
|
|
236
|
+
'l1': bid.bidResponse ? bid.clientLatencyTimeMs : 0,
|
|
237
|
+
'l2': 0,
|
|
238
|
+
'adv': bid.bidResponse ? getAdDomain(bid.bidResponse) || undefined : undefined,
|
|
239
|
+
'ss': (s2sBidders.indexOf(bid.bidder) > -1) ? 1 : 0,
|
|
240
|
+
't': (bid.status == ERROR && bid.error.code == TIMEOUT_ERROR) ? 1 : 0,
|
|
241
|
+
'wb': (highestBid && highestBid.adId === bid.adId ? 1 : 0),
|
|
242
|
+
'mi': bid.bidResponse ? (bid.bidResponse.mi || undefined) : undefined,
|
|
243
|
+
'af': bid.bidResponse ? (bid.bidResponse.mediaType || undefined) : undefined,
|
|
244
|
+
'ocpm': bid.bidResponse ? (bid.bidResponse.originalCpm || 0) : 0,
|
|
245
|
+
'ocry': bid.bidResponse ? (bid.bidResponse.originalCurrency || CURRENCY_USD) : CURRENCY_USD,
|
|
246
|
+
'piid': bid.bidResponse ? (bid.bidResponse.partnerImpId || EMPTY_STRING) : EMPTY_STRING
|
|
247
|
+
});
|
|
245
248
|
});
|
|
246
249
|
return partnerBids;
|
|
247
250
|
}, [])
|
|
@@ -307,8 +310,14 @@ function executeBidsLoggerCall(e, highestCpmBids) {
|
|
|
307
310
|
|
|
308
311
|
function executeBidWonLoggerCall(auctionId, adUnitId) {
|
|
309
312
|
const winningBidId = cache.auctions[auctionId].adUnitCodes[adUnitId].bidWon;
|
|
310
|
-
const
|
|
311
|
-
|
|
313
|
+
const winningBids = cache.auctions[auctionId].adUnitCodes[adUnitId].bids[winningBidId];
|
|
314
|
+
let winningBid = winningBids[0];
|
|
315
|
+
|
|
316
|
+
if (winningBids.length > 1) {
|
|
317
|
+
winningBid = winningBids.filter(bid => bid.adId === cache.auctions[auctionId].adUnitCodes[adUnitId].bidWonAdId)[0];
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const adapterName = getAdapterNameForAlias(winningBid.adapterCode || winningBid.bidder);
|
|
312
321
|
let pixelURL = END_POINT_WIN_BID_LOGGER;
|
|
313
322
|
pixelURL += 'pubid=' + publisherId;
|
|
314
323
|
pixelURL += '&purl=' + enc(config.getConfig('pageUrl') || cache.auctions[auctionId].referer || '');
|
|
@@ -319,7 +328,7 @@ function executeBidWonLoggerCall(auctionId, adUnitId) {
|
|
|
319
328
|
pixelURL += '&pdvid=' + enc(profileVersionId);
|
|
320
329
|
pixelURL += '&slot=' + enc(adUnitId);
|
|
321
330
|
pixelURL += '&pn=' + enc(adapterName);
|
|
322
|
-
pixelURL += '&bc=' + enc(winningBid.bidder);
|
|
331
|
+
pixelURL += '&bc=' + enc(winningBid.bidderCode || winningBid.bidder);
|
|
323
332
|
pixelURL += '&en=' + enc(winningBid.bidResponse.bidPriceUSD);
|
|
324
333
|
pixelURL += '&eg=' + enc(winningBid.bidResponse.bidGrossCpmUSD);
|
|
325
334
|
pixelURL += '&kgpv=' + enc(getValueForKgpv(winningBid, adUnitId));
|
|
@@ -362,16 +371,22 @@ function bidRequestedHandler(args) {
|
|
|
362
371
|
dimensions: bid.sizes
|
|
363
372
|
};
|
|
364
373
|
}
|
|
365
|
-
cache.auctions[args.auctionId].adUnitCodes[bid.adUnitCode].bids[bid.bidId] = copyRequiredBidDetails(bid);
|
|
374
|
+
cache.auctions[args.auctionId].adUnitCodes[bid.adUnitCode].bids[bid.bidId] = [copyRequiredBidDetails(bid)];
|
|
366
375
|
})
|
|
367
376
|
}
|
|
368
377
|
|
|
369
378
|
function bidResponseHandler(args) {
|
|
370
|
-
let bid = cache.auctions[args.auctionId].adUnitCodes[args.adUnitCode].bids[args.requestId];
|
|
379
|
+
let bid = cache.auctions[args.auctionId].adUnitCodes[args.adUnitCode].bids[args.requestId][0];
|
|
371
380
|
if (!bid) {
|
|
372
381
|
logError(LOG_PRE_FIX + 'Could not find associated bid request for bid response with requestId: ', args.requestId);
|
|
373
382
|
return;
|
|
374
383
|
}
|
|
384
|
+
|
|
385
|
+
if (bid.bidder && args.bidderCode && bid.bidder !== args.bidderCode) {
|
|
386
|
+
bid = copyRequiredBidDetails(args);
|
|
387
|
+
cache.auctions[args.auctionId].adUnitCodes[args.adUnitCode].bids[args.requestId].push(bid)
|
|
388
|
+
}
|
|
389
|
+
bid.adId = args.adId;
|
|
375
390
|
bid.source = formatSource(bid.source || args.source);
|
|
376
391
|
setBidStatus(bid, args);
|
|
377
392
|
bid.clientLatencyTimeMs = Date.now() - cache.auctions[args.auctionId].timestamp;
|
|
@@ -397,6 +412,7 @@ function bidderDoneHandler(args) {
|
|
|
397
412
|
function bidWonHandler(args) {
|
|
398
413
|
let auctionCache = cache.auctions[args.auctionId];
|
|
399
414
|
auctionCache.adUnitCodes[args.adUnitCode].bidWon = args.requestId;
|
|
415
|
+
auctionCache.adUnitCodes[args.adUnitCode].bidWonAdId = args.adId;
|
|
400
416
|
executeBidWonLoggerCall(args.auctionId, args.adUnitCode);
|
|
401
417
|
}
|
|
402
418
|
|
|
@@ -413,7 +429,7 @@ function bidTimeoutHandler(args) {
|
|
|
413
429
|
// db = 0 and t = 1 means bidder did respond with a bid but post timeout
|
|
414
430
|
args.forEach(badBid => {
|
|
415
431
|
let auctionCache = cache.auctions[badBid.auctionId];
|
|
416
|
-
let bid = auctionCache.adUnitCodes[badBid.adUnitCode].bids[ badBid.bidId || badBid.requestId ];
|
|
432
|
+
let bid = auctionCache.adUnitCodes[badBid.adUnitCode].bids[ badBid.bidId || badBid.requestId ][0];
|
|
417
433
|
if (bid) {
|
|
418
434
|
bid.status = ERROR;
|
|
419
435
|
bid.error = {
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* @requires module:modules/userId
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {buildUrl, generateUUID, hasDeviceAccess, logInfo, parseUrl, triggerPixel} from '../src/utils.js';
|
|
9
9
|
import {submodule} from '../src/hook.js';
|
|
10
|
-
import {
|
|
10
|
+
import {coppaDataHandler} from '../src/adapterManager.js';
|
|
11
11
|
import {getStorageManager} from '../src/storageManager.js';
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
export const storage = getStorageManager({
|
|
13
|
+
const MODULE_TYPE = 'fpid-module';
|
|
14
|
+
export const storage = getStorageManager({moduleName: 'pubCommonId', moduleType: MODULE_TYPE});
|
|
15
15
|
const COOKIE = 'cookie';
|
|
16
16
|
const LOCAL_STORAGE = 'html5';
|
|
17
17
|
const OPTOUT_NAME = '_pubcid_optout';
|
|
@@ -74,11 +74,6 @@ 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,
|
|
82
77
|
|
|
83
78
|
/**
|
|
84
79
|
* decode the stored id value for passing to bid requests
|
|
@@ -93,8 +88,7 @@ export const sharedIdSystemSubmodule = {
|
|
|
93
88
|
return undefined;
|
|
94
89
|
}
|
|
95
90
|
logInfo(' Decoded value PubCommonId ' + value);
|
|
96
|
-
|
|
97
|
-
return idObj;
|
|
91
|
+
return {'pubcid': value};
|
|
98
92
|
},
|
|
99
93
|
/**
|
|
100
94
|
* performs action to obtain id
|
|
@@ -9,8 +9,8 @@ const BIDDER_CODE = 'slimcut';
|
|
|
9
9
|
const ENDPOINT_URL = 'https://sb.freeskreen.com/pbr';
|
|
10
10
|
export const spec = {
|
|
11
11
|
code: BIDDER_CODE,
|
|
12
|
-
gvlid:
|
|
13
|
-
aliases: [{ code: 'scm', gvlid:
|
|
12
|
+
gvlid: 102,
|
|
13
|
+
aliases: [{ code: 'scm', gvlid: 102 }],
|
|
14
14
|
supportedMediaTypes: ['video', 'banner'],
|
|
15
15
|
/**
|
|
16
16
|
* Determines whether or not the given bid request is valid.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import {deepSetValue, getAdUnitSizes, isFn, isPlainObject, logWarn} from '../src/utils.js';
|
|
3
|
+
import {deepAccess, deepSetValue, getAdUnitSizes, isFn, isPlainObject, logWarn} from '../src/utils.js';
|
|
4
4
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
5
5
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
6
6
|
import {includes} from '../src/polyfill.js';
|
|
@@ -79,7 +79,16 @@ export const spec = {
|
|
|
79
79
|
imps = this.buildVideoImpressions(adSizes, bid, tagIdOrPlacementId, pos, videoOrBannerKey);
|
|
80
80
|
}
|
|
81
81
|
if (imps.length > 0) {
|
|
82
|
-
imps.forEach(i =>
|
|
82
|
+
imps.forEach(i => {
|
|
83
|
+
// Deeply add ext section to all imp[] for GPID, prebid slot id, and anything else down the line
|
|
84
|
+
const extSection = deepAccess(bid, 'ortb2Imp.ext');
|
|
85
|
+
if (extSection) {
|
|
86
|
+
deepSetValue(i, 'ext', extSection);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Add imp[] to request object
|
|
90
|
+
openRtbBidRequest.imp.push(i);
|
|
91
|
+
});
|
|
83
92
|
}
|
|
84
93
|
});
|
|
85
94
|
|