prebid.js 7.33.0 → 7.35.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 +2 -1
- package/.github/workflows/issue_tracker.yml +27 -16
- 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/admaticBidAdapter.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.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/arcspanRtdProvider.js +1 -0
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bliinkBidAdapter.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/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.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/cwireBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/emx_digitalBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.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/hadronIdSystem.js +1 -1
- package/dist/holidBidAdapter.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/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -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/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +140 -149
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pulsepointBidAdapter.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/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.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/smartytechBidAdapter.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/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.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/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/zeta_global_sspBidAdapter.js +1 -1
- package/dist/zeusPrimeRtdProvider.js +4 -14
- package/integrationExamples/gpt/hello_world.html +0 -0
- package/libraries/ortbConverter/processors/default.js +19 -1
- package/modules/.submodules.json +1 -0
- package/modules/admaticBidAdapter.js +2 -1
- package/modules/admixerBidAdapter.js +26 -4
- package/modules/adnuntiusBidAdapter.js +36 -38
- package/modules/adyoulikeBidAdapter.js +2 -0
- package/modules/arcspanRtdProvider.js +73 -0
- package/modules/arcspanRtdProvider.md +11 -0
- package/modules/bliinkBidAdapter.js +1 -1
- package/modules/consentManagement.js +33 -5
- package/modules/consumableBidAdapter.js +20 -2
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/cwireBidAdapter.js +169 -242
- package/modules/cwireBidAdapter.md +15 -14
- package/modules/emx_digitalBidAdapter.js +9 -2
- package/modules/hadronIdSystem.js +37 -32
- package/modules/holidBidAdapter.js +9 -4
- package/modules/kargoBidAdapter.js +5 -1
- package/modules/lotamePanoramaIdSystem.js +9 -1
- package/modules/nextMillenniumBidAdapter.js +19 -9
- package/modules/nexx360BidAdapter.js +1 -2
- package/modules/onetagBidAdapter.js +12 -1
- package/modules/openxBidAdapter.js +5 -0
- package/modules/outbrainBidAdapter.js +103 -6
- package/modules/permutiveRtdProvider.js +17 -12
- package/modules/prebidServerBidAdapter/index.js +14 -1
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/priceFloors.js +7 -8
- package/modules/pulsepointBidAdapter.js +2 -0
- package/modules/seedingAllianceBidAdapter.js +129 -116
- package/modules/smartadserverBidAdapter.js +39 -28
- package/modules/smartyadsBidAdapter.md +9 -0
- package/modules/smartytechBidAdapter.js +67 -10
- package/modules/smartytechBidAdapter.md +44 -33
- package/modules/sonobiBidAdapter.js +17 -10
- package/modules/taboolaBidAdapter.js +2 -1
- package/modules/tripleliftBidAdapter.js +4 -0
- package/modules/vidazooBidAdapter.js +56 -22
- package/modules/zeta_global_sspBidAdapter.js +15 -0
- package/modules/zeusPrimeRtdProvider.js +3 -323
- package/modules/zeusPrimeRtdProvider.md +3 -0
- package/package.json +1 -1
- package/src/adloader.js +2 -1
- package/src/auction.js +2 -11
- package/src/prebid.js +8 -0
- package/src/utils/cpm.js +17 -0
- package/test/spec/modules/admixerBidAdapter_spec.js +140 -60
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +120 -120
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +3 -0
- package/test/spec/modules/arcspanRtdProvider_spec.js +187 -0
- package/test/spec/modules/bliinkBidAdapter_spec.js +7 -7
- package/test/spec/modules/consentManagement_spec.js +49 -1
- package/test/spec/modules/consumableBidAdapter_spec.js +46 -0
- package/test/spec/modules/cwireBidAdapter_spec.js +249 -335
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +30 -1
- package/test/spec/modules/hadronIdSystem_spec.js +4 -6
- package/test/spec/modules/holidBidAdapter_spec.js +29 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +32 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +16 -10
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +14 -2
- package/test/spec/modules/nexx360BidAdapter_spec.js +0 -4
- package/test/spec/modules/onetagBidAdapter_spec.js +43 -0
- package/test/spec/modules/openxBidAdapter_spec.js +41 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +41 -0
- package/test/spec/modules/outbrainBidAdapter_spec.js +182 -18
- package/test/spec/modules/prebidServerBidAdapter_spec.js +138 -0
- package/test/spec/modules/pulsepointBidAdapter_spec.js +11 -1
- package/test/spec/modules/seedingAllianceAdapter_spec.js +66 -23
- package/test/spec/modules/smartadserverBidAdapter_spec.js +116 -5
- package/test/spec/modules/smartytechBidAdapter_spec.js +172 -14
- package/test/spec/modules/sonobiBidAdapter_spec.js +2 -1
- package/test/spec/modules/taboolaBidAdapter_spec.js +12 -3
- package/test/spec/modules/tripleliftBidAdapter_spec.js +13 -0
- package/test/spec/modules/userId_spec.js +19 -14
- package/test/spec/modules/vidazooBidAdapter_spec.js +61 -22
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +8 -0
- package/test/spec/ortbConverter/default_processors_spec.js +23 -0
- package/test/spec/unit/pbjs_api_spec.js +14 -0
- package/test/spec/unit/utils/cpm_spec.js +64 -0
- package/test/spec/modules/zeusPrimeRtdProvider_spec.js +0 -410
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
-
import { BANNER, VIDEO
|
|
3
|
-
import { isStr, deepAccess
|
|
2
|
+
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
3
|
+
import { isStr, deepAccess } from '../src/utils.js';
|
|
4
4
|
import { config } from '../src/config.js';
|
|
5
5
|
import { getStorageManager } from '../src/storageManager.js';
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ const BIDDER_CODE = 'adnuntius';
|
|
|
8
8
|
const ENDPOINT_URL = 'https://ads.adnuntius.delivery/i';
|
|
9
9
|
const GVLID = 855;
|
|
10
10
|
const DEFAULT_VAST_VERSION = 'vast4'
|
|
11
|
-
const DEFAULT_NATIVE = 'native'
|
|
11
|
+
// const DEFAULT_NATIVE = 'native'
|
|
12
12
|
|
|
13
13
|
const checkSegment = function (segment) {
|
|
14
14
|
if (isStr(segment)) return segment;
|
|
@@ -28,31 +28,31 @@ const getSegmentsFromOrtb = function (ortb2) {
|
|
|
28
28
|
return segments
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function createNative(ad) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
31
|
+
// function createNative(ad) {
|
|
32
|
+
// const native = {};
|
|
33
|
+
// const assets = ad.assets
|
|
34
|
+
// native.title = ad.text.title.content;
|
|
35
|
+
// native.image = {
|
|
36
|
+
// url: assets.image.cdnId,
|
|
37
|
+
// height: assets.image.height,
|
|
38
|
+
// width: assets.image.width,
|
|
39
|
+
// };
|
|
40
|
+
// if (assets.icon) {
|
|
41
|
+
// native.icon = {
|
|
42
|
+
// url: assets.icon.cdnId,
|
|
43
|
+
// height: assets.icon.height,
|
|
44
|
+
// width: assets.icon.width,
|
|
45
|
+
// };
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
// native.sponsoredBy = ad.text.sponsoredBy?.content || '';
|
|
49
|
+
// native.body = ad.text.body?.content || '';
|
|
50
|
+
// native.cta = ad.text.cta?.content || '';
|
|
51
|
+
// native.clickUrl = ad.destinationUrls.destination || '';
|
|
52
|
+
// native.impressionTrackers = ad.impressionTrackingUrls || [ad.renderedPixel];
|
|
53
|
+
|
|
54
|
+
// return native;
|
|
55
|
+
// }
|
|
56
56
|
|
|
57
57
|
const handleMeta = function () {
|
|
58
58
|
const storage = getStorageManager({ gvlid: GVLID, bidderCode: BIDDER_CODE })
|
|
@@ -73,7 +73,7 @@ const getUsi = function (meta, ortb2, bidderRequest) {
|
|
|
73
73
|
export const spec = {
|
|
74
74
|
code: BIDDER_CODE,
|
|
75
75
|
gvlid: GVLID,
|
|
76
|
-
supportedMediaTypes: [BANNER, VIDEO
|
|
76
|
+
supportedMediaTypes: [BANNER, VIDEO],
|
|
77
77
|
isBidRequestValid: function (bid) {
|
|
78
78
|
return !!(bid.bidId || (bid.params.member && bid.params.invCode));
|
|
79
79
|
},
|
|
@@ -109,9 +109,9 @@ export const spec = {
|
|
|
109
109
|
network += '_video'
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if (bid.mediaTypes && bid.mediaTypes.native) {
|
|
113
|
-
|
|
114
|
-
}
|
|
112
|
+
// if (bid.mediaTypes && bid.mediaTypes.native) {
|
|
113
|
+
// network += '_native'
|
|
114
|
+
// }
|
|
115
115
|
|
|
116
116
|
bidRequests[network] = bidRequests[network] || [];
|
|
117
117
|
bidRequests[network].push(bid);
|
|
@@ -130,7 +130,7 @@ export const spec = {
|
|
|
130
130
|
const network = networkKeys[j];
|
|
131
131
|
const networkRequest = [...request]
|
|
132
132
|
if (network.indexOf('_video') > -1) { networkRequest.push('tt=' + DEFAULT_VAST_VERSION) }
|
|
133
|
-
if (network.indexOf('_native') > -1) { networkRequest.push('tt=' + DEFAULT_NATIVE) }
|
|
133
|
+
// if (network.indexOf('_native') > -1) { networkRequest.push('tt=' + DEFAULT_NATIVE) }
|
|
134
134
|
requests.push({
|
|
135
135
|
method: 'POST',
|
|
136
136
|
url: ENDPOINT_URL + '?' + networkRequest.join('&'),
|
|
@@ -170,15 +170,13 @@ export const spec = {
|
|
|
170
170
|
if (adUnit.vastXml) {
|
|
171
171
|
adResponse[adUnit.targetId].vastXml = adUnit.vastXml
|
|
172
172
|
adResponse[adUnit.targetId].mediaType = VIDEO
|
|
173
|
-
|
|
174
|
-
adResponse[adUnit.targetId].native = createNative(ad);
|
|
175
|
-
adResponse[adUnit.targetId].mediaType = NATIVE;
|
|
173
|
+
// } else if (ad.assets && ad.assets.image && ad.text && ad.text.title && ad.text.body && ad.destinationUrls && ad.destinationUrls.destination) {
|
|
174
|
+
// adResponse[adUnit.targetId].native = createNative(ad);
|
|
175
|
+
// adResponse[adUnit.targetId].mediaType = NATIVE;
|
|
176
176
|
} else {
|
|
177
177
|
adResponse[adUnit.targetId].ad = adUnit.html
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
logInfo('BID', adResponse)
|
|
181
|
-
|
|
182
180
|
return adResponse
|
|
183
181
|
} else return response
|
|
184
182
|
}, {});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { submodule } from '../src/hook.js';
|
|
2
|
+
import { mergeDeep } from '../src/utils.js';
|
|
3
|
+
import {loadExternalScript} from '../src/adloader.js';
|
|
4
|
+
|
|
5
|
+
/** @type {string} */
|
|
6
|
+
const MODULE_NAME = 'realTimeData';
|
|
7
|
+
const SUBMODULE_NAME = 'arcspan';
|
|
8
|
+
|
|
9
|
+
/** @type {RtdSubmodule} */
|
|
10
|
+
export const arcspanSubmodule = {
|
|
11
|
+
name: SUBMODULE_NAME,
|
|
12
|
+
init: init,
|
|
13
|
+
getBidRequestData: alterBidRequests,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function init(config, userConsent) {
|
|
17
|
+
if (typeof config.params.silo === 'undefined') {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
if (typeof window.arcobj2 === 'undefined') {
|
|
21
|
+
var scriptUrl;
|
|
22
|
+
if (config.params.silo === 'test') {
|
|
23
|
+
scriptUrl = 'https://localhost:8080/as.js';
|
|
24
|
+
} else {
|
|
25
|
+
scriptUrl = 'https://silo' + config.params.silo + '.p7cloud.net/as.js';
|
|
26
|
+
}
|
|
27
|
+
loadExternalScript(scriptUrl, SUBMODULE_NAME);
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function alterBidRequests(reqBidsConfigObj, callback, config, userConsent) {
|
|
33
|
+
var _v1 = [];
|
|
34
|
+
var _v1s = [];
|
|
35
|
+
var _v2 = [];
|
|
36
|
+
var arcobj1 = window.arcobj1;
|
|
37
|
+
if (typeof arcobj1 != 'undefined') {
|
|
38
|
+
if (typeof arcobj1.page_iab_codes.text != 'undefined') { _v1 = _v1.concat(arcobj1.page_iab_codes.text); }
|
|
39
|
+
if (typeof arcobj1.page_iab_codes.images != 'undefined') { _v1 = _v1.concat(arcobj1.page_iab_codes.images); }
|
|
40
|
+
if (typeof arcobj1.page_iab.text != 'undefined') { _v1s = _v1s.concat(arcobj1.page_iab.text); }
|
|
41
|
+
if (typeof arcobj1.page_iab.images != 'undefined') { _v1s = _v1s.concat(arcobj1.page_iab.images); }
|
|
42
|
+
if (typeof arcobj1.page_iab_newcodes.text != 'undefined') { _v2 = [...new Set([..._v2, ...arcobj1.page_iab_newcodes.text])]; }
|
|
43
|
+
if (typeof arcobj1.page_iab_newcodes.images != 'undefined') { _v2 = [...new Set([..._v2, ...arcobj1.page_iab_newcodes.images])]; }
|
|
44
|
+
|
|
45
|
+
var _content = {};
|
|
46
|
+
_content.data = [];
|
|
47
|
+
var p = {};
|
|
48
|
+
p.name = 'arcspan';
|
|
49
|
+
p.segment = [];
|
|
50
|
+
p.ext = { segtax: 6 };
|
|
51
|
+
_v2.forEach(function (e) {
|
|
52
|
+
p.segment = p.segment.concat({ id: e });
|
|
53
|
+
});
|
|
54
|
+
_content.data = _content.data.concat(p);
|
|
55
|
+
var _ortb2 = {
|
|
56
|
+
site: {
|
|
57
|
+
name: 'arcspan',
|
|
58
|
+
domain: new URL(location.href).hostname,
|
|
59
|
+
cat: _v1,
|
|
60
|
+
sectioncat: _v1,
|
|
61
|
+
pagecat: _v1,
|
|
62
|
+
page: location.href,
|
|
63
|
+
ref: document.referrer,
|
|
64
|
+
keywords: _v1s.toString(),
|
|
65
|
+
content: _content,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
mergeDeep(reqBidsConfigObj.ortb2Fragments.global, _ortb2);
|
|
69
|
+
}
|
|
70
|
+
callback();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
submodule(MODULE_NAME, arcspanSubmodule);
|
|
@@ -125,7 +125,7 @@ export const buildBid = (bidResponse) => {
|
|
|
125
125
|
requestId: deepAccess(bidResponse, 'extras.transaction_id'),
|
|
126
126
|
width: deepAccess(bidResponse, `creative.${bid.mediaType}.width`) || 1,
|
|
127
127
|
height: deepAccess(bidResponse, `creative.${bid.mediaType}.height`) || 1,
|
|
128
|
-
ttl:
|
|
128
|
+
ttl: 300,
|
|
129
129
|
netRevenue: true,
|
|
130
130
|
});
|
|
131
131
|
};
|
|
@@ -18,12 +18,16 @@ const CMP_VERSION = 2;
|
|
|
18
18
|
|
|
19
19
|
export let userCMP;
|
|
20
20
|
export let consentTimeout;
|
|
21
|
+
export let actionTimeout;
|
|
21
22
|
export let gdprScope;
|
|
22
23
|
export let staticConsentData;
|
|
23
24
|
|
|
24
25
|
let consentData;
|
|
25
26
|
let addedConsentHook = false;
|
|
26
27
|
let provisionalConsent;
|
|
28
|
+
let onTimeout;
|
|
29
|
+
let timer = null;
|
|
30
|
+
let actionTimer = null;
|
|
27
31
|
|
|
28
32
|
// add new CMPs here, with their dedicated lookup function
|
|
29
33
|
const cmpCallMap = {
|
|
@@ -39,6 +43,12 @@ function lookupStaticConsentData({onSuccess, onError}) {
|
|
|
39
43
|
processCmpData(staticConsentData, {onSuccess, onError})
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
export function setActionTimeout(timeout = setTimeout) {
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
timer = null;
|
|
49
|
+
actionTimer = timeout(onTimeout, actionTimeout);
|
|
50
|
+
}
|
|
51
|
+
|
|
42
52
|
/**
|
|
43
53
|
* This function handles interacting with an IAB compliant CMP to obtain the consent information of the user.
|
|
44
54
|
* Given the async nature of the CMP's API, we pass in acting success/error callback functions to exit this function
|
|
@@ -84,6 +94,7 @@ function lookupIabConsent({onSuccess, onError}) {
|
|
|
84
94
|
processCmpData(tcfData, {onSuccess, onError});
|
|
85
95
|
} else {
|
|
86
96
|
provisionalConsent = tcfData;
|
|
97
|
+
if (!isNaN(actionTimeout) && actionTimer === null && timer != null) setActionTimeout();
|
|
87
98
|
}
|
|
88
99
|
} else {
|
|
89
100
|
onError('CMP unable to register callback function. Please check CMP setup.');
|
|
@@ -162,14 +173,20 @@ function lookupIabConsent({onSuccess, onError}) {
|
|
|
162
173
|
* @param cb A callback that takes: a boolean that is true if the auction should be canceled; an error message and extra
|
|
163
174
|
* error arguments that will be undefined if there's no error.
|
|
164
175
|
*/
|
|
165
|
-
function loadConsentData(cb) {
|
|
176
|
+
export function loadConsentData(cb, callMap = cmpCallMap, timeout = setTimeout) {
|
|
166
177
|
let isDone = false;
|
|
167
|
-
let timer = null;
|
|
168
178
|
|
|
169
179
|
function done(consentData, shouldCancelAuction, errMsg, ...extraArgs) {
|
|
170
180
|
if (timer != null) {
|
|
171
181
|
clearTimeout(timer);
|
|
182
|
+
timer = null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (actionTimer != null) {
|
|
186
|
+
clearTimeout(actionTimer);
|
|
187
|
+
actionTimer = null;
|
|
172
188
|
}
|
|
189
|
+
|
|
173
190
|
isDone = true;
|
|
174
191
|
gdprDataHandler.setConsentData(consentData);
|
|
175
192
|
if (typeof cb === 'function') {
|
|
@@ -188,10 +205,11 @@ function loadConsentData(cb) {
|
|
|
188
205
|
done(null, true, msg, ...extraArgs);
|
|
189
206
|
}
|
|
190
207
|
}
|
|
191
|
-
|
|
208
|
+
|
|
209
|
+
callMap[userCMP](callbacks);
|
|
192
210
|
|
|
193
211
|
if (!isDone) {
|
|
194
|
-
|
|
212
|
+
onTimeout = () => {
|
|
195
213
|
const continueToAuction = (data) => {
|
|
196
214
|
done(data, false, 'CMP did not load, continuing auction...');
|
|
197
215
|
}
|
|
@@ -200,10 +218,16 @@ function loadConsentData(cb) {
|
|
|
200
218
|
onError: () => continueToAuction(storeConsentData(undefined))
|
|
201
219
|
})
|
|
202
220
|
}
|
|
221
|
+
|
|
203
222
|
if (consentTimeout === 0) {
|
|
204
223
|
onTimeout();
|
|
205
224
|
} else {
|
|
206
|
-
timer
|
|
225
|
+
if (timer != null) {
|
|
226
|
+
clearTimeout(timer);
|
|
227
|
+
timer = null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
timer = timeout(onTimeout, consentTimeout);
|
|
207
231
|
}
|
|
208
232
|
}
|
|
209
233
|
}
|
|
@@ -328,6 +352,10 @@ export function setConsentConfig(config) {
|
|
|
328
352
|
logInfo(`consentManagement config did not specify cmp. Using system default setting (${DEFAULT_CMP}).`);
|
|
329
353
|
}
|
|
330
354
|
|
|
355
|
+
if (isNumber(config.actionTimeout)) {
|
|
356
|
+
actionTimeout = config.actionTimeout;
|
|
357
|
+
}
|
|
358
|
+
|
|
331
359
|
if (isNumber(config.timeout)) {
|
|
332
360
|
consentTimeout = config.timeout;
|
|
333
361
|
} else {
|
|
@@ -180,12 +180,26 @@ export const spec = {
|
|
|
180
180
|
return bidResponses;
|
|
181
181
|
},
|
|
182
182
|
|
|
183
|
-
getUserSyncs: function(syncOptions, serverResponses) {
|
|
183
|
+
getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
184
|
+
let syncUrl = 'https://sync.serverbid.com/ss/' + siteId + '.html';
|
|
185
|
+
|
|
184
186
|
if (syncOptions.iframeEnabled) {
|
|
187
|
+
if (gdprConsent && gdprConsent.consentString) {
|
|
188
|
+
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
189
|
+
syncUrl = appendUrlParam(syncUrl, `gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`);
|
|
190
|
+
} else {
|
|
191
|
+
syncUrl = appendUrlParam(syncUrl, `gdpr=0&gdpr_consent=${gdprConsent.consentString}`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (uspConsent && uspConsent.consentString) {
|
|
196
|
+
syncUrl = appendUrlParam(syncUrl, `us_privacy=${uspConsent.consentString}`);
|
|
197
|
+
}
|
|
198
|
+
|
|
185
199
|
if (!serverResponses || serverResponses.length === 0 || !serverResponses[0].body.bdr || serverResponses[0].body.bdr !== 'cx') {
|
|
186
200
|
return [{
|
|
187
201
|
type: 'iframe',
|
|
188
|
-
url:
|
|
202
|
+
url: syncUrl
|
|
189
203
|
}];
|
|
190
204
|
}
|
|
191
205
|
}
|
|
@@ -294,4 +308,8 @@ function getBidFloor(bid, sizes) {
|
|
|
294
308
|
return floor;
|
|
295
309
|
}
|
|
296
310
|
|
|
311
|
+
function appendUrlParam(url, queryString) {
|
|
312
|
+
return `${url}${url.indexOf('?') > -1 ? '&' : '?'}${queryString}`;
|
|
313
|
+
}
|
|
314
|
+
|
|
297
315
|
registerBidder(spec);
|
|
@@ -27,7 +27,7 @@ const LOG_PREFIX = 'Criteo: ';
|
|
|
27
27
|
Unminified source code can be found in the privately shared repo: https://github.com/Prebid-org/prebid-js-external-js-criteo/blob/master/dist/prod.js
|
|
28
28
|
*/
|
|
29
29
|
const FAST_BID_VERSION_PLACEHOLDER = '%FAST_BID_VERSION%';
|
|
30
|
-
export const FAST_BID_VERSION_CURRENT =
|
|
30
|
+
export const FAST_BID_VERSION_CURRENT = 134;
|
|
31
31
|
const FAST_BID_VERSION_LATEST = 'latest';
|
|
32
32
|
const FAST_BID_VERSION_NONE = 'none';
|
|
33
33
|
const PUBLISHER_TAG_URL_TEMPLATE = 'https://static.criteo.net/js/ld/publishertag.prebid' + FAST_BID_VERSION_PLACEHOLDER + '.js';
|