prebid.js 8.0.0 → 8.2.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/.devcontainer/devcontainer.json +3 -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/admanBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bedigitechBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -0
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/cmp.js +1 -0
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/conceptxBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementGpp.js +1 -1
- package/dist/consentManagementUsp.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 +15 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freepassBidAdapter.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gppControl_usnat.js +1 -0
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kiviadsBidAdapter.js +1 -0
- 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/liveIntentIdSystem.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/mgidXBidAdapter.js +1 -0
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/mspa.js +1 -0
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +146 -139
- 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 -1
- package/dist/oxxionRtdProvider.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.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/riseBidAdapter.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/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/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.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/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/libraries/cmp/cmpClient.js +139 -0
- package/libraries/mspa/activityControls.js +91 -0
- package/modules/admanBidAdapter.js +5 -0
- package/modules/amxBidAdapter.js +11 -12
- package/modules/bedigitechBidAdapter.js +15 -12
- package/modules/bedigitechBidAdapter.md +2 -2
- package/modules/beopBidAdapter.js +0 -4
- package/modules/bidwatchAnalyticsAdapter.js +33 -5
- package/modules/bridBidAdapter.js +223 -0
- package/modules/categoryTranslation.js +3 -2
- package/modules/colossussspBidAdapter.js +9 -0
- package/modules/conceptxBidAdapter.js +6 -3
- package/modules/consentManagement.js +12 -86
- package/modules/consentManagementGpp.js +47 -126
- package/modules/consentManagementUsp.js +19 -97
- package/modules/freepassBidAdapter.js +98 -0
- package/modules/freepassBidAdapter.md +31 -0
- package/modules/freepassIdSystem.md +1 -1
- package/modules/gppControl_usnat.js +11 -0
- package/modules/greenbidsAnalyticsAdapter.js +7 -13
- package/modules/gridBidAdapter.js +3 -4
- package/modules/intentIqIdSystem.js +11 -9
- package/modules/ixBidAdapter.js +284 -55
- package/modules/kiviadsBidAdapter.js +212 -0
- package/modules/kiviadsBidAdapter.md +79 -0
- package/modules/liveIntentIdSystem.js +8 -3
- package/modules/mediasquareBidAdapter.js +19 -23
- package/modules/mgidXBidAdapter.js +263 -0
- package/modules/mgidXBidAdapter.md +79 -0
- package/modules/oxxionAnalyticsAdapter.js +33 -5
- package/modules/oxxionRtdProvider.js +124 -11
- package/modules/oxxionRtdProvider.md +19 -4
- package/modules/pubmaticBidAdapter.js +18 -2
- package/modules/rtbhouseBidAdapter.js +9 -2
- package/modules/rtbhouseBidAdapter.md +27 -8
- package/modules/rubiconBidAdapter.js +13 -1
- package/modules/sharethroughBidAdapter.js +14 -0
- package/modules/sonobiBidAdapter.js +4 -7
- package/modules/tripleliftBidAdapter.js +21 -1
- package/modules/userId/eids.js +29 -0
- package/modules/userId/eids.md +19 -2
- package/modules/userId/index.js +78 -29
- package/modules/userId/userId.md +3 -0
- package/package.json +1 -1
- package/src/activities/params.js +4 -1
- package/test/spec/libraries/cmp/cmpClient_spec.js +233 -0
- package/test/spec/libraries/mspa/activityControls_spec.js +315 -0
- package/test/spec/modules/admanBidAdapter_spec.js +8 -2
- package/test/spec/modules/adqueryBidAdapter_spec.js +5 -1
- package/test/spec/modules/amxBidAdapter_spec.js +6 -3
- package/test/spec/modules/bedigitechBidAdapter_spec.js +25 -36
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +21 -1
- package/test/spec/modules/bridBidAdapter_spec.js +129 -0
- package/test/spec/modules/byDataAnalyticsAdapter_spec.js +9 -7
- package/test/spec/modules/chtnwBidAdapter_spec.js +4 -1
- package/test/spec/modules/colossussspBidAdapter_spec.js +29 -0
- package/test/spec/modules/consentManagementGpp_spec.js +84 -7
- package/test/spec/modules/consentManagement_spec.js +8 -18
- package/test/spec/modules/datablocksBidAdapter_spec.js +7 -3
- package/test/spec/modules/eids_spec.js +87 -0
- package/test/spec/modules/freepassBidAdapter_spec.js +161 -0
- package/test/spec/modules/greenbidsAnalyticsAdapter_spec.js +0 -15
- package/test/spec/modules/gridBidAdapter_spec.js +29 -28
- package/test/spec/modules/insticatorBidAdapter_spec.js +6 -2
- package/test/spec/modules/intentIqIdSystem_spec.js +36 -2
- package/test/spec/modules/ixBidAdapter_spec.js +785 -15
- package/test/spec/modules/kiviadsBidAdapter_spec.js +404 -0
- package/test/spec/modules/lassoBidAdapter_spec.js +6 -4
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +17 -2
- package/test/spec/modules/liveIntentIdSystem_spec.js +11 -6
- package/test/spec/modules/mediasquareBidAdapter_spec.js +3 -0
- package/test/spec/modules/mgidXBidAdapter_spec.js +426 -0
- package/test/spec/modules/onetagBidAdapter_spec.js +81 -75
- package/test/spec/modules/orbidderBidAdapter_spec.js +6 -3
- package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +21 -2
- package/test/spec/modules/oxxionRtdProvider_spec.js +113 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +25 -0
- package/test/spec/modules/relaidoBidAdapter_spec.js +4 -3
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +35 -0
- package/test/spec/modules/rubiconBidAdapter_spec.js +41 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +75 -0
- package/test/spec/modules/sonobiBidAdapter_spec.js +15 -15
- package/test/spec/modules/tripleliftBidAdapter_spec.js +20 -1
- package/test/spec/modules/ucfunnelBidAdapter_spec.js +37 -16
- package/test/spec/modules/userId_spec.js +393 -6
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { submodule } from '../src/hook.js'
|
|
2
|
-
import { deepAccess, logInfo } from '../src/utils.js'
|
|
2
|
+
import { deepAccess, logInfo, logError } from '../src/utils.js'
|
|
3
|
+
import { ajax } from '../src/ajax.js';
|
|
4
|
+
import adapterManager from '../src/adapterManager.js';
|
|
3
5
|
|
|
4
6
|
const oxxionRtdSearchFor = [ 'adUnitCode', 'auctionId', 'bidder', 'bidderCode', 'bidId', 'cpm', 'creativeId', 'currency', 'width', 'height', 'mediaType', 'netRevenue', 'originalCpm', 'originalCurrency', 'requestId', 'size', 'source', 'status', 'timeToRespond', 'transactionId', 'ttl', 'sizes', 'mediaTypes', 'src', 'userId', 'labelAny', 'adId' ];
|
|
5
7
|
const LOG_PREFIX = 'oxxionRtdProvider submodule: ';
|
|
6
8
|
|
|
7
9
|
const allAdUnits = [];
|
|
10
|
+
const bidderAliasRegistry = adapterManager.aliasRegistry || {};
|
|
8
11
|
|
|
9
12
|
/** @type {RtdSubmodule} */
|
|
10
13
|
export const oxxionSubmodule = {
|
|
@@ -12,23 +15,56 @@ export const oxxionSubmodule = {
|
|
|
12
15
|
init: init,
|
|
13
16
|
getBidRequestData: getAdUnits,
|
|
14
17
|
onBidResponseEvent: insertVideoTracking,
|
|
18
|
+
getRequestsList: getRequestsList,
|
|
19
|
+
getFilteredAdUnitsOnBidRates: getFilteredAdUnitsOnBidRates,
|
|
15
20
|
};
|
|
16
21
|
|
|
17
22
|
function init(config, userConsent) {
|
|
18
|
-
if (!config.params || !config.params.domain
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
return
|
|
23
|
+
if (!config.params || !config.params.domain) { return false }
|
|
24
|
+
if (config.params.contexts && Array.isArray(config.params.contexts) && config.params.contexts.length > 0) { return true; }
|
|
25
|
+
if (typeof config.params.threshold != 'undefined' && typeof config.params.samplingRate == 'number') { return true }
|
|
26
|
+
return false;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
function getAdUnits(reqBidsConfigObj, callback, config, userConsent) {
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
logInfo(LOG_PREFIX + 'started with ', config);
|
|
31
|
+
if (typeof config.params.threshold != 'undefined' && typeof config.params.samplingRate == 'number') {
|
|
32
|
+
let filteredBids;
|
|
33
|
+
const requests = getRequestsList(reqBidsConfigObj);
|
|
34
|
+
const gdpr = userConsent && userConsent.gdpr ? userConsent.gdpr.consentString : null;
|
|
35
|
+
const payload = {
|
|
36
|
+
gdpr,
|
|
37
|
+
requests
|
|
38
|
+
};
|
|
39
|
+
const endpoint = 'https://' + config.params.domain + '.oxxion.io/analytics/bid_rate_interests';
|
|
40
|
+
getPromisifiedAjax(endpoint, JSON.stringify(payload), {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
withCredentials: true
|
|
43
|
+
}).then(bidsRateInterests => {
|
|
44
|
+
if (bidsRateInterests.length) {
|
|
45
|
+
[reqBidsConfigObj.adUnits, filteredBids] = getFilteredAdUnitsOnBidRates(bidsRateInterests, reqBidsConfigObj.adUnits, config.params, true);
|
|
30
46
|
}
|
|
31
|
-
|
|
47
|
+
if (filteredBids.length > 0) {
|
|
48
|
+
getPromisifiedAjax('https://' + config.params.domain + '.oxxion.io/analytics/request_rejecteds', JSON.stringify({'bids': filteredBids, 'gdpr': gdpr}), {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
withCredentials: true
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (typeof callback == 'function') { callback(); }
|
|
54
|
+
}).catch(error => logError(LOG_PREFIX, 'bidInterestError', error));
|
|
55
|
+
}
|
|
56
|
+
if (config.params.contexts && Array.isArray(config.params.contexts) && config.params.contexts.length > 0) {
|
|
57
|
+
const reqAdUnits = reqBidsConfigObj.adUnits;
|
|
58
|
+
if (Array.isArray(reqAdUnits)) {
|
|
59
|
+
reqAdUnits.forEach(adunit => {
|
|
60
|
+
if (config.params.contexts.includes(deepAccess(adunit, 'mediaTypes.video.context'))) {
|
|
61
|
+
allAdUnits.push(adunit);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (!(typeof config.params.threshold != 'undefined' && typeof config.params.samplingRate == 'number') && typeof callback == 'function') {
|
|
66
|
+
callback();
|
|
67
|
+
}
|
|
32
68
|
}
|
|
33
69
|
}
|
|
34
70
|
|
|
@@ -94,4 +130,81 @@ function getImpUrl(config, data, maxCpm) {
|
|
|
94
130
|
return trackingImpUrl + 'cpmIncrement=' + cpmIncrement + '&context=' + context;
|
|
95
131
|
}
|
|
96
132
|
|
|
133
|
+
function getPromisifiedAjax (url, data = {}, options = {}) {
|
|
134
|
+
return new Promise((resolve, reject) => {
|
|
135
|
+
const callbacks = {
|
|
136
|
+
success(responseText, { response }) {
|
|
137
|
+
resolve(JSON.parse(response));
|
|
138
|
+
},
|
|
139
|
+
error(error) {
|
|
140
|
+
reject(error);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
ajax(url, callbacks, data, options);
|
|
144
|
+
})
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function getFilteredAdUnitsOnBidRates (bidsRateInterests, adUnits, params, useSampling) {
|
|
148
|
+
const { threshold, samplingRate } = params;
|
|
149
|
+
const filteredBids = [];
|
|
150
|
+
// Separate bidsRateInterests in two groups against threshold & samplingRate
|
|
151
|
+
const { interestingBidsRates, uninterestingBidsRates } = bidsRateInterests.reduce((acc, interestingBid) => {
|
|
152
|
+
const isBidRateUpper = typeof threshold == 'number' ? interestingBid.rate === true || interestingBid.rate > threshold : interestingBid.suggestion;
|
|
153
|
+
const isBidInteresting = isBidRateUpper || (getRandomNumber(100) < samplingRate && useSampling);
|
|
154
|
+
const key = isBidInteresting ? 'interestingBidsRates' : 'uninterestingBidsRates';
|
|
155
|
+
acc[key].push(interestingBid);
|
|
156
|
+
return acc;
|
|
157
|
+
}, {
|
|
158
|
+
interestingBidsRates: [],
|
|
159
|
+
uninterestingBidsRates: [] // Do something with later
|
|
160
|
+
});
|
|
161
|
+
logInfo(LOG_PREFIX, 'getFilteredAdUnitsOnBidRates()', interestingBidsRates, uninterestingBidsRates);
|
|
162
|
+
// Filter bids and adUnits against interesting bids rates
|
|
163
|
+
const newAdUnits = adUnits.filter(({ bids = [] }, adUnitIndex) => {
|
|
164
|
+
adUnits[adUnitIndex].bids = bids.filter(bid => {
|
|
165
|
+
if (!params.bidders || params.bidders.includes(bid.bidder)) {
|
|
166
|
+
const index = interestingBidsRates.findIndex(({ id }) => id === bid._id);
|
|
167
|
+
if (index == -1) {
|
|
168
|
+
let tmpBid = bid;
|
|
169
|
+
tmpBid['code'] = adUnits[adUnitIndex].code;
|
|
170
|
+
tmpBid['mediaTypes'] = adUnits[adUnitIndex].mediaTypes;
|
|
171
|
+
tmpBid['originalBidder'] = bidderAliasRegistry[bid.bidder] || bid.bidder;
|
|
172
|
+
if (tmpBid.floorData) {
|
|
173
|
+
delete tmpBid.floorData;
|
|
174
|
+
}
|
|
175
|
+
filteredBids.push(tmpBid);
|
|
176
|
+
}
|
|
177
|
+
delete bid._id;
|
|
178
|
+
return index !== -1;
|
|
179
|
+
} else {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
return !!adUnits[adUnitIndex].bids.length;
|
|
184
|
+
});
|
|
185
|
+
return [newAdUnits, filteredBids];
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function getRandomNumber (max = 10) {
|
|
189
|
+
return Math.round(Math.random() * max);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function getRequestsList(reqBidsConfigObj) {
|
|
193
|
+
let count = 0;
|
|
194
|
+
return reqBidsConfigObj.adUnits.flatMap(({
|
|
195
|
+
bids = [],
|
|
196
|
+
mediaTypes = {},
|
|
197
|
+
code = ''
|
|
198
|
+
}) => bids.reduce((acc, { bidder = '', params = {} }, index) => {
|
|
199
|
+
const id = count++;
|
|
200
|
+
bids[index]._id = id;
|
|
201
|
+
return acc.concat({
|
|
202
|
+
id,
|
|
203
|
+
adUnit: code,
|
|
204
|
+
bidder,
|
|
205
|
+
mediaTypes,
|
|
206
|
+
});
|
|
207
|
+
}, []));
|
|
208
|
+
}
|
|
209
|
+
|
|
97
210
|
submodule('realTimeData', oxxionSubmodule);
|
|
@@ -7,12 +7,12 @@ Maintainer: tech@oxxion.io
|
|
|
7
7
|
# Oxxion Real-Time-Data submodule
|
|
8
8
|
|
|
9
9
|
Oxxion helps you to understand how your prebid stack performs.
|
|
10
|
-
This Rtd module is to use in order to improve video events tracking.
|
|
10
|
+
This Rtd module is to use in order to improve video events tracking and/or to filter bidder requested.
|
|
11
11
|
|
|
12
12
|
# Integration
|
|
13
13
|
|
|
14
14
|
Make sure to have the following modules listed while building prebid : `rtdModule,oxxionRtdProvider`
|
|
15
|
-
`
|
|
15
|
+
`rtdModule` is required to activate real-time-data submodules.
|
|
16
16
|
For example :
|
|
17
17
|
```
|
|
18
18
|
gulp build --modules=schain,priceFloors,currency,consentManagement,appnexusBidAdapter,rubiconBidAdapter,rtdModule,oxxionRtdProvider
|
|
@@ -23,7 +23,7 @@ Then add the oxxion Rtd module to your prebid configuration :
|
|
|
23
23
|
pbjs.setConfig(
|
|
24
24
|
...
|
|
25
25
|
realTimeData: {
|
|
26
|
-
auctionDelay:
|
|
26
|
+
auctionDelay: 300,
|
|
27
27
|
dataProviders: [
|
|
28
28
|
{
|
|
29
29
|
name: "oxxionRtd",
|
|
@@ -31,6 +31,8 @@ pbjs.setConfig(
|
|
|
31
31
|
params: {
|
|
32
32
|
domain: "test.endpoint",
|
|
33
33
|
contexts: ["instream"],
|
|
34
|
+
threshold: false,
|
|
35
|
+
samplingRate: 10,
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
]
|
|
@@ -39,10 +41,23 @@ pbjs.setConfig(
|
|
|
39
41
|
)
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
# setConfig Parameters
|
|
44
|
+
# setConfig Parameters General
|
|
43
45
|
|
|
44
46
|
| Name | Type | Description |
|
|
45
47
|
|:---------------------------------|:---------|:------------------------------------------------------------------------------------------------------------|
|
|
46
48
|
| domain | String | This string identifies yourself in Oxxion's systems and is provided to you by your Oxxion representative. |
|
|
49
|
+
|
|
50
|
+
# setConfig Parameters for Video Tracking
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description |
|
|
53
|
+
|:---------------------------------|:---------|:------------------------------------------------------------------------------------------------------------|
|
|
47
54
|
| contexts | Array | Array defining which video contexts to add tracking events into. Values can be instream and/or outstream. |
|
|
48
55
|
|
|
56
|
+
# setConfig Parameters for bidder filtering
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description |
|
|
59
|
+
|:---------------------------------|:-----------|:------------------------------------------------------------------------------------------------------------|
|
|
60
|
+
| threshold | Float/Bool | False or minimum expected bid rate to call a bidder (ex: 1.0 for 1% bid rate). |
|
|
61
|
+
| samplingRate | Integer | Percentage of request not meeting the criterias to run anyway in order to check for any change. |
|
|
62
|
+
| bidders | Array | Optional: If set, filtering will only be applied to bidders listed.
|
|
63
|
+
|
|
@@ -630,7 +630,7 @@ function _addJWPlayerSegmentData(imp, bid) {
|
|
|
630
630
|
ext && ext.key_val === undefined ? ext.key_val = jwPlayerData : ext.key_val += '|' + jwPlayerData;
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
-
function _createImpressionObject(bid) {
|
|
633
|
+
function _createImpressionObject(bid, bidderRequest) {
|
|
634
634
|
var impObj = {};
|
|
635
635
|
var bannerObj;
|
|
636
636
|
var videoObj;
|
|
@@ -638,6 +638,7 @@ function _createImpressionObject(bid) {
|
|
|
638
638
|
var sizes = bid.hasOwnProperty('sizes') ? bid.sizes : [];
|
|
639
639
|
var mediaTypes = '';
|
|
640
640
|
var format = [];
|
|
641
|
+
var isFledgeEnabled = bidderRequest?.fledgeEnabled;
|
|
641
642
|
|
|
642
643
|
impObj = {
|
|
643
644
|
id: bid.bidId,
|
|
@@ -708,11 +709,26 @@ function _createImpressionObject(bid) {
|
|
|
708
709
|
|
|
709
710
|
_addFloorFromFloorModule(impObj, bid);
|
|
710
711
|
|
|
712
|
+
_addFledgeflag(impObj, bid, isFledgeEnabled)
|
|
713
|
+
|
|
711
714
|
return impObj.hasOwnProperty(BANNER) ||
|
|
712
715
|
impObj.hasOwnProperty(NATIVE) ||
|
|
713
716
|
(FEATURES.VIDEO && impObj.hasOwnProperty(VIDEO)) ? impObj : UNDEFINED;
|
|
714
717
|
}
|
|
715
718
|
|
|
719
|
+
function _addFledgeflag(impObj, bid, isFledgeEnabled) {
|
|
720
|
+
if (isFledgeEnabled) {
|
|
721
|
+
impObj.ext = impObj.ext || {};
|
|
722
|
+
if (bid?.ortb2Imp?.ext?.ae !== undefined) {
|
|
723
|
+
impObj.ext.ae = bid.ortb2Imp.ext.ae;
|
|
724
|
+
}
|
|
725
|
+
} else {
|
|
726
|
+
if (impObj.ext?.ae) {
|
|
727
|
+
delete impObj.ext.ae;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
716
732
|
function _addImpressionFPD(imp, bid) {
|
|
717
733
|
const ortb2 = {...deepAccess(bid, 'ortb2Imp.ext.data')};
|
|
718
734
|
Object.keys(ortb2).forEach(prop => {
|
|
@@ -1095,7 +1111,7 @@ export const spec = {
|
|
|
1095
1111
|
if (bid.params.hasOwnProperty('acat') && isArray(bid.params.acat)) {
|
|
1096
1112
|
allowedIabCategories = allowedIabCategories.concat(bid.params.acat);
|
|
1097
1113
|
}
|
|
1098
|
-
var impObj = _createImpressionObject(bid);
|
|
1114
|
+
var impObj = _createImpressionObject(bid, bidderRequest);
|
|
1099
1115
|
if (impObj) {
|
|
1100
1116
|
payload.imp.push(impObj);
|
|
1101
1117
|
}
|
|
@@ -10,6 +10,9 @@ const BIDDER_CODE = 'rtbhouse';
|
|
|
10
10
|
const REGIONS = ['prebid-eu', 'prebid-us', 'prebid-asia'];
|
|
11
11
|
const ENDPOINT_URL = 'creativecdn.com/bidder/prebid/bids';
|
|
12
12
|
const FLEDGE_ENDPOINT_URL = 'creativecdn.com/bidder/prebidfledge/bids';
|
|
13
|
+
const FLEDGE_SELLER_URL = 'https://fledge-ssp.creativecdn.com';
|
|
14
|
+
const FLEDGE_DECISION_LOGIC_URL = 'https://fledge-ssp.creativecdn.com/component-seller-prebid.js';
|
|
15
|
+
|
|
13
16
|
const DEFAULT_CURRENCY_ARR = ['USD']; // NOTE - USD is the only supported currency right now; Hardcoded for bids
|
|
14
17
|
const SUPPORTED_MEDIA_TYPES = [BANNER, NATIVE];
|
|
15
18
|
const TTL = 55;
|
|
@@ -94,8 +97,12 @@ export const spec = {
|
|
|
94
97
|
|
|
95
98
|
let computedEndpointUrl = ENDPOINT_URL;
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
if (bidderRequest.fledgeEnabled) {
|
|
101
|
+
const fledgeConfig = config.getConfig('fledgeConfig') || {
|
|
102
|
+
seller: FLEDGE_SELLER_URL,
|
|
103
|
+
decisionLogicUrl: FLEDGE_DECISION_LOGIC_URL,
|
|
104
|
+
sellerTimeout: 500
|
|
105
|
+
};
|
|
99
106
|
mergeDeep(request, { ext: { fledge_config: fledgeConfig } });
|
|
100
107
|
computedEndpointUrl = FLEDGE_ENDPOINT_URL;
|
|
101
108
|
}
|
|
@@ -81,11 +81,30 @@ The following steps should be taken to setup Protected Audience for RTB House:
|
|
|
81
81
|
module documentation.
|
|
82
82
|
|
|
83
83
|
a. Make sure to enable RTB House bidder to participate in FLEDGE. If there are any other bidders to be allowed for that, add them to the **bidders** array:
|
|
84
|
-
```javascript
|
|
85
|
-
pbjs.setBidderConfig({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
91
|
-
```
|
|
84
|
+
```javascript
|
|
85
|
+
pbjs.setBidderConfig({
|
|
86
|
+
bidders: ["rtbhouse"],
|
|
87
|
+
config: {
|
|
88
|
+
fledgeEnabled: true
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
b. If you as a publisher have your own [decisionLogicUrl](https://github.com/WICG/turtledove/blob/main/FLEDGE.md#21-initiating-an-on-device-auction)
|
|
94
|
+
you may utilize it by setting up a dedicated `fledgeConfig` object:
|
|
95
|
+
```javascript
|
|
96
|
+
pbjs.setBidderConfig({
|
|
97
|
+
bidders: ["rtbhouse"],
|
|
98
|
+
config: {
|
|
99
|
+
fledgeEnabled: true,
|
|
100
|
+
fledgeConfig: {
|
|
101
|
+
seller: 'https://seller.domain',
|
|
102
|
+
decisionLogicUrl: 'https://seller.domain/decisionLogicFile.js',
|
|
103
|
+
sellerTimeout: 100
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
The `decisionLogicUrl` must be in the same domain as `seller` and has to respond with `X-Allow-FLEDGE: true` http header.
|
|
109
|
+
|
|
110
|
+
`sellerTimeout` is optional, defaults to 50 as per spec, will be clamped to 500 if greater.
|
|
@@ -383,6 +383,8 @@ export const spec = {
|
|
|
383
383
|
'gdpr',
|
|
384
384
|
'gdpr_consent',
|
|
385
385
|
'us_privacy',
|
|
386
|
+
'gpp',
|
|
387
|
+
'gpp_sid',
|
|
386
388
|
'rp_schain',
|
|
387
389
|
].concat(Object.keys(params).filter(item => containsUId.test(item)))
|
|
388
390
|
.concat([
|
|
@@ -554,6 +556,11 @@ export const spec = {
|
|
|
554
556
|
data['us_privacy'] = encodeURIComponent(bidderRequest.uspConsent);
|
|
555
557
|
}
|
|
556
558
|
|
|
559
|
+
if (bidderRequest.gppConsent?.gppString) {
|
|
560
|
+
data['gpp'] = bidderRequest.gppConsent.gppString;
|
|
561
|
+
data['gpp_sid'] = bidderRequest.gppConsent?.applicableSections?.toString();
|
|
562
|
+
}
|
|
563
|
+
|
|
557
564
|
data['rp_maxbids'] = bidderRequest.bidLimit || 1;
|
|
558
565
|
|
|
559
566
|
applyFPD(bidRequest, BANNER, data);
|
|
@@ -696,7 +703,7 @@ export const spec = {
|
|
|
696
703
|
return (adB.cpm || 0.0) - (adA.cpm || 0.0);
|
|
697
704
|
});
|
|
698
705
|
},
|
|
699
|
-
getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent) {
|
|
706
|
+
getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent, gppConsent) {
|
|
700
707
|
if (!hasSynced && syncOptions.iframeEnabled) {
|
|
701
708
|
// data is only assigned if params are available to pass to syncEndpoint
|
|
702
709
|
let params = {};
|
|
@@ -714,6 +721,11 @@ export const spec = {
|
|
|
714
721
|
params['us_privacy'] = encodeURIComponent(uspConsent);
|
|
715
722
|
}
|
|
716
723
|
|
|
724
|
+
if (gppConsent?.gppString) {
|
|
725
|
+
params['gpp'] = gppConsent.gppString;
|
|
726
|
+
params['gpp_sid'] = gppConsent.applicableSections?.toString();
|
|
727
|
+
}
|
|
728
|
+
|
|
717
729
|
params = Object.keys(params).length ? `?${formatQS(params)}` : '';
|
|
718
730
|
|
|
719
731
|
hasSynced = true;
|
|
@@ -154,6 +154,7 @@ export const sharethroughAdapterSpec = {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
return body.seatbid[0].bid.map(bid => {
|
|
157
|
+
// Spec: https://docs.prebid.org/dev-docs/bidder-adaptor.html#interpreting-the-response
|
|
157
158
|
const response = {
|
|
158
159
|
requestId: bid.impid,
|
|
159
160
|
width: +bid.w,
|
|
@@ -169,6 +170,19 @@ export const sharethroughAdapterSpec = {
|
|
|
169
170
|
nurl: bid.nurl,
|
|
170
171
|
meta: {
|
|
171
172
|
advertiserDomains: bid.adomain || [],
|
|
173
|
+
networkId: bid.ext?.networkId || null,
|
|
174
|
+
networkName: bid.ext?.networkName || null,
|
|
175
|
+
agencyId: bid.ext?.agencyId || null,
|
|
176
|
+
agencyName: bid.ext?.agencyName || null,
|
|
177
|
+
advertiserId: bid.ext?.advertiserId || null,
|
|
178
|
+
advertiserName: bid.ext?.advertiserName || null,
|
|
179
|
+
brandId: bid.ext?.brandId || null,
|
|
180
|
+
brandName: bid.ext?.brandName || null,
|
|
181
|
+
demandSource: bid.ext?.demandSource || null,
|
|
182
|
+
dchain: bid.ext?.dchain || null,
|
|
183
|
+
primaryCatId: bid.ext?.primaryCatId || null,
|
|
184
|
+
secondaryCatIds: bid.ext?.secondaryCatIds || null,
|
|
185
|
+
mediaType: bid.ext?.mediaType || null,
|
|
172
186
|
},
|
|
173
187
|
};
|
|
174
188
|
|
|
@@ -5,7 +5,7 @@ import { config } from '../src/config.js';
|
|
|
5
5
|
import { Renderer } from '../src/Renderer.js';
|
|
6
6
|
import { userSync } from '../src/userSync.js';
|
|
7
7
|
import { bidderSettings } from '../src/bidderSettings.js';
|
|
8
|
-
import {getAllOrtbKeywords} from '../libraries/keywords/keywords.js';
|
|
8
|
+
import { getAllOrtbKeywords } from '../libraries/keywords/keywords.js';
|
|
9
9
|
const BIDDER_CODE = 'sonobi';
|
|
10
10
|
const STR_ENDPOINT = 'https://apex.go.sonobi.com/trinity.json';
|
|
11
11
|
const PAGEVIEW_ID = generateUUID();
|
|
@@ -39,8 +39,8 @@ export const spec = {
|
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
41
|
} else if (deepAccess(bid, 'mediaTypes.video')) {
|
|
42
|
-
if (deepAccess(bid, 'mediaTypes.video.context') === 'outstream' && !bid.
|
|
43
|
-
//
|
|
42
|
+
if (deepAccess(bid, 'mediaTypes.video.context') === 'outstream' && !deepAccess(bid, 'mediaTypes.video.playerSize')) {
|
|
43
|
+
// playerSize is required for outstream video adUnits
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
if (deepAccess(bid, 'mediaTypes.video.context') === 'instream' && !deepAccess(bid, 'mediaTypes.video.playerSize')) {
|
|
@@ -248,10 +248,7 @@ export const spec = {
|
|
|
248
248
|
bidRequest,
|
|
249
249
|
'renderer.options'
|
|
250
250
|
));
|
|
251
|
-
let videoSize = deepAccess(bidRequest, '
|
|
252
|
-
if (Array.isArray(videoSize) && Array.isArray(videoSize[0])) { // handle case of multiple sizes
|
|
253
|
-
videoSize = videoSize[0]; // Only take the first size for outstream
|
|
254
|
-
}
|
|
251
|
+
let videoSize = deepAccess(bidRequest, 'mediaTypes.video.playerSize');
|
|
255
252
|
if (videoSize) {
|
|
256
253
|
bids.width = videoSize[0];
|
|
257
254
|
bids.height = videoSize[1];
|
|
@@ -56,6 +56,10 @@ export const tripleliftAdapterSpec = {
|
|
|
56
56
|
tlCall = tryAppendQueryString(tlCall, 'us_privacy', bidderRequest.uspConsent);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
if (bidderRequest && bidderRequest.fledgeEnabled) {
|
|
60
|
+
tlCall = tryAppendQueryString(tlCall, 'fledge', bidderRequest.fledgeEnabled);
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
if (config.getConfig('coppa') === true) {
|
|
60
64
|
tlCall = tryAppendQueryString(tlCall, 'coppa', true);
|
|
61
65
|
}
|
|
@@ -80,7 +84,7 @@ export const tripleliftAdapterSpec = {
|
|
|
80
84
|
});
|
|
81
85
|
},
|
|
82
86
|
|
|
83
|
-
getUserSyncs: function(syncOptions, responses, gdprConsent, usPrivacy) {
|
|
87
|
+
getUserSyncs: function(syncOptions, responses, gdprConsent, usPrivacy, gppConsent) {
|
|
84
88
|
let syncType = _getSyncType(syncOptions);
|
|
85
89
|
if (!syncType) return;
|
|
86
90
|
|
|
@@ -100,6 +104,15 @@ export const tripleliftAdapterSpec = {
|
|
|
100
104
|
syncEndpoint = tryAppendQueryString(syncEndpoint, 'us_privacy', usPrivacy);
|
|
101
105
|
}
|
|
102
106
|
|
|
107
|
+
if (gppConsent) {
|
|
108
|
+
if (gppConsent.gppString) {
|
|
109
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'gpp', gppConsent.gppString);
|
|
110
|
+
}
|
|
111
|
+
if (gppConsent.applicableSections && gppConsent.applicableSections.length !== 0) {
|
|
112
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'gpp_sid', _filterSid(gppConsent.applicableSections));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
103
116
|
return [{
|
|
104
117
|
type: syncType,
|
|
105
118
|
url: syncEndpoint
|
|
@@ -113,6 +126,13 @@ function _getSyncType(syncOptions) {
|
|
|
113
126
|
if (syncOptions.pixelEnabled) return 'image';
|
|
114
127
|
}
|
|
115
128
|
|
|
129
|
+
function _filterSid(sid) {
|
|
130
|
+
return sid.filter(element => {
|
|
131
|
+
return Number.isInteger(element);
|
|
132
|
+
})
|
|
133
|
+
.join(',');
|
|
134
|
+
}
|
|
135
|
+
|
|
116
136
|
function _buildPostBody(bidRequests, bidderRequest) {
|
|
117
137
|
let data = {};
|
|
118
138
|
let { schain } = bidRequests[0];
|
package/modules/userId/eids.js
CHANGED
|
@@ -158,6 +158,11 @@ export const USER_IDS_CONFIG = {
|
|
|
158
158
|
atype: 3,
|
|
159
159
|
getValue: function(data) {
|
|
160
160
|
return data.id;
|
|
161
|
+
},
|
|
162
|
+
getUidExt: function(data) {
|
|
163
|
+
if (data.ext) {
|
|
164
|
+
return data.ext;
|
|
165
|
+
}
|
|
161
166
|
}
|
|
162
167
|
},
|
|
163
168
|
|
|
@@ -167,6 +172,25 @@ export const USER_IDS_CONFIG = {
|
|
|
167
172
|
atype: 3,
|
|
168
173
|
getValue: function(data) {
|
|
169
174
|
return data.id;
|
|
175
|
+
},
|
|
176
|
+
getUidExt: function(data) {
|
|
177
|
+
if (data.ext) {
|
|
178
|
+
return data.ext;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// magnite
|
|
184
|
+
'magnite': {
|
|
185
|
+
source: 'rubiconproject.com',
|
|
186
|
+
atype: 3,
|
|
187
|
+
getValue: function(data) {
|
|
188
|
+
return data.id;
|
|
189
|
+
},
|
|
190
|
+
getUidExt: function(data) {
|
|
191
|
+
if (data.ext) {
|
|
192
|
+
return data.ext;
|
|
193
|
+
}
|
|
170
194
|
}
|
|
171
195
|
},
|
|
172
196
|
|
|
@@ -288,6 +312,11 @@ export const USER_IDS_CONFIG = {
|
|
|
288
312
|
atype: 3,
|
|
289
313
|
getValue: function(data) {
|
|
290
314
|
return data.id;
|
|
315
|
+
},
|
|
316
|
+
getUidExt: function(data) {
|
|
317
|
+
if (data.ext) {
|
|
318
|
+
return data.ext;
|
|
319
|
+
}
|
|
291
320
|
}
|
|
292
321
|
},
|
|
293
322
|
|
package/modules/userId/eids.md
CHANGED
|
@@ -110,7 +110,10 @@ userIdAsEids = [
|
|
|
110
110
|
source: 'bidswitch.net',
|
|
111
111
|
uids: [{
|
|
112
112
|
id: 'some-random-id-value',
|
|
113
|
-
atype: 3
|
|
113
|
+
atype: 3,
|
|
114
|
+
ext: {
|
|
115
|
+
provider: 'liveintent.com'
|
|
116
|
+
}
|
|
114
117
|
}]
|
|
115
118
|
},
|
|
116
119
|
|
|
@@ -118,7 +121,21 @@ userIdAsEids = [
|
|
|
118
121
|
source: 'media.net',
|
|
119
122
|
uids: [{
|
|
120
123
|
id: 'some-random-id-value',
|
|
121
|
-
atype: 3
|
|
124
|
+
atype: 3,
|
|
125
|
+
ext: {
|
|
126
|
+
provider: 'liveintent.com'
|
|
127
|
+
}
|
|
128
|
+
}]
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
{
|
|
132
|
+
source: 'rubiconproject.com',
|
|
133
|
+
uids: [{
|
|
134
|
+
id: 'some-random-id-value',
|
|
135
|
+
atype: 3,
|
|
136
|
+
ext: {
|
|
137
|
+
provider: 'liveintent.com'
|
|
138
|
+
}
|
|
122
139
|
}]
|
|
123
140
|
},
|
|
124
141
|
|