prebid.js 7.51.0 → 7.53.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/1plusXRtdProvider.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/airgridRtdProvider.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/allowActivities.js +1 -0
- 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/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.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/conceptxBidAdapter.js +1 -0
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +6 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -0
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freepassIdSystem.js +1 -0
- package/dist/freewheel-sspBidAdapter.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/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeRtdProvider.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.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/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/limelightDigitalBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.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/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +154 -146
- package/dist/objectGuard.js +1 -0
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionAnalyticsAdapter.js +1 -0
- package/dist/pairIdSystem.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/proxistoreBidAdapter.js +1 -1
- package/dist/publinkIdSystem.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/richaudienceBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.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/sirdataRtdProvider.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/uid2IdSystem_shared.js +1 -0
- 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/viouslyBidAdapter.js +1 -1
- package/dist/visxBidAdapter.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/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/growthcode.html +20 -9
- package/integrationExamples/gpt/userId_example.html +20 -6
- package/libraries/objectGuard/objectGuard.js +108 -0
- package/libraries/objectGuard/ortbGuard.js +88 -0
- package/modules/.submodules.json +3 -1
- package/modules/1plusXRtdProvider.js +31 -60
- package/modules/adagioBidAdapter.js +86 -24
- package/modules/adgenerationBidAdapter.js +14 -5
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/adriverIdSystem.js +1 -1
- package/modules/airgridRtdProvider.js +11 -12
- package/modules/allowActivities.js +74 -0
- package/modules/asoBidAdapter.js +2 -1
- package/modules/beopBidAdapter.js +6 -0
- package/modules/conceptxBidAdapter.js +70 -0
- package/modules/conceptxBidAdapter.md +36 -0
- package/modules/connectIdSystem.js +89 -13
- package/modules/connectIdSystem.md +4 -7
- package/modules/criteoBidAdapter.js +18 -2
- package/modules/eskimiBidAdapter.js +171 -41
- package/modules/eskimiBidAdapter.md +35 -16
- package/modules/euidIdSystem.js +121 -0
- package/modules/euidIdSystem.md +131 -0
- package/modules/freepassIdSystem.js +61 -0
- package/modules/freepassIdSystem.md +47 -0
- package/modules/gdprEnforcement.js +98 -169
- package/modules/greenbidsAnalyticsAdapter.js +1 -1
- package/modules/growthCodeRtdProvider.js +131 -0
- package/modules/growthCodeRtdProvider.md +55 -0
- package/modules/id5IdSystem.js +3 -5
- package/modules/ixBidAdapter.js +17 -3
- package/modules/limelightDigitalBidAdapter.js +1 -1
- package/modules/logicadBidAdapter.js +14 -1
- package/modules/mediasquareBidAdapter.js +13 -5
- package/modules/nexx360BidAdapter.js +1 -0
- package/modules/oxxionAnalyticsAdapter.js +212 -0
- package/modules/oxxionAnalyticsAdapter.md +33 -0
- package/modules/pairIdSystem.js +16 -11
- package/modules/proxistoreBidAdapter.js +11 -14
- package/modules/richaudienceBidAdapter.js +10 -1
- package/modules/riseBidAdapter.js +1 -1
- package/modules/rtdModule/index.js +12 -1
- package/modules/schain.js +2 -2
- package/modules/sharethroughBidAdapter.js +2 -2
- package/modules/sirdataRtdProvider.js +73 -146
- package/modules/smartadserverBidAdapter.js +5 -0
- package/modules/sovrnBidAdapter.js +4 -1
- package/modules/stroeerCoreBidAdapter.js +55 -6
- package/modules/stvBidAdapter.js +34 -1
- package/modules/uid2IdSystem.js +27 -210
- package/modules/uid2IdSystem.md +104 -23
- package/modules/uid2IdSystem_shared.js +232 -0
- package/modules/undertoneBidAdapter.js +9 -1
- package/modules/userId/eids.js +8 -0
- package/modules/userId/index.js +69 -41
- package/modules/userId/userId.md +2 -1
- package/modules/viouslyBidAdapter.js +2 -2
- package/modules/weboramaRtdProvider.js +25 -95
- package/modules/weboramaRtdProvider.md +4 -4
- package/modules/yahoosspBidAdapter.js +45 -3
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +23 -14
- package/modules/zeta_global_sspBidAdapter.js +28 -22
- package/package.json +1 -1
- package/src/activities/activities.js +47 -0
- package/src/activities/activityParams.js +8 -0
- package/src/activities/modules.js +1 -1
- package/src/activities/params.js +59 -0
- package/src/activities/redactor.js +157 -0
- package/src/activities/rules.js +95 -0
- package/src/adapterManager.js +45 -8
- package/src/adloader.js +1 -0
- package/src/fpd/rootDomain.js +1 -1
- package/src/prebid.js +1 -1
- package/src/storageManager.js +57 -44
- package/src/userSync.js +35 -18
- package/test/spec/activities/allowActivites_spec.js +138 -0
- package/test/spec/activities/objectGuard_spec.js +144 -0
- package/test/spec/activities/ortbGuard_spec.js +140 -0
- package/test/spec/activities/params_spec.js +25 -0
- package/test/spec/activities/redactor_spec.js +296 -0
- package/test/spec/activities/rules_spec.js +135 -0
- package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
- package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -12
- package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
- package/test/spec/modules/beopBidAdapter_spec.js +24 -0
- package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
- package/test/spec/modules/connectIdSystem_spec.js +291 -23
- package/test/spec/modules/criteoBidAdapter_spec.js +85 -1
- package/test/spec/modules/eids_spec.js +15 -0
- package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
- package/test/spec/modules/euidIdSystem_spec.js +130 -0
- package/test/spec/modules/freepassIdSystem_spec.js +186 -0
- package/test/spec/modules/gdprEnforcement_spec.js +127 -414
- package/test/spec/modules/growthCodeRtdProvider_spec.js +127 -0
- package/test/spec/modules/id5IdSystem_spec.js +10 -3
- package/test/spec/modules/ixBidAdapter_spec.js +32 -1
- package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
- package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +324 -0
- package/test/spec/modules/pairIdSystem_spec.js +16 -3
- package/test/spec/modules/realTimeDataModule_spec.js +1 -1
- package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
- package/test/spec/modules/schain_spec.js +9 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +1 -1
- package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
- package/test/spec/modules/smartadserverBidAdapter_spec.js +42 -0
- package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
- package/test/spec/modules/stvBidAdapter_spec.js +13 -1
- package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
- package/test/spec/modules/uid2IdSystem_spec.js +131 -86
- package/test/spec/modules/undertoneBidAdapter_spec.js +57 -1
- package/test/spec/modules/userId_spec.js +96 -33
- package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
- package/test/spec/modules/yahoosspBidAdapter_spec.js +103 -51
- package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +204 -4
- package/test/spec/unit/core/adapterManager_spec.js +181 -1
- package/test/spec/unit/core/storageManager_spec.js +76 -68
- package/test/spec/unit/pbjs_api_spec.js +15 -25
- package/test/spec/userSync_spec.js +45 -16
package/modules/ixBidAdapter.js
CHANGED
|
@@ -96,7 +96,7 @@ const VIDEO_PARAMS_ALLOW_LIST = [
|
|
|
96
96
|
'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate',
|
|
97
97
|
'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend',
|
|
98
98
|
'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext',
|
|
99
|
-
'playerSize', 'w', 'h'
|
|
99
|
+
'playerSize', 'w', 'h', 'plcmt'
|
|
100
100
|
];
|
|
101
101
|
const LOCAL_STORAGE_KEY = 'ixdiag';
|
|
102
102
|
export const LOCAL_STORAGE_FEATURE_TOGGLES_KEY = `${BIDDER_CODE}_features`;
|
|
@@ -145,6 +145,7 @@ export const FEATURE_TOGGLES = {
|
|
|
145
145
|
let siteID = 0;
|
|
146
146
|
let gdprConsent = '';
|
|
147
147
|
let usPrivacy = '';
|
|
148
|
+
let defaultVideoPlacement = false;
|
|
148
149
|
|
|
149
150
|
// Possible values for bidResponse.seatBid[].bid[].mtype which indicates the type of the creative markup so that it can properly be associated with the right sub-object of the BidRequest.Imp.
|
|
150
151
|
const MEDIA_TYPES = {
|
|
@@ -215,6 +216,8 @@ function bidToVideoImp(bid) {
|
|
|
215
216
|
|
|
216
217
|
const context = (videoParamRef && videoParamRef.context) || (videoAdUnitRef && videoAdUnitRef.context);
|
|
217
218
|
|
|
219
|
+
verifyVideoPlcmt(imp);
|
|
220
|
+
|
|
218
221
|
// if placement not already defined, pick one based on `context`
|
|
219
222
|
if (context && !imp.video.hasOwnProperty('placement')) {
|
|
220
223
|
if (context === INSTREAM) {
|
|
@@ -223,7 +226,8 @@ function bidToVideoImp(bid) {
|
|
|
223
226
|
if (deepAccess(videoParamRef, 'playerConfig.floatOnScroll')) {
|
|
224
227
|
imp.video.placement = 5;
|
|
225
228
|
} else {
|
|
226
|
-
imp.video.placement =
|
|
229
|
+
imp.video.placement = 3;
|
|
230
|
+
defaultVideoPlacement = true;
|
|
227
231
|
}
|
|
228
232
|
} else {
|
|
229
233
|
logWarn(`IX Bid Adapter: Video context '${context}' is not supported`);
|
|
@@ -247,6 +251,15 @@ function bidToVideoImp(bid) {
|
|
|
247
251
|
return imp;
|
|
248
252
|
}
|
|
249
253
|
|
|
254
|
+
function verifyVideoPlcmt(imp) {
|
|
255
|
+
if (imp.video.hasOwnProperty('plcmt') && (!isInteger(imp.video.plcmt) || (imp.video.plcmt < 1 || imp.video.plcmt > 4))) {
|
|
256
|
+
logWarn(
|
|
257
|
+
`IX Bid Adapter: video.plcmt [${imp.video.plcmt}] must be an integer between 1-4 inclusive`
|
|
258
|
+
);
|
|
259
|
+
delete imp.video.plcmt;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
250
263
|
/**
|
|
251
264
|
* Transform valid bid request config object to native impression object that will be sent to ad server.
|
|
252
265
|
*
|
|
@@ -1111,7 +1124,8 @@ function buildIXDiag(validBidRequests) {
|
|
|
1111
1124
|
ren: false,
|
|
1112
1125
|
version: '$prebid.version$',
|
|
1113
1126
|
userIds: _getUserIds(validBidRequests[0]),
|
|
1114
|
-
url: window.location.href.split('?')[0]
|
|
1127
|
+
url: window.location.href.split('?')[0],
|
|
1128
|
+
vpd: defaultVideoPlacement
|
|
1115
1129
|
};
|
|
1116
1130
|
|
|
1117
1131
|
// create ad unit map and collect the required diag properties
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
2
2
|
import {BANNER, NATIVE} from '../src/mediaTypes.js';
|
|
3
3
|
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
|
|
4
|
+
import { deepAccess } from '../src/utils.js';
|
|
4
5
|
|
|
5
6
|
const BIDDER_CODE = 'logicad';
|
|
6
7
|
const ENDPOINT_URL = 'https://pb.ladsp.com/adrequest/prebid';
|
|
@@ -52,7 +53,7 @@ export const spec = {
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
function newBidRequest(bid, bidderRequest) {
|
|
55
|
-
|
|
56
|
+
const data = {
|
|
56
57
|
auctionId: bid.auctionId,
|
|
57
58
|
bidderRequestId: bid.bidderRequestId,
|
|
58
59
|
bids: [{
|
|
@@ -69,6 +70,18 @@ function newBidRequest(bid, bidderRequest) {
|
|
|
69
70
|
auctionStartTime: bidderRequest.auctionStart,
|
|
70
71
|
eids: bid.userIdAsEids,
|
|
71
72
|
};
|
|
73
|
+
|
|
74
|
+
const sua = deepAccess(bid, 'ortb2.device.sua');
|
|
75
|
+
if (sua) {
|
|
76
|
+
data.sua = sua;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const userData = deepAccess(bid, 'ortb2.user.data');
|
|
80
|
+
if (userData) {
|
|
81
|
+
data.userData = userData;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return data;
|
|
72
85
|
}
|
|
73
86
|
|
|
74
87
|
registerBidder(spec);
|
|
@@ -127,6 +127,9 @@ export const spec = {
|
|
|
127
127
|
'advertiserDomains': value['adomain']
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
+
if ('context' in value) {
|
|
131
|
+
bidResponse['mediasquare']['context'] = value['context'];
|
|
132
|
+
}
|
|
130
133
|
if ('match' in value) {
|
|
131
134
|
bidResponse['mediasquare']['match'] = value['match'];
|
|
132
135
|
}
|
|
@@ -171,15 +174,20 @@ export const spec = {
|
|
|
171
174
|
*/
|
|
172
175
|
onBidWon: function(bid) {
|
|
173
176
|
// fires a pixel to confirm a winning bid
|
|
177
|
+
if (bid.hasOwnProperty('mediaType') && bid.mediaType == 'video') {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
174
180
|
let params = { pbjs: '$prebid.version$', referer: encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation) };
|
|
175
181
|
let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
|
|
176
|
-
let paramsToSearchFor = ['
|
|
182
|
+
let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context'];
|
|
177
183
|
if (bid.hasOwnProperty('mediasquare')) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
for (let i = 0; i < paramsToSearchFor.length; i++) {
|
|
185
|
+
if (bid['mediasquare'].hasOwnProperty(paramsToSearchFor[i])) {
|
|
186
|
+
params[paramsToSearchFor[i]] = bid['mediasquare'][paramsToSearchFor[i]];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
182
189
|
};
|
|
190
|
+
paramsToSearchFor = ['cpm', 'size', 'mediaType', 'currency', 'creativeId', 'adUnitCode', 'timeToRespond', 'requestId', 'auctionId', 'originalCpm', 'originalCurrency'];
|
|
183
191
|
for (let i = 0; i < paramsToSearchFor.length; i++) {
|
|
184
192
|
if (bid.hasOwnProperty(paramsToSearchFor[i])) {
|
|
185
193
|
params[paramsToSearchFor[i]] = bid[paramsToSearchFor[i]];
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
|
|
2
|
+
import adapterManager from '../src/adapterManager.js';
|
|
3
|
+
import CONSTANTS from '../src/constants.json';
|
|
4
|
+
import { ajax } from '../src/ajax.js';
|
|
5
|
+
import { getRefererInfo } from '../src/refererDetection.js';
|
|
6
|
+
|
|
7
|
+
const analyticsType = 'endpoint';
|
|
8
|
+
const url = 'URL_TO_SERVER_ENDPOINT';
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
EVENTS: {
|
|
12
|
+
AUCTION_END,
|
|
13
|
+
BID_WON,
|
|
14
|
+
BID_RESPONSE,
|
|
15
|
+
BID_REQUESTED,
|
|
16
|
+
BID_TIMEOUT,
|
|
17
|
+
}
|
|
18
|
+
} = CONSTANTS;
|
|
19
|
+
|
|
20
|
+
let saveEvents = {}
|
|
21
|
+
let allEvents = {}
|
|
22
|
+
let auctionEnd = {}
|
|
23
|
+
let initOptions = {}
|
|
24
|
+
let endpoint = 'https://default'
|
|
25
|
+
let requestsAttributes = ['adUnitCode', 'auctionId', 'bidder', 'bidderCode', 'bidId', 'cpm', 'creativeId', 'currency', 'width', 'height', 'mediaType', 'netRevenue', 'originalCpm', 'originalCurrency', 'requestId', 'size', 'source', 'status', 'timeToRespond', 'transactionId', 'ttl', 'sizes', 'mediaTypes', 'src', 'params', 'userId', 'labelAny', 'bids', 'adId'];
|
|
26
|
+
|
|
27
|
+
function getAdapterNameForAlias(aliasName) {
|
|
28
|
+
return adapterManager.aliasRegistry[aliasName] || aliasName;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function filterAttributes(arg, removead) {
|
|
32
|
+
let response = {};
|
|
33
|
+
if (typeof arg == 'object') {
|
|
34
|
+
if (typeof arg['bidderCode'] == 'string') {
|
|
35
|
+
response['originalBidder'] = getAdapterNameForAlias(arg['bidderCode']);
|
|
36
|
+
} else if (typeof arg['bidder'] == 'string') {
|
|
37
|
+
response['originalBidder'] = getAdapterNameForAlias(arg['bidder']);
|
|
38
|
+
}
|
|
39
|
+
if (!removead && typeof arg['ad'] != 'undefined') {
|
|
40
|
+
response['ad'] = arg['ad'];
|
|
41
|
+
}
|
|
42
|
+
if (typeof arg['gdprConsent'] != 'undefined') {
|
|
43
|
+
response['gdprConsent'] = {};
|
|
44
|
+
if (typeof arg['gdprConsent']['consentString'] != 'undefined') { response['gdprConsent']['consentString'] = arg['gdprConsent']['consentString']; }
|
|
45
|
+
}
|
|
46
|
+
if (typeof arg['meta'] == 'object' && typeof arg['meta']['advertiserDomains'] != 'undefined') {
|
|
47
|
+
response['meta'] = {'advertiserDomains': arg['meta']['advertiserDomains']};
|
|
48
|
+
}
|
|
49
|
+
requestsAttributes.forEach((attr) => {
|
|
50
|
+
if (typeof arg[attr] != 'undefined') { response[attr] = arg[attr]; }
|
|
51
|
+
});
|
|
52
|
+
if (typeof response['creativeId'] == 'number') { response['creativeId'] = response['creativeId'].toString(); }
|
|
53
|
+
}
|
|
54
|
+
return response;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function cleanAuctionEnd(args) {
|
|
58
|
+
let response = {};
|
|
59
|
+
let filteredObj;
|
|
60
|
+
let objects = ['bidderRequests', 'bidsReceived', 'noBids', 'adUnits'];
|
|
61
|
+
objects.forEach((attr) => {
|
|
62
|
+
if (Array.isArray(args[attr])) {
|
|
63
|
+
response[attr] = [];
|
|
64
|
+
args[attr].forEach((obj) => {
|
|
65
|
+
filteredObj = filterAttributes(obj, true);
|
|
66
|
+
if (typeof obj['bids'] == 'object') {
|
|
67
|
+
filteredObj['bids'] = [];
|
|
68
|
+
obj['bids'].forEach((bid) => {
|
|
69
|
+
filteredObj['bids'].push(filterAttributes(bid, true));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
response[attr].push(filteredObj);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return response;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function cleanCreatives(args) {
|
|
80
|
+
return filterAttributes(args, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function enhanceMediaType(arg) {
|
|
84
|
+
saveEvents['bidRequested'].forEach((bidRequested) => {
|
|
85
|
+
if (bidRequested['auctionId'] == arg['auctionId'] && Array.isArray(bidRequested['bids'])) {
|
|
86
|
+
bidRequested['bids'].forEach((bid) => {
|
|
87
|
+
if (bid['transactionId'] == arg['transactionId'] && bid['bidId'] == arg['requestId']) { arg['mediaTypes'] = bid['mediaTypes']; }
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return arg;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function addBidResponse(args) {
|
|
95
|
+
let eventType = BID_RESPONSE;
|
|
96
|
+
let argsCleaned = cleanCreatives(JSON.parse(JSON.stringify(args))); ;
|
|
97
|
+
if (allEvents[eventType] == undefined) { allEvents[eventType] = [] }
|
|
98
|
+
allEvents[eventType].push(argsCleaned);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function addBidRequested(args) {
|
|
102
|
+
let eventType = BID_REQUESTED;
|
|
103
|
+
let argsCleaned = filterAttributes(args, true);
|
|
104
|
+
if (saveEvents[eventType] == undefined) { saveEvents[eventType] = [] }
|
|
105
|
+
saveEvents[eventType].push(argsCleaned);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function addTimeout(args) {
|
|
109
|
+
let eventType = BID_TIMEOUT;
|
|
110
|
+
if (saveEvents[eventType] == undefined) { saveEvents[eventType] = [] }
|
|
111
|
+
saveEvents[eventType].push(args);
|
|
112
|
+
let argsCleaned = [];
|
|
113
|
+
let argsDereferenced = JSON.parse(JSON.stringify(args));
|
|
114
|
+
argsDereferenced.forEach((attr) => {
|
|
115
|
+
argsCleaned.push(filterAttributes(JSON.parse(JSON.stringify(attr)), false));
|
|
116
|
+
});
|
|
117
|
+
if (auctionEnd[eventType] == undefined) { auctionEnd[eventType] = [] }
|
|
118
|
+
auctionEnd[eventType].push(argsCleaned);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function addAuctionEnd(args) {
|
|
122
|
+
let eventType = AUCTION_END;
|
|
123
|
+
if (saveEvents[eventType] == undefined) { saveEvents[eventType] = [] }
|
|
124
|
+
saveEvents[eventType].push(args);
|
|
125
|
+
let argsCleaned = cleanAuctionEnd(JSON.parse(JSON.stringify(args)));
|
|
126
|
+
if (auctionEnd[eventType] == undefined) { auctionEnd[eventType] = [] }
|
|
127
|
+
auctionEnd[eventType].push(argsCleaned);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function handleBidWon(args) {
|
|
131
|
+
args = enhanceMediaType(filterAttributes(JSON.parse(JSON.stringify(args)), true));
|
|
132
|
+
let increment = args['cpm'];
|
|
133
|
+
if (typeof saveEvents['auctionEnd'] == 'object') {
|
|
134
|
+
saveEvents['auctionEnd'].forEach((auction) => {
|
|
135
|
+
if (auction['auctionId'] == args['auctionId'] && typeof auction['bidsReceived'] == 'object') {
|
|
136
|
+
auction['bidsReceived'].forEach((bid) => {
|
|
137
|
+
if (bid['transactionId'] == args['transactionId'] && bid['adId'] != args['adId']) {
|
|
138
|
+
if (args['cpm'] < bid['cpm']) {
|
|
139
|
+
increment = 0;
|
|
140
|
+
} else if (increment > args['cpm'] - bid['cpm']) {
|
|
141
|
+
increment = args['cpm'] - bid['cpm'];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
args['cpmIncrement'] = increment;
|
|
149
|
+
args['referer'] = encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation);
|
|
150
|
+
if (typeof saveEvents.bidRequested == 'object' && saveEvents.bidRequested.length > 0 && saveEvents.bidRequested[0].gdprConsent) { args.gdpr = saveEvents.bidRequested[0].gdprConsent; }
|
|
151
|
+
ajax(endpoint + '.oxxion.io/analytics/bid_won', null, JSON.stringify(args), {method: 'POST', withCredentials: true});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function handleAuctionEnd() {
|
|
155
|
+
ajax(endpoint + '.oxxion.io/analytics/auctions', function (data) {
|
|
156
|
+
let list = JSON.parse(data);
|
|
157
|
+
if (Array.isArray(list) && typeof allEvents['bidResponse'] != 'undefined') {
|
|
158
|
+
let alreadyCalled = [];
|
|
159
|
+
allEvents['bidResponse'].forEach((bidResponse) => {
|
|
160
|
+
let tmpId = bidResponse['originalBidder'] + '_' + bidResponse['creativeId'];
|
|
161
|
+
if (list.includes(tmpId) && !alreadyCalled.includes(tmpId)) {
|
|
162
|
+
alreadyCalled.push(tmpId);
|
|
163
|
+
ajax(endpoint + '.oxxion.io/analytics/creatives', null, JSON.stringify(bidResponse), {method: 'POST', withCredentials: true});
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
allEvents = {};
|
|
168
|
+
}, JSON.stringify(auctionEnd), {method: 'POST', withCredentials: true});
|
|
169
|
+
auctionEnd = {};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
let oxxionAnalytics = Object.assign(adapter({url, analyticsType}), {
|
|
173
|
+
track({
|
|
174
|
+
eventType,
|
|
175
|
+
args
|
|
176
|
+
}) {
|
|
177
|
+
switch (eventType) {
|
|
178
|
+
case AUCTION_END:
|
|
179
|
+
addAuctionEnd(args);
|
|
180
|
+
handleAuctionEnd();
|
|
181
|
+
break;
|
|
182
|
+
case BID_WON:
|
|
183
|
+
handleBidWon(args);
|
|
184
|
+
break;
|
|
185
|
+
case BID_RESPONSE:
|
|
186
|
+
addBidResponse(args);
|
|
187
|
+
break;
|
|
188
|
+
case BID_REQUESTED:
|
|
189
|
+
addBidRequested(args);
|
|
190
|
+
break;
|
|
191
|
+
case BID_TIMEOUT:
|
|
192
|
+
addTimeout(args);
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}});
|
|
196
|
+
|
|
197
|
+
// save the base class function
|
|
198
|
+
oxxionAnalytics.originEnableAnalytics = oxxionAnalytics.enableAnalytics;
|
|
199
|
+
|
|
200
|
+
// override enableAnalytics so we can get access to the config passed in from the page
|
|
201
|
+
oxxionAnalytics.enableAnalytics = function (config) {
|
|
202
|
+
oxxionAnalytics.originEnableAnalytics(config); // call the base class function
|
|
203
|
+
initOptions = config.options;
|
|
204
|
+
if (initOptions.domain) { endpoint = 'https://' + initOptions.domain; }
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
adapterManager.registerAnalyticsAdapter({
|
|
208
|
+
adapter: oxxionAnalytics,
|
|
209
|
+
code: 'oxxion'
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
export default oxxionAnalytics;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
Module Name: oxxion Analytics Adapter
|
|
3
|
+
|
|
4
|
+
Module Type: Analytics Adapter
|
|
5
|
+
|
|
6
|
+
Maintainer: tech@oxxion.io
|
|
7
|
+
|
|
8
|
+
# Oxxion Analytics Adapter
|
|
9
|
+
|
|
10
|
+
Oxxion helps you to understand how your prebid stack performs.
|
|
11
|
+
|
|
12
|
+
# Integration
|
|
13
|
+
|
|
14
|
+
Add the oxxion analytics adapter module to your prebid configuration :
|
|
15
|
+
```
|
|
16
|
+
pbjs.enableAnalytics(
|
|
17
|
+
...
|
|
18
|
+
{
|
|
19
|
+
provider: 'oxxion',
|
|
20
|
+
options : {
|
|
21
|
+
domain: 'test.endpoint'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
...
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
# Parameters
|
|
29
|
+
|
|
30
|
+
| Name | Type | Description |
|
|
31
|
+
|:-------------------------------|:---------|:------------------------------------------------------------------------------------------------------------|
|
|
32
|
+
| domain | String | This string identifies yourself in Oxxion's systems and is provided to you by your Oxxion representative. |
|
|
33
|
+
|
package/modules/pairIdSystem.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { submodule } from '../src/hook.js';
|
|
9
9
|
import {getStorageManager} from '../src/storageManager.js'
|
|
10
|
-
import {
|
|
10
|
+
import { logInfo } from '../src/utils.js';
|
|
11
11
|
import {MODULE_TYPE_UID} from '../src/activities/modules.js';
|
|
12
12
|
|
|
13
13
|
const MODULE_NAME = 'pairId';
|
|
@@ -17,11 +17,11 @@ const DEFAULT_LIVERAMP_PAIR_ID_KEY = '_lr_pairId';
|
|
|
17
17
|
export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME});
|
|
18
18
|
|
|
19
19
|
function pairIdFromLocalStorage(key) {
|
|
20
|
-
return storage.localStorageIsEnabled ? storage.getDataFromLocalStorage(key) : null;
|
|
20
|
+
return storage.localStorageIsEnabled() ? storage.getDataFromLocalStorage(key) : null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function pairIdFromCookie(key) {
|
|
24
|
-
return storage.cookiesAreEnabled ? storage.getCookie(key) : null;
|
|
24
|
+
return storage.cookiesAreEnabled() ? storage.getCookie(key) : null;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/** @type {Submodule} */
|
|
@@ -32,11 +32,16 @@ export const pairIdSubmodule = {
|
|
|
32
32
|
*/
|
|
33
33
|
name: MODULE_NAME,
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
* used to specify vendor id
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
gvlid: 755,
|
|
39
|
+
/**
|
|
40
|
+
* decode the stored id value for passing to bid requests
|
|
41
|
+
* @function
|
|
42
|
+
* @param { string | undefined } value
|
|
43
|
+
* @returns {{pairId:string} | undefined }
|
|
44
|
+
*/
|
|
40
45
|
decode(value) {
|
|
41
46
|
return value && Array.isArray(value) ? {'pairId': value} : undefined
|
|
42
47
|
},
|
|
@@ -52,7 +57,7 @@ export const pairIdSubmodule = {
|
|
|
52
57
|
try {
|
|
53
58
|
ids = ids.concat(JSON.parse(atob(pairIdsString)))
|
|
54
59
|
} catch (error) {
|
|
55
|
-
|
|
60
|
+
logInfo(error)
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
|
|
@@ -64,12 +69,12 @@ export const pairIdSubmodule = {
|
|
|
64
69
|
const obj = JSON.parse(atob(liverampValue));
|
|
65
70
|
ids = ids.concat(obj.envelope);
|
|
66
71
|
} catch (error) {
|
|
67
|
-
|
|
72
|
+
logInfo(error)
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
if (ids.length == 0) {
|
|
72
|
-
|
|
77
|
+
logInfo('PairId not found.')
|
|
73
78
|
return undefined;
|
|
74
79
|
}
|
|
75
80
|
return {'id': ids};
|
|
@@ -88,23 +88,20 @@ function _createServerRequest(bidRequests, bidderRequest) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
function _assignSegments(bid) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
bid.ortb2.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
bid.ortb2.
|
|
99
|
-
|
|
100
|
-
contextual_categories: {},
|
|
101
|
-
}
|
|
102
|
-
);
|
|
91
|
+
var segs = (bid.ortb2 && bid.ortb2.user && bid.ortb2.user.ext && bid.ortb2.user.ext.data && bid.ortb2.user.ext.data.sd_rtd && bid.ortb2.user.ext.data.sd_rtd.segments ? bid.ortb2.user.ext.data.sd_rtd.segments : []);
|
|
92
|
+
var cats = {};
|
|
93
|
+
if (bid.ortb2 && bid.ortb2.site && bid.ortb2.site.ext && bid.ortb2.site.ext.data && bid.ortb2.site.ext.data.sd_rtd) {
|
|
94
|
+
if (bid.ortb2.site.ext.data.sd_rtd.categories) {
|
|
95
|
+
segs = segs.concat(bid.ortb2.site.ext.data.sd_rtd.categories);
|
|
96
|
+
}
|
|
97
|
+
if (bid.ortb2.site.ext.data.sd_rtd.categories_score) {
|
|
98
|
+
cats = bid.ortb2.site.ext.data.sd_rtd.categories_score;
|
|
99
|
+
}
|
|
103
100
|
}
|
|
104
101
|
|
|
105
102
|
return {
|
|
106
|
-
segments:
|
|
107
|
-
contextual_categories:
|
|
103
|
+
segments: segs,
|
|
104
|
+
contextual_categories: cats
|
|
108
105
|
};
|
|
109
106
|
}
|
|
110
107
|
|
|
@@ -54,7 +54,8 @@ export const spec = {
|
|
|
54
54
|
scr_rsl: raiGetResolution(),
|
|
55
55
|
cpuc: (typeof window.navigator != 'undefined' ? window.navigator.hardwareConcurrency : null),
|
|
56
56
|
kws: (!isEmpty(bid.params.keywords) ? bid.params.keywords : null),
|
|
57
|
-
schain: bid.schain
|
|
57
|
+
schain: bid.schain,
|
|
58
|
+
gpid: raiSetPbAdSlot(bid)
|
|
58
59
|
};
|
|
59
60
|
|
|
60
61
|
// TODO: is 'page' the right value here?
|
|
@@ -283,6 +284,14 @@ function raiGetResolution() {
|
|
|
283
284
|
return resolution;
|
|
284
285
|
}
|
|
285
286
|
|
|
287
|
+
function raiSetPbAdSlot(bid) {
|
|
288
|
+
let pbAdSlot = '';
|
|
289
|
+
if (deepAccess(bid, 'ortb2Imp.ext.data.pbadslot') != null) {
|
|
290
|
+
pbAdSlot = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot')
|
|
291
|
+
}
|
|
292
|
+
return pbAdSlot
|
|
293
|
+
}
|
|
294
|
+
|
|
286
295
|
function raiGetSyncInclude(config) {
|
|
287
296
|
try {
|
|
288
297
|
let raConfig = null;
|
|
@@ -417,7 +417,7 @@ function generateGeneralParams(generalObject, bidderRequest) {
|
|
|
417
417
|
device_type: getDeviceType(navigator.userAgent),
|
|
418
418
|
ua: navigator.userAgent,
|
|
419
419
|
is_wrapper: !!generalBidParams.isWrapper,
|
|
420
|
-
session_id: generalBidParams.sessionId || getBidIdParameter('
|
|
420
|
+
session_id: generalBidParams.sessionId || getBidIdParameter('bidderRequestId', generalObject),
|
|
421
421
|
tmax: timeout
|
|
422
422
|
};
|
|
423
423
|
|
|
@@ -168,6 +168,10 @@ import {find} from '../../src/polyfill.js';
|
|
|
168
168
|
import {timedAuctionHook} from '../../src/utils/perfMetrics.js';
|
|
169
169
|
import {GDPR_GVLIDS} from '../../src/consentHandler.js';
|
|
170
170
|
import {MODULE_TYPE_RTD} from '../../src/activities/modules.js';
|
|
171
|
+
import {guardOrtb2Fragments} from '../../libraries/objectGuard/ortbGuard.js';
|
|
172
|
+
import {activityParamsBuilder} from '../../src/activities/params.js';
|
|
173
|
+
|
|
174
|
+
const activityParams = activityParamsBuilder((al) => adapterManager.resolveAlias(al));
|
|
171
175
|
|
|
172
176
|
/** @type {string} */
|
|
173
177
|
const MODULE_NAME = 'realTimeData';
|
|
@@ -299,6 +303,7 @@ export const setBidRequestsData = timedAuctionHook('rtd', function setBidRequest
|
|
|
299
303
|
let callbacksExpected = prioritySubModules.length;
|
|
300
304
|
let isDone = false;
|
|
301
305
|
let waitTimeout;
|
|
306
|
+
const verifiers = [];
|
|
302
307
|
|
|
303
308
|
if (!relevantSubModules.length) {
|
|
304
309
|
return exitHook();
|
|
@@ -307,7 +312,12 @@ export const setBidRequestsData = timedAuctionHook('rtd', function setBidRequest
|
|
|
307
312
|
waitTimeout = setTimeout(exitHook, shouldDelayAuction ? _moduleConfig.auctionDelay : 0);
|
|
308
313
|
|
|
309
314
|
relevantSubModules.forEach(sm => {
|
|
310
|
-
|
|
315
|
+
const fpdGuard = guardOrtb2Fragments(reqBidsConfigObj.ortb2Fragments || {}, activityParams(MODULE_TYPE_RTD, sm.name));
|
|
316
|
+
verifiers.push(fpdGuard.verify);
|
|
317
|
+
sm.getBidRequestData({
|
|
318
|
+
...reqBidsConfigObj,
|
|
319
|
+
ortb2Fragments: fpdGuard.obj
|
|
320
|
+
}, onGetBidRequestDataCallback.bind(sm), sm.config, _userConsent)
|
|
311
321
|
});
|
|
312
322
|
|
|
313
323
|
function onGetBidRequestDataCallback() {
|
|
@@ -328,6 +338,7 @@ export const setBidRequestsData = timedAuctionHook('rtd', function setBidRequest
|
|
|
328
338
|
}
|
|
329
339
|
isDone = true;
|
|
330
340
|
clearTimeout(waitTimeout);
|
|
341
|
+
verifiers.forEach(fn => fn());
|
|
331
342
|
fn.call(this, reqBidsConfigObj);
|
|
332
343
|
}
|
|
333
344
|
});
|
package/modules/schain.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isInteger,
|
|
11
11
|
_each,
|
|
12
12
|
logWarn,
|
|
13
|
-
deepAccess, deepSetValue
|
|
13
|
+
deepAccess, deepSetValue, deepClone
|
|
14
14
|
} from '../src/utils.js';
|
|
15
15
|
import {registerOrtbProcessor, REQUEST} from '../src/pbjsORTB.js';
|
|
16
16
|
|
|
@@ -180,7 +180,7 @@ export function makeBidRequestsHook(fn, bidderRequests) {
|
|
|
180
180
|
bidderRequest.bids.forEach(bid => {
|
|
181
181
|
let result = resolveSchainConfig(schainConfig, bidder);
|
|
182
182
|
if (result) {
|
|
183
|
-
bid.schain = result;
|
|
183
|
+
bid.schain = deepClone(result);
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
});
|
|
@@ -93,8 +93,8 @@ export const sharethroughAdapterSpec = {
|
|
|
93
93
|
if (videoRequest) {
|
|
94
94
|
// default playerSize, only change this if we know width and height are properly defined in the request
|
|
95
95
|
let [w, h] = [640, 360];
|
|
96
|
-
if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[1]) {
|
|
97
|
-
[w, h] = videoRequest.playerSize;
|
|
96
|
+
if (videoRequest.playerSize && videoRequest.playerSize[0] && videoRequest.playerSize[0][0] && videoRequest.playerSize[0][1]) {
|
|
97
|
+
[w, h] = videoRequest.playerSize[0];
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
impression.video = {
|