prebid.js 6.0.0 → 6.4.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/.babelrc.js +1 -7
- package/.circleci/config.yml +1 -1
- package/README.md +1 -1
- package/browsers.json +13 -29
- package/gulpfile.js +88 -82
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +23 -14
- package/karma.conf.maker.js +2 -2
- package/modules/33acrossBidAdapter.js +189 -102
- package/modules/adagioBidAdapter.js +1 -1
- package/modules/addefendBidAdapter.js +1 -0
- package/modules/adheseBidAdapter.js +7 -2
- package/modules/adkernelBidAdapter.js +147 -61
- package/modules/adlivetechBidAdapter.md +61 -0
- package/modules/adlooxAdServerVideo.js +2 -2
- package/modules/adlooxAnalyticsAdapter.js +4 -4
- package/modules/admanBidAdapter.js +1 -0
- package/modules/admixerBidAdapter.js +3 -2
- package/modules/adnuntiusBidAdapter.js +5 -2
- package/modules/adomikAnalyticsAdapter.js +16 -4
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adxcgBidAdapter.js +311 -359
- package/modules/adxcgBidAdapter.md +22 -21
- package/modules/adyoulikeBidAdapter.js +7 -2
- package/modules/aniviewBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +23 -3
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/beopBidAdapter.js +6 -4
- package/modules/bidViewability.js +3 -3
- package/modules/bidViewabilityIO.js +3 -3
- package/modules/codefuelBidAdapter.js +1 -3
- package/modules/codefuelBidAdapter.md +3 -3
- package/modules/colossussspBidAdapter.js +7 -0
- package/modules/compassBidAdapter.js +201 -0
- package/modules/compassBidAdapter.md +79 -0
- package/modules/craftBidAdapter.js +5 -3
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/currency.js +2 -2
- package/modules/cwireBidAdapter.js +3 -0
- package/modules/dailyhuntBidAdapter.js +435 -0
- package/modules/dailyhuntBidAdapter.md +4 -0
- package/modules/datablocksBidAdapter.js +3 -3
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/deepintentBidAdapter.js +1 -1
- package/modules/dspxBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/engageyaBidAdapter.js +68 -54
- package/modules/feedadBidAdapter.js +2 -2
- package/modules/feedadBidAdapter.md +4 -2
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/futureads.md +48 -0
- package/modules/glimpseBidAdapter.js +44 -16
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gptPreAuction.js +11 -5
- package/modules/gridBidAdapter.js +5 -4
- package/modules/gumgumBidAdapter.js +7 -3
- package/modules/id5IdSystem.md +6 -6
- package/modules/imRtdProvider.js +31 -0
- package/modules/improvedigitalBidAdapter.js +19 -3
- package/modules/instreamTracking.js +4 -4
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +64 -14
- package/modules/invibesBidAdapter.md +2 -1
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/ixBidAdapter.js +185 -22
- package/modules/kinessoIdSystem.js +1 -1
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/livewrappedBidAdapter.js +8 -2
- package/modules/lotamePanoramaIdSystem.js +80 -8
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/mediasquareBidAdapter.js +1 -9
- package/modules/merkleIdSystem.js +5 -0
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/nativoBidAdapter.js +27 -1
- package/modules/nextMillenniumBidAdapter.js +37 -7
- package/modules/oguryBidAdapter.js +2 -1
- package/modules/openxBidAdapter.js +6 -1
- package/modules/prebidServerBidAdapter/index.js +19 -15
- package/modules/pubgeniusBidAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +5 -3
- package/modules/pubxaiAnalyticsAdapter.js +17 -0
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +2 -3
- package/modules/rtdModule/index.js +48 -18
- package/modules/rubiconBidAdapter.js +31 -19
- package/modules/saambaaBidAdapter.js +420 -0
- package/modules/saambaaBidAdapter.md +65 -68
- package/modules/seedtagBidAdapter.js +6 -0
- package/modules/sharedIdSystem.js +27 -1
- package/modules/smaatoBidAdapter.js +9 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/sspBCBidAdapter.js +34 -3
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/targetVideoBidAdapter.js +187 -0
- package/modules/targetVideoBidAdapter.md +34 -0
- package/modules/telariaBidAdapter.js +2 -2
- package/modules/trustxBidAdapter.js +18 -17
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +104 -64
- package/modules/ventesBidAdapter.md +0 -1
- package/modules/vidoomyBidAdapter.js +65 -108
- package/modules/visxBidAdapter.js +20 -3
- package/modules/visxBidAdapter.md +4 -6
- package/modules/weboramaRtdProvider.js +288 -73
- package/modules/weboramaRtdProvider.md +27 -10
- package/modules/yahoosspBidAdapter.js +5 -1
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldlabBidAdapter.js +41 -10
- package/modules/yieldlabBidAdapter.md +91 -48
- package/modules/yieldoneBidAdapter.js +115 -11
- package/modules/zetaSspBidAdapter.md +33 -1
- package/modules/zeta_global_sspBidAdapter.js +22 -1
- package/package.json +6 -1
- package/plugins/pbjsGlobals.js +28 -1
- package/src/adapterManager.js +14 -8
- package/src/auction.js +5 -4
- package/src/prebid.js +1 -2
- package/src/targeting.js +24 -3
- package/src/utils.js +41 -7
- package/test/helpers/prebidGlobal.js +1 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/33acrossBidAdapter_spec.js +300 -78
- package/test/spec/modules/adheseBidAdapter_spec.js +27 -1
- package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +6 -6
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +35 -0
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +9 -1
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adxcgBidAdapter_spec.js +820 -571
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +26 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +63 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/beopBidAdapter_spec.js +1 -1
- package/test/spec/modules/bidViewabilityIO_spec.js +2 -2
- package/test/spec/modules/bidViewability_spec.js +4 -4
- package/test/spec/modules/codefuelBidAdapter_spec.js +1 -1
- package/test/spec/modules/colossussspBidAdapter_spec.js +9 -0
- package/test/spec/modules/compassBidAdapter_spec.js +397 -0
- package/test/spec/modules/cwireBidAdapter_spec.js +10 -8
- package/test/spec/modules/dailyhuntBidAdapter_spec.js +404 -0
- package/test/spec/modules/datablocksBidAdapter_spec.js +3 -3
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/engageyaBidAdapter_spec.js +231 -95
- package/test/spec/modules/eplanningBidAdapter_spec.js +8 -8
- package/test/spec/modules/feedadBidAdapter_spec.js +15 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/glimpseBidAdapter_spec.js +33 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gptPreAuction_spec.js +58 -4
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/imRtdProvider_spec.js +25 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +3 -1
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +148 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/ixBidAdapter_spec.js +293 -2
- package/test/spec/modules/konduitWrapper_spec.js +0 -1
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +10 -7
- package/test/spec/modules/livewrappedBidAdapter_spec.js +31 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +227 -0
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -4
- package/test/spec/modules/merkleIdSystem_spec.js +18 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/nativoBidAdapter_spec.js +35 -18
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +26 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +13 -11
- package/test/spec/modules/openxBidAdapter_spec.js +5 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +62 -2
- package/test/spec/modules/pubgeniusBidAdapter_spec.js +3 -3
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +11 -0
- package/test/spec/modules/realTimeDataModule_spec.js +135 -49
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/richaudienceBidAdapter_spec.js +2 -2
- package/test/spec/modules/rubiconBidAdapter_spec.js +65 -9
- package/test/spec/modules/seedtagBidAdapter_spec.js +3 -0
- package/test/spec/modules/sharedIdSystem_spec.js +52 -6
- package/test/spec/modules/smaatoBidAdapter_spec.js +61 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/sspBCBidAdapter_spec.js +33 -3
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/targetVideoBidAdapter_spec.js +96 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +42 -0
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/vidoomyBidAdapter_spec.js +32 -13
- package/test/spec/modules/visxBidAdapter_spec.js +121 -5
- package/test/spec/modules/weboramaRtdProvider_spec.js +408 -214
- package/test/spec/modules/yahoosspBidAdapter_spec.js +28 -1
- package/test/spec/modules/yieldlabBidAdapter_spec.js +81 -0
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +33 -1
- package/test/spec/unit/core/adapterManager_spec.js +24 -6
- package/test/spec/unit/core/targeting_spec.js +116 -0
- package/test/spec/utils_spec.js +38 -0
- package/test/test_deps.js +3 -0
- package/test/test_index.js +1 -3
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: Goldbach Bid Adapter
|
|
5
|
+
Module Type: Bidder Adapter
|
|
6
|
+
Maintainer: dusan.veljovic@goldbach.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Connects to Xandr exchange for bids.
|
|
12
|
+
|
|
13
|
+
Goldbach bid adapter supports Banner, Video (instream and outstream) and Native.
|
|
14
|
+
|
|
15
|
+
# Test Parameters
|
|
16
|
+
```
|
|
17
|
+
var adUnits = [
|
|
18
|
+
// Banner adUnit
|
|
19
|
+
{
|
|
20
|
+
code: 'banner-div',
|
|
21
|
+
mediaTypes: {
|
|
22
|
+
banner: {
|
|
23
|
+
sizes: [[300, 250], [300,600]]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
bids: [{
|
|
27
|
+
bidder: 'goldbach',
|
|
28
|
+
params: {
|
|
29
|
+
placementId: 13144370
|
|
30
|
+
}
|
|
31
|
+
}]
|
|
32
|
+
},
|
|
33
|
+
// Native adUnit
|
|
34
|
+
{
|
|
35
|
+
code: 'native-div',
|
|
36
|
+
sizes: [[1, 1]],
|
|
37
|
+
mediaTypes: {
|
|
38
|
+
native: {
|
|
39
|
+
title: {
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
body: {
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
image: {
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
sponsoredBy: {
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
icon: {
|
|
52
|
+
required: false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
bids: [{
|
|
57
|
+
bidder: 'goldbach',
|
|
58
|
+
params: {
|
|
59
|
+
placementId: 13232354,
|
|
60
|
+
allowSmallerSizes: true
|
|
61
|
+
}
|
|
62
|
+
}]
|
|
63
|
+
},
|
|
64
|
+
// Video instream adUnit
|
|
65
|
+
{
|
|
66
|
+
code: 'video-instream',
|
|
67
|
+
sizes: [[640, 480]],
|
|
68
|
+
mediaTypes: {
|
|
69
|
+
video: {
|
|
70
|
+
playerSize: [[640, 480]],
|
|
71
|
+
context: 'instream'
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
bids: [{
|
|
75
|
+
goldbach: 'goldbach',
|
|
76
|
+
params: {
|
|
77
|
+
placementId: 13232361,
|
|
78
|
+
video: {
|
|
79
|
+
skippable: true,
|
|
80
|
+
playback_methods: ['auto_play_sound_off']
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}]
|
|
84
|
+
},
|
|
85
|
+
// Video outstream adUnit
|
|
86
|
+
{
|
|
87
|
+
code: 'video-outstream',
|
|
88
|
+
sizes: [[300, 250]],
|
|
89
|
+
mediaTypes: {
|
|
90
|
+
video: {
|
|
91
|
+
playerSize: [[300, 250]],
|
|
92
|
+
context: 'outstream',
|
|
93
|
+
// Certain ORTB 2.5 video values can be read from the mediatypes object; below are examples of supported params.
|
|
94
|
+
// To note - goldbach supports additional values for our system that are not part of the ORTB spec. If you want
|
|
95
|
+
// to use these values, they will have to be declared in the bids[].params.video object instead using the goldbach syntax.
|
|
96
|
+
// Between the corresponding values of the mediaTypes.video and params.video objects, the properties in params.video will
|
|
97
|
+
// take precedence if declared; eg in the example below, the `skippable: true` setting will be used instead of the `skip: 0`.
|
|
98
|
+
minduration: 1,
|
|
99
|
+
maxduration: 60,
|
|
100
|
+
skip: 0, // 1 - true, 0 - false
|
|
101
|
+
skipafter: 5,
|
|
102
|
+
playbackmethod: [2], // note - we only support options 1-4 at this time
|
|
103
|
+
api: [1,2,3] // note - option 6 is not supported at this time
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
bids: [
|
|
107
|
+
{
|
|
108
|
+
bidder: 'goldbach',
|
|
109
|
+
params: {
|
|
110
|
+
placementId: 13232385,
|
|
111
|
+
video: {
|
|
112
|
+
skippable: true,
|
|
113
|
+
playback_method: 'auto_play_sound_off'
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
// Banner adUnit in a App Webview
|
|
120
|
+
// Only use this for situations where prebid.js is in a webview of an App
|
|
121
|
+
// See Prebid Mobile for displaying ads via an SDK
|
|
122
|
+
{
|
|
123
|
+
code: 'banner-div',
|
|
124
|
+
mediaTypes: {
|
|
125
|
+
banner: {
|
|
126
|
+
sizes: [[300, 250], [300,600]]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
bids: [{
|
|
130
|
+
bidder: 'goldbach',
|
|
131
|
+
params: {
|
|
132
|
+
placementId: 13144370,
|
|
133
|
+
app: {
|
|
134
|
+
id: "B1O2W3M4AN.com.prebid.webview",
|
|
135
|
+
geo: {
|
|
136
|
+
lat: 40.0964439,
|
|
137
|
+
lng: -75.3009142
|
|
138
|
+
},
|
|
139
|
+
device_id: {
|
|
140
|
+
idfa: "4D12078D-3246-4DA4-AD5E-7610481E7AE", // Apple advertising identifier
|
|
141
|
+
aaid: "38400000-8cf0-11bd-b23e-10b96e40000d", // Android advertising identifier
|
|
142
|
+
md5udid: "5756ae9022b2ea1e47d84fead75220c8", // MD5 hash of the ANDROID_ID
|
|
143
|
+
sha1udid: "4DFAA92388699AC6539885AEF1719293879985BF", // SHA1 hash of the ANDROID_ID
|
|
144
|
+
windowsadid: "750c6be243f1c4b5c9912b95a5742fc5" // Windows advertising identifier
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}]
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
```
|
package/modules/gptPreAuction.js
CHANGED
|
@@ -55,15 +55,16 @@ export const appendPbAdSlot = adUnit => {
|
|
|
55
55
|
const context = adUnit.ortb2Imp.ext.data;
|
|
56
56
|
const { customPbAdSlot } = _currentConfig;
|
|
57
57
|
|
|
58
|
-
if (
|
|
59
|
-
|
|
58
|
+
// use context.pbAdSlot if set (if someone set it already, it will take precedence over others)
|
|
59
|
+
if (context.pbadslot) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
if (customPbAdSlot) {
|
|
64
|
+
context.pbadslot = customPbAdSlot(adUnit.code, deepAccess(context, 'adserver.adslot'));
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
+
|
|
67
68
|
// use data attribute 'data-adslotid' if set
|
|
68
69
|
try {
|
|
69
70
|
const adUnitCodeDiv = document.getElementById(adUnit.code);
|
|
@@ -78,12 +79,17 @@ export const appendPbAdSlot = adUnit => {
|
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
81
|
context.pbadslot = adUnit.code;
|
|
82
|
+
return true;
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
export const makeBidRequestsHook = (fn, adUnits, ...args) => {
|
|
84
86
|
appendGptSlots(adUnits);
|
|
85
87
|
adUnits.forEach(adUnit => {
|
|
86
|
-
appendPbAdSlot(adUnit);
|
|
88
|
+
const usedAdUnitCode = appendPbAdSlot(adUnit);
|
|
89
|
+
// gpid should be set to itself if already set, or to what pbadslot was (as long as it was not adUnit code)
|
|
90
|
+
if (!adUnit.ortb2Imp.ext.gpid && !usedAdUnitCode) {
|
|
91
|
+
adUnit.ortb2Imp.ext.gpid = adUnit.ortb2Imp.ext.data.pbadslot;
|
|
92
|
+
}
|
|
87
93
|
});
|
|
88
94
|
return fn.call(this, adUnits, ...args);
|
|
89
95
|
};
|
|
@@ -29,7 +29,7 @@ let hasSynced = false;
|
|
|
29
29
|
|
|
30
30
|
export const spec = {
|
|
31
31
|
code: BIDDER_CODE,
|
|
32
|
-
aliases: ['playwire'],
|
|
32
|
+
aliases: ['playwire', 'adlivetech'],
|
|
33
33
|
supportedMediaTypes: [ BANNER, VIDEO ],
|
|
34
34
|
/**
|
|
35
35
|
* Determines whether or not the given bid request is valid.
|
|
@@ -291,10 +291,11 @@ export const spec = {
|
|
|
291
291
|
if (!hasSynced && syncOptions.pixelEnabled) {
|
|
292
292
|
let params = '';
|
|
293
293
|
|
|
294
|
-
if (gdprConsent
|
|
294
|
+
if (gdprConsent) {
|
|
295
295
|
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
296
|
-
params += `&gdpr=${Number(gdprConsent.gdprApplies)}
|
|
297
|
-
}
|
|
296
|
+
params += `&gdpr=${Number(gdprConsent.gdprApplies)}`;
|
|
297
|
+
}
|
|
298
|
+
if (typeof gdprConsent.consentString === 'string') {
|
|
298
299
|
params += `&gdpr_consent=${gdprConsent.consentString}`;
|
|
299
300
|
}
|
|
300
301
|
}
|
|
@@ -286,7 +286,8 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
286
286
|
schain,
|
|
287
287
|
transactionId,
|
|
288
288
|
userId = {},
|
|
289
|
-
ortb2Imp
|
|
289
|
+
ortb2Imp,
|
|
290
|
+
adUnitCode = ''
|
|
290
291
|
} = bidRequest;
|
|
291
292
|
const { currency, floor } = _getFloor(mediaTypes, params.bidfloor, bidRequest);
|
|
292
293
|
const eids = getEids(userId);
|
|
@@ -295,13 +296,16 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
295
296
|
let gpid = '';
|
|
296
297
|
|
|
297
298
|
const date = new Date();
|
|
298
|
-
const lt = date
|
|
299
|
-
const to = date
|
|
299
|
+
const lt = date.getTime();
|
|
300
|
+
const to = date.getTimezoneOffset();
|
|
300
301
|
if (to) {
|
|
301
302
|
lt && (data.lt = lt);
|
|
302
303
|
data.to = to;
|
|
303
304
|
}
|
|
304
305
|
|
|
306
|
+
// ADTS-169 add adUnitCode to requests
|
|
307
|
+
if (adUnitCode) data.aun = adUnitCode
|
|
308
|
+
|
|
305
309
|
// ADTS-134 Retrieve ID envelopes
|
|
306
310
|
for (const eid in eids) data[eid] = eids[eid];
|
|
307
311
|
|
package/modules/id5IdSystem.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# ID5 Universal ID
|
|
2
2
|
|
|
3
|
-
The ID5
|
|
3
|
+
The ID5 ID is a shared, neutral identifier that publishers and ad tech platforms can use to recognise users even in environments where 3rd party cookies are not available. The ID5 ID is designed to respect users' privacy choices and publishers’ preferences throughout the advertising value chain. For more information about the ID5 ID and detailed integration docs, please visit [our documentation](https://support.id5.io/portal/en/kb/articles/prebid-js-user-id-module).
|
|
4
4
|
|
|
5
|
-
## ID5
|
|
5
|
+
## ID5 ID Registration
|
|
6
6
|
|
|
7
|
-
The ID5
|
|
7
|
+
The ID5 ID is free to use, but requires a simple registration with ID5. Please visit [our website](https://id5.io/solutions/#publishers) to sign up and request your ID5 Partner Number to get started.
|
|
8
8
|
|
|
9
|
-
The ID5 privacy policy is at [https://
|
|
9
|
+
The ID5 privacy policy is at [https://id5.io/platform-privacy-policy](https://id5.io/platform-privacy-policy).
|
|
10
10
|
|
|
11
|
-
## ID5
|
|
11
|
+
## ID5 ID Configuration
|
|
12
12
|
|
|
13
13
|
First, make sure to add the ID5 submodule to your Prebid.js package with:
|
|
14
14
|
|
|
@@ -46,7 +46,7 @@ pbjs.setConfig({
|
|
|
46
46
|
| Param under userSync.userIds[] | Scope | Type | Description | Example |
|
|
47
47
|
| --- | --- | --- | --- | --- |
|
|
48
48
|
| name | Required | String | The name of this module: `"id5Id"` | `"id5Id"` |
|
|
49
|
-
| params | Required | Object | Details for the ID5
|
|
49
|
+
| params | Required | Object | Details for the ID5 ID. | |
|
|
50
50
|
| params.partner | Required | Number | This is the ID5 Partner Number obtained from registering with ID5. | `173` |
|
|
51
51
|
| params.pd | Optional | String | Partner-supplied data used for linking ID5 IDs across domains. See [our documentation](https://support.id5.io/portal/en/kb/articles/passing-partner-data-to-id5) for details on generating the string. Omit the parameter or leave as an empty string if no data to supply | `"MT1iNTBjY..."` |
|
|
52
52
|
| params.provider | Optional | String | An identifier provided by ID5 to technology partners who manage Prebid setups on behalf of publishers. Reach out to [ID5](mailto:prebid@id5.io) if you have questions about this parameter | `pubmatic-identity-hub` |
|
package/modules/imRtdProvider.js
CHANGED
|
@@ -37,6 +37,34 @@ function setImDataInCookie(value) {
|
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @param {string} bidderName
|
|
42
|
+
*/
|
|
43
|
+
export function getBidderFunction(bidderName) {
|
|
44
|
+
const biddersFunction = {
|
|
45
|
+
ix: function (bid, data) {
|
|
46
|
+
if (data.im_segments && data.im_segments.length) {
|
|
47
|
+
config.setConfig({
|
|
48
|
+
ix: {firstPartyData: {im_segments: data.im_segments}},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return bid
|
|
52
|
+
},
|
|
53
|
+
pubmatic: function (bid, data) {
|
|
54
|
+
if (data.im_segments && data.im_segments.length) {
|
|
55
|
+
const dctr = deepAccess(bid, 'params.dctr');
|
|
56
|
+
deepSetValue(
|
|
57
|
+
bid,
|
|
58
|
+
'params.dctr',
|
|
59
|
+
`${dctr ? dctr + '|' : ''}im_segments=${data.im_segments.join(',')}`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return bid
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return biddersFunction[bidderName] || null;
|
|
66
|
+
}
|
|
67
|
+
|
|
40
68
|
export function getCustomBidderFunction(config, bidder) {
|
|
41
69
|
const overwriteFn = deepAccess(config, `params.overwrites.${bidder}`)
|
|
42
70
|
|
|
@@ -73,9 +101,12 @@ export function setRealTimeData(bidConfig, moduleConfig, data) {
|
|
|
73
101
|
|
|
74
102
|
adUnits.forEach(adUnit => {
|
|
75
103
|
adUnit.bids.forEach(bid => {
|
|
104
|
+
const bidderFunction = getBidderFunction(bid.bidder);
|
|
76
105
|
const overwriteFunction = getCustomBidderFunction(moduleConfig, bid.bidder);
|
|
77
106
|
if (overwriteFunction) {
|
|
78
107
|
overwriteFunction(bid, data, utils, config);
|
|
108
|
+
} else if (bidderFunction) {
|
|
109
|
+
bidderFunction(bid, data);
|
|
79
110
|
}
|
|
80
111
|
})
|
|
81
112
|
});
|
|
@@ -11,7 +11,7 @@ const RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js
|
|
|
11
11
|
const VIDEO_TARGETING = ['skip', 'skipmin', 'skipafter'];
|
|
12
12
|
|
|
13
13
|
export const spec = {
|
|
14
|
-
version: '7.
|
|
14
|
+
version: '7.5.0',
|
|
15
15
|
code: BIDDER_CODE,
|
|
16
16
|
gvlid: 253,
|
|
17
17
|
aliases: ['id'],
|
|
@@ -45,8 +45,24 @@ export const spec = {
|
|
|
45
45
|
libVersion: this.version
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
const gdprConsent = deepAccess(bidderRequest, 'gdprConsent')
|
|
49
|
+
if (gdprConsent) {
|
|
50
|
+
// GDPR Consent String
|
|
51
|
+
if (gdprConsent.consentString) {
|
|
52
|
+
requestParameters.gdpr = gdprConsent.consentString;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Additional Consent String
|
|
56
|
+
const additionalConsent = deepAccess(gdprConsent, 'addtlConsent');
|
|
57
|
+
if (additionalConsent && additionalConsent.indexOf('~') !== -1) {
|
|
58
|
+
// Google Ad Tech Provider IDs
|
|
59
|
+
const atpIds = additionalConsent.substring(additionalConsent.indexOf('~') + 1);
|
|
60
|
+
deepSetValue(
|
|
61
|
+
requestParameters,
|
|
62
|
+
'user.ext.consented_providers_settings.consented_providers',
|
|
63
|
+
atpIds.split('.').map(id => parseInt(id, 10))
|
|
64
|
+
);
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
67
|
|
|
52
68
|
if (bidderRequest && bidderRequest.uspConsent) {
|
|
@@ -3,11 +3,11 @@ import { config } from '../src/config.js';
|
|
|
3
3
|
import { auctionManager } from '../src/auctionManager.js';
|
|
4
4
|
import { INSTREAM } from '../src/video.js';
|
|
5
5
|
import * as events from '../src/events.js';
|
|
6
|
-
import
|
|
6
|
+
import CONSTANTS from '../src/constants.json'
|
|
7
7
|
|
|
8
|
-
const {CACHE_ID, UUID} = TARGETING_KEYS;
|
|
9
|
-
const {BID_WON, AUCTION_END} = EVENTS;
|
|
10
|
-
const {RENDERED} = BID_STATUS;
|
|
8
|
+
const {CACHE_ID, UUID} = CONSTANTS.TARGETING_KEYS;
|
|
9
|
+
const {BID_WON, AUCTION_END} = CONSTANTS.EVENTS;
|
|
10
|
+
const {RENDERED} = CONSTANTS.BID_STATUS;
|
|
11
11
|
|
|
12
12
|
const INSTREAM_TRACKING_DEFAULT_CONFIG = {
|
|
13
13
|
enabled: false,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import {submodule} from '../src/hook.js';
|
|
2
|
+
import {isFn, logError} from '../src/utils.js';
|
|
3
|
+
import {config} from '../src/config.js';
|
|
4
|
+
import {getGlobal} from '../src/prebidGlobal.js';
|
|
5
|
+
import includes from 'core-js-pure/features/array/includes.js';
|
|
6
|
+
import '../src/adapterManager.js';
|
|
7
|
+
let observerAvailable = true;
|
|
8
|
+
function getIntersectionData(requestBidsObject, onDone, providerConfig, userConsent) {
|
|
9
|
+
const intersectionMap = {};
|
|
10
|
+
const placeholdersMap = {};
|
|
11
|
+
let done = false;
|
|
12
|
+
if (!observerAvailable) return complete();
|
|
13
|
+
const observer = new IntersectionObserver(observerCallback, {threshold: 0.5});
|
|
14
|
+
const adUnitCodes = requestBidsObject.adUnitCodes || [];
|
|
15
|
+
const auctionDelay = config.getConfig('realTimeData.auctionDelay') || 0;
|
|
16
|
+
const waitForIt = providerConfig.waitForIt;
|
|
17
|
+
let adUnits = requestBidsObject.adUnits || getGlobal().adUnits || [];
|
|
18
|
+
if (adUnitCodes.length) {
|
|
19
|
+
adUnits = adUnits.filter(unit => includes(adUnitCodes, unit.code));
|
|
20
|
+
}
|
|
21
|
+
let checkTimeoutId;
|
|
22
|
+
findAndObservePlaceholders();
|
|
23
|
+
if (auctionDelay > 0) {
|
|
24
|
+
setTimeout(complete, auctionDelay);
|
|
25
|
+
}
|
|
26
|
+
function findAndObservePlaceholders() {
|
|
27
|
+
const observed = adUnits.filter((unit) => {
|
|
28
|
+
const code = unit.code;
|
|
29
|
+
if (placeholdersMap[code]) return true;
|
|
30
|
+
const ph = document.getElementById(code);
|
|
31
|
+
if (ph) {
|
|
32
|
+
placeholdersMap[code] = ph;
|
|
33
|
+
observer.observe(ph);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (
|
|
38
|
+
observed.length === adUnits.length ||
|
|
39
|
+
!waitForIt ||
|
|
40
|
+
auctionDelay <= 0
|
|
41
|
+
) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
checkTimeoutId = setTimeout(findAndObservePlaceholders);
|
|
45
|
+
}
|
|
46
|
+
function observerCallback(entries) {
|
|
47
|
+
let entry = entries.pop();
|
|
48
|
+
while (entry) {
|
|
49
|
+
const target = entry.target;
|
|
50
|
+
const id = target.getAttribute('id');
|
|
51
|
+
if (id) {
|
|
52
|
+
const intersection = intersectionMap[id];
|
|
53
|
+
if (!intersection || intersection.time < entry.time) {
|
|
54
|
+
intersectionMap[id] = {
|
|
55
|
+
'boundingClientRect': cloneRect(entry.boundingClientRect),
|
|
56
|
+
'intersectionRect': cloneRect(entry.intersectionRect),
|
|
57
|
+
'rootRect': cloneRect(entry.rootRect),
|
|
58
|
+
'intersectionRatio': entry.intersectionRatio,
|
|
59
|
+
'isIntersecting': entry.isIntersecting,
|
|
60
|
+
'time': entry.time
|
|
61
|
+
};
|
|
62
|
+
if (adUnits.every(unit => !!intersectionMap[unit.code])) {
|
|
63
|
+
complete();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
entry = entries.pop();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function complete() {
|
|
71
|
+
if (done) return;
|
|
72
|
+
if (checkTimeoutId) clearTimeout(checkTimeoutId);
|
|
73
|
+
done = true;
|
|
74
|
+
checkTimeoutId = null;
|
|
75
|
+
observer && observer.disconnect();
|
|
76
|
+
adUnits && adUnits.forEach((unit) => {
|
|
77
|
+
const intersection = intersectionMap[unit.code];
|
|
78
|
+
if (intersection && unit.bids) {
|
|
79
|
+
unit.bids.forEach(bid => bid.intersection = intersection);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
onDone();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function init(moduleConfig) {
|
|
86
|
+
if (!isFn(window.IntersectionObserver)) {
|
|
87
|
+
logError('IntersectionObserver is not defined');
|
|
88
|
+
observerAvailable = false;
|
|
89
|
+
} else {
|
|
90
|
+
observerAvailable = true;
|
|
91
|
+
}
|
|
92
|
+
return observerAvailable;
|
|
93
|
+
}
|
|
94
|
+
function cloneRect(rect) {
|
|
95
|
+
return rect ? {
|
|
96
|
+
'left': rect.left,
|
|
97
|
+
'top': rect.top,
|
|
98
|
+
'right': rect.right,
|
|
99
|
+
'bottom': rect.bottom,
|
|
100
|
+
'width': rect.width,
|
|
101
|
+
'height': rect.height,
|
|
102
|
+
'x': rect.x,
|
|
103
|
+
'y': rect.y,
|
|
104
|
+
} : rect;
|
|
105
|
+
}
|
|
106
|
+
export const intersectionSubmodule = {
|
|
107
|
+
name: 'intersection',
|
|
108
|
+
getBidRequestData: getIntersectionData,
|
|
109
|
+
init: init,
|
|
110
|
+
};
|
|
111
|
+
function registerSubModule() {
|
|
112
|
+
submodule('realTimeData', intersectionSubmodule);
|
|
113
|
+
}
|
|
114
|
+
registerSubModule();
|
|
@@ -4,7 +4,8 @@ import {getStorageManager} from '../src/storageManager.js';
|
|
|
4
4
|
|
|
5
5
|
const CONSTANTS = {
|
|
6
6
|
BIDDER_CODE: 'invibes',
|
|
7
|
-
BID_ENDPOINT: '
|
|
7
|
+
BID_ENDPOINT: '.videostep.com/Bid/VideoAdContent',
|
|
8
|
+
BID_SUBDOMAIN: 'https://bid',
|
|
8
9
|
SYNC_ENDPOINT: 'https://k.r66net.com/GetUserSync',
|
|
9
10
|
TIME_TO_LIVE: 300,
|
|
10
11
|
DEFAULT_CURRENCY: 'EUR',
|
|
@@ -77,13 +78,15 @@ function isBidRequestValid(bid) {
|
|
|
77
78
|
function buildRequest(bidRequests, bidderRequest) {
|
|
78
79
|
bidderRequest = bidderRequest || {};
|
|
79
80
|
const _placementIds = [];
|
|
80
|
-
|
|
81
|
+
const _adUnitCodes = [];
|
|
82
|
+
let _customEndpoint, _userId, _domainId;
|
|
81
83
|
let _ivAuctionStart = bidderRequest.auctionStart || Date.now();
|
|
82
84
|
|
|
83
85
|
bidRequests.forEach(function (bidRequest) {
|
|
84
86
|
bidRequest.startTime = new Date().getTime();
|
|
85
87
|
_placementIds.push(bidRequest.params.placementId);
|
|
86
|
-
|
|
88
|
+
_adUnitCodes.push(bidRequest.adUnitCode);
|
|
89
|
+
_domainId = _domainId || bidRequest.params.domainId;
|
|
87
90
|
_customEndpoint = _customEndpoint || bidRequest.params.customEndpoint;
|
|
88
91
|
_customUserSync = _customUserSync || bidRequest.params.customUserSync;
|
|
89
92
|
_userId = _userId || bidRequest.userId;
|
|
@@ -99,7 +102,7 @@ function buildRequest(bidRequests, bidderRequest) {
|
|
|
99
102
|
let userIdModel = getUserIds(_userId);
|
|
100
103
|
let bidParamsJson = {
|
|
101
104
|
placementIds: _placementIds,
|
|
102
|
-
|
|
105
|
+
adUnitCodes: _adUnitCodes,
|
|
103
106
|
auctionStartTime: _ivAuctionStart,
|
|
104
107
|
bidVersion: CONSTANTS.PREBID_VERSION
|
|
105
108
|
};
|
|
@@ -143,9 +146,11 @@ function buildRequest(bidRequests, bidderRequest) {
|
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
148
|
|
|
149
|
+
let endpoint = createEndpoint(_customEndpoint, _domainId, _placementIds);
|
|
150
|
+
|
|
146
151
|
return {
|
|
147
152
|
method: CONSTANTS.METHOD,
|
|
148
|
-
url:
|
|
153
|
+
url: endpoint,
|
|
149
154
|
data: data,
|
|
150
155
|
options: {withCredentials: true},
|
|
151
156
|
// for POST: { contentType: 'application/json', withCredentials: true }
|
|
@@ -181,9 +186,12 @@ function handleResponse(responseObj, bidRequests) {
|
|
|
181
186
|
const bidResponses = [];
|
|
182
187
|
for (let i = 0; i < bidRequests.length; i++) {
|
|
183
188
|
let bidRequest = bidRequests[i];
|
|
189
|
+
let usedPlacementId = responseObj.UseAdUnitCode === true
|
|
190
|
+
? bidRequest.params.placementId + '_' + bidRequest.adUnitCode
|
|
191
|
+
: bidRequest.params.placementId;
|
|
184
192
|
|
|
185
|
-
if (invibes.placementBids.indexOf(
|
|
186
|
-
logInfo('Invibes Adapter - Placement was previously bid on ' +
|
|
193
|
+
if (invibes.placementBids.indexOf(usedPlacementId) > -1) {
|
|
194
|
+
logInfo('Invibes Adapter - Placement was previously bid on ' + usedPlacementId);
|
|
187
195
|
continue;
|
|
188
196
|
}
|
|
189
197
|
|
|
@@ -191,21 +199,21 @@ function handleResponse(responseObj, bidRequests) {
|
|
|
191
199
|
if (responseObj.AdPlacements != null) {
|
|
192
200
|
for (let j = 0; j < responseObj.AdPlacements.length; j++) {
|
|
193
201
|
let bidModel = responseObj.AdPlacements[j].BidModel;
|
|
194
|
-
if (bidModel != null && bidModel.PlacementId ==
|
|
202
|
+
if (bidModel != null && bidModel.PlacementId == usedPlacementId) {
|
|
195
203
|
requestPlacement = responseObj.AdPlacements[j];
|
|
196
204
|
break;
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
207
|
} else {
|
|
200
208
|
let bidModel = responseObj.BidModel;
|
|
201
|
-
if (bidModel != null && bidModel.PlacementId ==
|
|
209
|
+
if (bidModel != null && bidModel.PlacementId == usedPlacementId) {
|
|
202
210
|
requestPlacement = responseObj;
|
|
203
211
|
}
|
|
204
212
|
}
|
|
205
213
|
|
|
206
|
-
let bid = createBid(bidRequest, requestPlacement, responseObj.MultipositionEnabled);
|
|
214
|
+
let bid = createBid(bidRequest, requestPlacement, responseObj.MultipositionEnabled, usedPlacementId);
|
|
207
215
|
if (bid !== null) {
|
|
208
|
-
invibes.placementBids.push(
|
|
216
|
+
invibes.placementBids.push(usedPlacementId);
|
|
209
217
|
bidResponses.push(bid);
|
|
210
218
|
}
|
|
211
219
|
}
|
|
@@ -213,9 +221,9 @@ function handleResponse(responseObj, bidRequests) {
|
|
|
213
221
|
return bidResponses;
|
|
214
222
|
}
|
|
215
223
|
|
|
216
|
-
function createBid(bidRequest, requestPlacement, multipositionEnabled) {
|
|
224
|
+
function createBid(bidRequest, requestPlacement, multipositionEnabled, usedPlacementId) {
|
|
217
225
|
if (requestPlacement === null || requestPlacement.BidModel === null) {
|
|
218
|
-
logInfo('Invibes Adapter - Placement not configured for bidding ' +
|
|
226
|
+
logInfo('Invibes Adapter - Placement not configured for bidding ' + usedPlacementId);
|
|
219
227
|
return null;
|
|
220
228
|
}
|
|
221
229
|
|
|
@@ -274,6 +282,48 @@ function createBid(bidRequest, requestPlacement, multipositionEnabled) {
|
|
|
274
282
|
};
|
|
275
283
|
}
|
|
276
284
|
|
|
285
|
+
function createEndpoint(customEndpoint, domainId, placementIds) {
|
|
286
|
+
if (customEndpoint != null) {
|
|
287
|
+
return customEndpoint;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (domainId != null) {
|
|
291
|
+
return extractEndpointFromId(domainId - 1000);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (placementIds.length > 0) {
|
|
295
|
+
for (var i = 0; i < placementIds.length; i++) {
|
|
296
|
+
const id = extractFromPlacement(placementIds[i]);
|
|
297
|
+
if (id != null) {
|
|
298
|
+
return extractEndpointFromId(id);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return extractEndpointFromId(1);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function extractEndpointFromId(domainId) {
|
|
307
|
+
if (domainId < 2) {
|
|
308
|
+
return CONSTANTS.BID_SUBDOMAIN + CONSTANTS.BID_ENDPOINT;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return CONSTANTS.BID_SUBDOMAIN + domainId + CONSTANTS.BID_ENDPOINT;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function extractFromPlacement(placementId) {
|
|
315
|
+
if (placementId == null) { return null; }
|
|
316
|
+
|
|
317
|
+
var pattern = /_ivbs([0-9]+)/g;
|
|
318
|
+
|
|
319
|
+
var match = pattern.exec(placementId);
|
|
320
|
+
if (match != null && match[1] != null) {
|
|
321
|
+
return parseInt(match[1]);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
|
|
277
327
|
function addMeta(bidModelMeta) {
|
|
278
328
|
var meta = {};
|
|
279
329
|
if (bidModelMeta != null) {
|
|
@@ -684,7 +734,7 @@ let keywords = (function () {
|
|
|
684
734
|
return kw;
|
|
685
735
|
}());
|
|
686
736
|
|
|
687
|
-
//
|
|
737
|
+
// ======================
|
|
688
738
|
|
|
689
739
|
export function resetInvibes() {
|
|
690
740
|
invibes.optIn = undefined;
|