prebid.js 8.26.0 → 8.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.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/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bizzclickBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.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/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/deepintentBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.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/flippBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/geoedgeRtdProvider.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeRtdProvider.js +1 -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/identityLinkIdSystem.js +1 -1
- package/dist/illuminBidAdapter.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invibesBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.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/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/mediagoBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidXBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +156 -156
- 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/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pgamsspBidAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.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/rtdModule.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/shinezRtbBidAdapter.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/sparteoBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/theAdxBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/viantOrtbBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/voxBidAdapter.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/modules/adagioAnalyticsAdapter.js +52 -6
- package/modules/adagioBidAdapter.js +25 -16
- package/modules/adnuntiusBidAdapter.js +25 -21
- package/modules/bizzclickBidAdapter.js +55 -300
- package/modules/bizzclickBidAdapter.md +94 -89
- package/modules/browsiRtdProvider.js +2 -2
- package/modules/criteoBidAdapter.js +1 -0
- package/modules/deepintentBidAdapter.js +2 -0
- package/modules/flippBidAdapter.js +1 -1
- package/modules/geoedgeRtdProvider.js +4 -2
- package/modules/growthCodeRtdProvider.js +2 -2
- package/modules/gumgumBidAdapter.js +3 -3
- package/modules/identityLinkIdSystem.js +1 -2
- package/modules/invibesBidAdapter.js +50 -6
- package/modules/liveIntentIdSystem.js +17 -1
- package/modules/mediagoBidAdapter.js +106 -34
- package/modules/mgidXBidAdapter.js +6 -1
- package/modules/minutemediaBidAdapter.js +9 -7
- package/modules/minutemediaBidAdapter.md +1 -0
- package/modules/nextMillenniumBidAdapter.js +170 -113
- package/modules/pgamsspBidAdapter.js +18 -1
- package/modules/pubmaticAnalyticsAdapter.js +30 -9
- package/modules/pubmaticBidAdapter.js +3 -1
- package/modules/riseBidAdapter.js +11 -8
- package/modules/riseBidAdapter.md +1 -0
- package/modules/rtdModule/index.js +2 -1
- package/modules/sovrnBidAdapter.js +5 -0
- package/modules/sparteoBidAdapter.js +10 -5
- package/modules/taboolaBidAdapter.js +8 -0
- package/modules/teadsBidAdapter.js +7 -0
- package/modules/theAdxBidAdapter.js +10 -2
- package/modules/theAdxBidAdapter.md +10 -9
- package/modules/unrulyBidAdapter.js +8 -1
- package/modules/userId/eids.js +2 -2
- package/modules/viantOrtbBidAdapter.js +1 -1
- package/modules/visxBidAdapter.js +23 -0
- package/modules/voxBidAdapter.js +2 -0
- package/package.json +1 -1
- package/src/auction.js +1 -1
- package/src/constants.json +5 -2
- package/src/events.js +1 -1
- package/test/spec/modules/adagioAnalyticsAdapter_spec.js +83 -26
- package/test/spec/modules/adagioBidAdapter_spec.js +0 -11
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +1 -1
- package/test/spec/modules/bizzclickBidAdapter_spec.js +229 -340
- package/test/spec/modules/browsiRtdProvider_spec.js +0 -6
- package/test/spec/modules/criteoBidAdapter_spec.js +24 -0
- package/test/spec/modules/eids_spec.js +35 -2
- package/test/spec/modules/geoedgeRtdProvider_spec.js +10 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +8 -0
- package/test/spec/modules/identityLinkIdSystem_spec.js +0 -18
- package/test/spec/modules/invibesBidAdapter_spec.js +99 -0
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
- package/test/spec/modules/liveIntentIdSystem_spec.js +5 -0
- package/test/spec/modules/mediagoBidAdapter_spec.js +107 -23
- package/test/spec/modules/mgidXBidAdapter_spec.js +9 -4
- package/test/spec/modules/minutemediaBidAdapter_spec.js +10 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +503 -80
- package/test/spec/modules/pgamsspBidAdapter_spec.js +1 -0
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +51 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +8 -0
- package/test/spec/modules/riseBidAdapter_spec.js +11 -1
- package/test/spec/modules/sovrnBidAdapter_spec.js +35 -0
- package/test/spec/modules/sparteoBidAdapter_spec.js +8 -2
- package/test/spec/modules/taboolaBidAdapter_spec.js +45 -1
- package/test/spec/modules/teadsBidAdapter_spec.js +58 -0
- package/test/spec/modules/theAdxBidAdapter_spec.js +72 -0
- package/test/spec/modules/unrulyBidAdapter_spec.js +7 -4
- package/test/spec/modules/userId_spec.js +19 -1
- package/test/spec/modules/viantOrtbBidAdapter_spec.js +1 -1
- package/test/spec/modules/visxBidAdapter_spec.js +39 -1
- package/test/spec/unit/core/events_spec.js +17 -2
- package/test/spec/unit/pbjs_api_spec.js +7 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_each,
|
|
3
3
|
createTrackPixelHtml,
|
|
4
|
-
deepAccess,
|
|
4
|
+
deepAccess,
|
|
5
|
+
deepSetValue,
|
|
6
|
+
getBidIdParameter,
|
|
5
7
|
getDefinedParams,
|
|
6
8
|
getWindowTop,
|
|
7
9
|
isArray,
|
|
@@ -12,6 +14,7 @@ import {
|
|
|
12
14
|
triggerPixel,
|
|
13
15
|
} from '../src/utils.js';
|
|
14
16
|
|
|
17
|
+
import {getGlobal} from '../src/prebidGlobal.js';
|
|
15
18
|
import CONSTANTS from '../src/constants.json';
|
|
16
19
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
17
20
|
import {config} from '../src/config.js';
|
|
@@ -20,17 +23,33 @@ import * as events from '../src/events.js';
|
|
|
20
23
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
21
24
|
import {getRefererInfo} from '../src/refererDetection.js';
|
|
22
25
|
|
|
26
|
+
const NM_VERSION = '3.1.0';
|
|
27
|
+
const GVLID = 1060;
|
|
23
28
|
const BIDDER_CODE = 'nextMillennium';
|
|
24
29
|
const ENDPOINT = 'https://pbs.nextmillmedia.com/openrtb2/auction';
|
|
25
30
|
const TEST_ENDPOINT = 'https://test.pbs.nextmillmedia.com/openrtb2/auction';
|
|
26
|
-
const SYNC_ENDPOINT = 'https://cookies.nextmillmedia.com/sync?';
|
|
31
|
+
const SYNC_ENDPOINT = 'https://cookies.nextmillmedia.com/sync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&type={{.TYPE_PIXEL}}';
|
|
27
32
|
const REPORT_ENDPOINT = 'https://report2.hb.brainlyads.com/statistics/metric';
|
|
28
33
|
const TIME_TO_LIVE = 360;
|
|
34
|
+
|
|
29
35
|
const VIDEO_PARAMS = [
|
|
30
|
-
'api',
|
|
31
|
-
'
|
|
36
|
+
'api',
|
|
37
|
+
'linearity',
|
|
38
|
+
'maxduration',
|
|
39
|
+
'mimes',
|
|
40
|
+
'minduration',
|
|
41
|
+
'placement',
|
|
42
|
+
'playbackmethod',
|
|
43
|
+
'protocols',
|
|
44
|
+
'startdelay',
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
const ALLOWED_ORTB2_PARAMETERS = [
|
|
48
|
+
'site.pagecat',
|
|
49
|
+
'site.content.cat',
|
|
50
|
+
'site.content.language',
|
|
51
|
+
'device.sua',
|
|
32
52
|
];
|
|
33
|
-
const GVLID = 1060;
|
|
34
53
|
|
|
35
54
|
const sendingDataStatistic = initSendingDataStatistic();
|
|
36
55
|
events.on(CONSTANTS.EVENTS.AUCTION_INIT, auctionInitHandler);
|
|
@@ -61,85 +80,37 @@ export const spec = {
|
|
|
61
80
|
const id = getPlacementId(bid);
|
|
62
81
|
const auctionId = bid.auctionId;
|
|
63
82
|
const bidId = bid.bidId;
|
|
64
|
-
let sizes = bid.sizes;
|
|
65
|
-
if (sizes && !Array.isArray(sizes[0])) sizes = [sizes];
|
|
66
83
|
|
|
67
84
|
const site = getSiteObj();
|
|
68
85
|
const device = getDeviceObj();
|
|
69
86
|
|
|
70
87
|
const postBody = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
88
|
+
id: bidderRequest?.bidderRequestId,
|
|
89
|
+
ext: {
|
|
90
|
+
prebid: {
|
|
91
|
+
storedrequest: {
|
|
92
|
+
id,
|
|
93
|
+
},
|
|
77
94
|
},
|
|
78
95
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
nextMillennium: {
|
|
97
|
+
nm_version: NM_VERSION,
|
|
98
|
+
pbjs_version: getGlobal()?.version || undefined,
|
|
99
|
+
refresh_count: window.nmmRefreshCounts[bid.adUnitCode]++,
|
|
100
|
+
elOffsets: getBoundingClient(bid),
|
|
101
|
+
scrollTop: window.pageYOffset || document.documentElement.scrollTop,
|
|
102
|
+
},
|
|
84
103
|
},
|
|
85
104
|
|
|
86
105
|
device,
|
|
87
106
|
site,
|
|
88
|
-
imp: []
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const imp = {
|
|
92
|
-
id: bid.adUnitCode,
|
|
93
|
-
ext: {
|
|
94
|
-
prebid: {
|
|
95
|
-
storedrequest: {id}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
if (deepAccess(bid, 'mediaTypes.banner')) {
|
|
101
|
-
imp.banner = {
|
|
102
|
-
format: (sizes || []).map(s => { return {w: s[0], h: s[1]} })
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const video = deepAccess(bid, 'mediaTypes.video');
|
|
107
|
-
if (video) {
|
|
108
|
-
imp.video = getDefinedParams(video, VIDEO_PARAMS);
|
|
109
|
-
if (video.playerSize) {
|
|
110
|
-
imp.video = Object.assign(
|
|
111
|
-
imp.video, parseGPTSingleSizeArrayToRtbSize(video.playerSize[0]) || {}
|
|
112
|
-
);
|
|
113
|
-
} else if (video.w && video.h) {
|
|
114
|
-
imp.video.w = video.w;
|
|
115
|
-
imp.video.h = video.h;
|
|
116
|
-
};
|
|
107
|
+
imp: [],
|
|
117
108
|
};
|
|
118
109
|
|
|
119
|
-
postBody.imp.push(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (gdprConsent || uspConsent) {
|
|
125
|
-
postBody.regs = { ext: {} };
|
|
126
|
-
|
|
127
|
-
if (uspConsent) {
|
|
128
|
-
postBody.regs.ext.us_privacy = uspConsent;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
if (gdprConsent) {
|
|
132
|
-
if (typeof gdprConsent.gdprApplies !== 'undefined') {
|
|
133
|
-
postBody.regs.ext.gdpr = gdprConsent.gdprApplies ? 1 : 0;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
if (typeof gdprConsent.consentString !== 'undefined') {
|
|
137
|
-
postBody.user = {
|
|
138
|
-
ext: { consent: gdprConsent.consentString }
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
};
|
|
110
|
+
postBody.imp.push(getImp(bid, id));
|
|
111
|
+
setConsentStrings(postBody, bidderRequest);
|
|
112
|
+
setOrtb2Parameters(postBody, bidderRequest?.ortb2);
|
|
113
|
+
setEids(postBody, bid);
|
|
143
114
|
|
|
144
115
|
const urlParameters = parseUrl(getWindowTop().location.href).search;
|
|
145
116
|
const isTest = urlParameters['pbs'] && urlParameters['pbs'] === 'test';
|
|
@@ -151,7 +122,7 @@ export const spec = {
|
|
|
151
122
|
data: JSON.stringify(postBody),
|
|
152
123
|
options: {
|
|
153
124
|
contentType: 'text/plain',
|
|
154
|
-
withCredentials: true
|
|
125
|
+
withCredentials: true,
|
|
155
126
|
},
|
|
156
127
|
|
|
157
128
|
bidId,
|
|
@@ -173,6 +144,7 @@ export const spec = {
|
|
|
173
144
|
const params = bidRequest.params;
|
|
174
145
|
const auctionId = bidRequest.auctionId;
|
|
175
146
|
const wurl = deepAccess(bid, 'ext.prebid.events.win');
|
|
147
|
+
|
|
176
148
|
// TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
|
|
177
149
|
addWurl({auctionId, requestId, wurl});
|
|
178
150
|
|
|
@@ -189,8 +161,8 @@ export const spec = {
|
|
|
189
161
|
netRevenue: true,
|
|
190
162
|
ttl: TIME_TO_LIVE,
|
|
191
163
|
meta: {
|
|
192
|
-
advertiserDomains: bid.adomain || []
|
|
193
|
-
}
|
|
164
|
+
advertiserDomains: bid.adomain || [],
|
|
165
|
+
},
|
|
194
166
|
};
|
|
195
167
|
|
|
196
168
|
if (vastUrl || vastXml) {
|
|
@@ -210,38 +182,29 @@ export const spec = {
|
|
|
210
182
|
return bidResponses;
|
|
211
183
|
},
|
|
212
184
|
|
|
213
|
-
getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent) {
|
|
185
|
+
getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent, gppConsent) {
|
|
186
|
+
if (!syncOptions.iframeEnabled && !syncOptions.pixelEnabled) return [];
|
|
187
|
+
|
|
214
188
|
const pixels = [];
|
|
189
|
+
const getSetPixelFunc = type => url => { pixels.push({type, url: replaceUsersyncMacros(url, gdprConsent, uspConsent, gppConsent, type)}) };
|
|
190
|
+
const getSetPixelsFunc = type => response => { deepAccess(response, `body.ext.sync.${type}`, []).forEach(getSetPixelFunc(type)) };
|
|
191
|
+
|
|
192
|
+
const setPixel = (type, url) => { (getSetPixelFunc(type))(url) };
|
|
193
|
+
const setPixelImages = getSetPixelsFunc('image');
|
|
194
|
+
const setPixelIframes = getSetPixelsFunc('iframe');
|
|
215
195
|
|
|
216
196
|
if (isArray(responses)) {
|
|
217
197
|
responses.forEach(response => {
|
|
218
|
-
if (syncOptions.pixelEnabled)
|
|
219
|
-
|
|
220
|
-
pixels.push({
|
|
221
|
-
type: 'image',
|
|
222
|
-
url: replaceUsersyncMacros(imgUrl, gdprConsent, uspConsent)
|
|
223
|
-
});
|
|
224
|
-
})
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (syncOptions.iframeEnabled) {
|
|
228
|
-
deepAccess(response, 'body.ext.sync.iframe', []).forEach(iframeUrl => {
|
|
229
|
-
pixels.push({
|
|
230
|
-
type: 'iframe',
|
|
231
|
-
url: replaceUsersyncMacros(iframeUrl, gdprConsent, uspConsent)
|
|
232
|
-
});
|
|
233
|
-
})
|
|
234
|
-
}
|
|
198
|
+
if (syncOptions.pixelEnabled) setPixelImages(response);
|
|
199
|
+
if (syncOptions.iframeEnabled) setPixelIframes(response);
|
|
235
200
|
})
|
|
236
201
|
}
|
|
237
202
|
|
|
238
203
|
if (!pixels.length) {
|
|
239
|
-
|
|
240
|
-
if (
|
|
241
|
-
if (uspConsent) syncUrl += 'us_privacy=' + uspConsent + '&';
|
|
242
|
-
if (syncOptions.iframeEnabled) pixels.push({type: 'iframe', url: syncUrl + 'type=iframe'});
|
|
243
|
-
if (syncOptions.pixelEnabled) pixels.push({type: 'image', url: syncUrl + 'type=image'});
|
|
204
|
+
if (syncOptions.pixelEnabled) setPixel('image', SYNC_ENDPOINT);
|
|
205
|
+
if (syncOptions.iframeEnabled) setPixel('iframe', SYNC_ENDPOINT);
|
|
244
206
|
}
|
|
207
|
+
|
|
245
208
|
return pixels;
|
|
246
209
|
},
|
|
247
210
|
|
|
@@ -281,24 +244,94 @@ export const spec = {
|
|
|
281
244
|
},
|
|
282
245
|
};
|
|
283
246
|
|
|
284
|
-
function
|
|
285
|
-
const
|
|
247
|
+
export function getImp(bid, id) {
|
|
248
|
+
const imp = {
|
|
249
|
+
id: bid.adUnitCode,
|
|
250
|
+
ext: {
|
|
251
|
+
prebid: {
|
|
252
|
+
storedrequest: {
|
|
253
|
+
id,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const banner = deepAccess(bid, 'mediaTypes.banner');
|
|
260
|
+
if (banner) {
|
|
261
|
+
imp.banner = {
|
|
262
|
+
format: (banner?.sizes || []).map(s => { return {w: s[0], h: s[1]} }),
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
const video = deepAccess(bid, 'mediaTypes.video');
|
|
267
|
+
if (video) {
|
|
268
|
+
imp.video = getDefinedParams(video, VIDEO_PARAMS);
|
|
269
|
+
if (video.playerSize) {
|
|
270
|
+
imp.video = Object.assign(imp.video, parseGPTSingleSizeArrayToRtbSize(video.playerSize) || {});
|
|
271
|
+
} else if (video.w && video.h) {
|
|
272
|
+
imp.video.w = video.w;
|
|
273
|
+
imp.video.h = video.h;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
return imp;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
export function setConsentStrings(postBody = {}, bidderRequest) {
|
|
281
|
+
const gdprConsent = bidderRequest?.gdprConsent;
|
|
282
|
+
const uspConsent = bidderRequest?.uspConsent;
|
|
283
|
+
let gppConsent = bidderRequest?.gppConsent?.gppString && bidderRequest?.gppConsent;
|
|
284
|
+
if (!gppConsent && bidderRequest?.ortb2?.regs?.gpp) gppConsent = bidderRequest?.ortb2?.regs;
|
|
286
285
|
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
url = url.replace('{{.GDPR}}', gdpr);
|
|
286
|
+
if (gdprConsent || uspConsent || gppConsent) {
|
|
287
|
+
postBody.regs = { ext: {} };
|
|
290
288
|
|
|
291
|
-
if (
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
289
|
+
if (uspConsent) {
|
|
290
|
+
postBody.regs.ext.us_privacy = uspConsent;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
if (gppConsent) {
|
|
294
|
+
postBody.regs.gpp = gppConsent?.gppString || gppConsent?.gpp;
|
|
295
|
+
postBody.regs.gpp_sid = bidderRequest.gppConsent?.applicableSections || gppConsent?.gpp_sid;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
if (gdprConsent) {
|
|
299
|
+
if (typeof gdprConsent.gdprApplies !== 'undefined') {
|
|
300
|
+
postBody.regs.ext.gdpr = gdprConsent.gdprApplies ? 1 : 0;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
if (typeof gdprConsent.consentString !== 'undefined') {
|
|
304
|
+
postBody.user = {
|
|
305
|
+
ext: { consent: gdprConsent.consentString },
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
298
311
|
|
|
299
|
-
|
|
300
|
-
|
|
312
|
+
export function setOrtb2Parameters(postBody, ortb2 = {}) {
|
|
313
|
+
for (let parameter of ALLOWED_ORTB2_PARAMETERS) {
|
|
314
|
+
const value = deepAccess(ortb2, parameter);
|
|
315
|
+
if (value) deepSetValue(postBody, parameter, value);
|
|
301
316
|
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function setEids(postBody, bid) {
|
|
320
|
+
if (!isArray(bid.userIdAsEids) || !bid.userIdAsEids.length) return;
|
|
321
|
+
|
|
322
|
+
deepSetValue(postBody, 'user.eids', bid.userIdAsEids);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function replaceUsersyncMacros(url, gdprConsent = {}, uspConsent = '', gppConsent = {}, type = '') {
|
|
326
|
+
const { consentString = '', gdprApplies = false } = gdprConsent;
|
|
327
|
+
const gdpr = Number(gdprApplies);
|
|
328
|
+
url = url
|
|
329
|
+
.replace('{{.GDPR}}', gdpr)
|
|
330
|
+
.replace('{{.GDPRConsent}}', consentString)
|
|
331
|
+
.replace('{{.USPrivacy}}', uspConsent)
|
|
332
|
+
.replace('{{.GPP}}', gppConsent.gppString || '')
|
|
333
|
+
.replace('{{.GPPSID}}', (gppConsent.applicableSections || []).join(','))
|
|
334
|
+
.replace('{{.TYPE_PIXEL}}', type);
|
|
302
335
|
|
|
303
336
|
return url;
|
|
304
337
|
};
|
|
@@ -368,7 +401,7 @@ function getAd(bid) {
|
|
|
368
401
|
} else if (bid.nurl) {
|
|
369
402
|
adUrl = bid.nurl;
|
|
370
403
|
};
|
|
371
|
-
}
|
|
404
|
+
};
|
|
372
405
|
|
|
373
406
|
return {ad, adUrl, vastXml, vastUrl};
|
|
374
407
|
}
|
|
@@ -376,10 +409,21 @@ function getAd(bid) {
|
|
|
376
409
|
function getSiteObj() {
|
|
377
410
|
const refInfo = (getRefererInfo && getRefererInfo()) || {};
|
|
378
411
|
|
|
412
|
+
let language = navigator.language;
|
|
413
|
+
let content;
|
|
414
|
+
if (language) {
|
|
415
|
+
// get ISO-639-1-alpha-2 (2 character language)
|
|
416
|
+
language = language.split('-')[0];
|
|
417
|
+
content = {
|
|
418
|
+
language,
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
|
|
379
422
|
return {
|
|
380
423
|
page: refInfo.page,
|
|
381
424
|
ref: refInfo.ref,
|
|
382
|
-
domain: refInfo.domain
|
|
425
|
+
domain: refInfo.domain,
|
|
426
|
+
content,
|
|
383
427
|
};
|
|
384
428
|
}
|
|
385
429
|
|
|
@@ -387,6 +431,19 @@ function getDeviceObj() {
|
|
|
387
431
|
return {
|
|
388
432
|
w: window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth || 0,
|
|
389
433
|
h: window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight || 0,
|
|
434
|
+
ua: window.navigator.userAgent || undefined,
|
|
435
|
+
sua: getSua(),
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function getSua() {
|
|
440
|
+
let {brands, mobile, platform} = (window?.navigator?.userAgentData || {});
|
|
441
|
+
if (!(brands && platform)) return undefined;
|
|
442
|
+
|
|
443
|
+
return {
|
|
444
|
+
brands,
|
|
445
|
+
mobile: Number(!!mobile),
|
|
446
|
+
platform: (platform && {brand: platform}) || undefined,
|
|
390
447
|
};
|
|
391
448
|
}
|
|
392
449
|
|
|
@@ -35,9 +35,14 @@ function getPlacementReqData(bid) {
|
|
|
35
35
|
const placement = {
|
|
36
36
|
bidId,
|
|
37
37
|
schain,
|
|
38
|
-
bidfloor
|
|
38
|
+
bidfloor,
|
|
39
|
+
eids: []
|
|
39
40
|
};
|
|
40
41
|
|
|
42
|
+
if (bid.userId) {
|
|
43
|
+
getUserId(placement.eids, bid.userId.uid2 && bid.userId.uid2.id, 'uidapi.com');
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
if (placementId) {
|
|
42
47
|
placement.placementId = placementId;
|
|
43
48
|
placement.type = 'publisher';
|
|
@@ -91,6 +96,18 @@ function getBidFloor(bid) {
|
|
|
91
96
|
return 0;
|
|
92
97
|
}
|
|
93
98
|
}
|
|
99
|
+
function getUserId(eids, id, source, uidExt) {
|
|
100
|
+
if (id) {
|
|
101
|
+
var uid = { id };
|
|
102
|
+
if (uidExt) {
|
|
103
|
+
uid.ext = uidExt;
|
|
104
|
+
}
|
|
105
|
+
eids.push({
|
|
106
|
+
source,
|
|
107
|
+
uids: [ uid ]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
94
111
|
|
|
95
112
|
export const spec = {
|
|
96
113
|
code: BIDDER_CODE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_each, isArray, isStr, logError, logWarn, pick} from '../src/utils.js';
|
|
1
|
+
import {_each, isArray, isStr, logError, logWarn, pick, generateUUID} from '../src/utils.js';
|
|
2
2
|
import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
|
|
3
3
|
import adapterManager from '../src/adapterManager.js';
|
|
4
4
|
import CONSTANTS from '../src/constants.json';
|
|
@@ -286,7 +286,7 @@ function gatherPartnerBidsForAdUnitForLogger(adUnit, adUnitId, highestBid) {
|
|
|
286
286
|
'ocpm': bid.bidResponse ? (bid.bidResponse.originalCpm || 0) : 0,
|
|
287
287
|
'ocry': bid.bidResponse ? (bid.bidResponse.originalCurrency || CURRENCY_USD) : CURRENCY_USD,
|
|
288
288
|
'piid': bid.bidResponse ? (bid.bidResponse.partnerImpId || EMPTY_STRING) : EMPTY_STRING,
|
|
289
|
-
'frv':
|
|
289
|
+
'frv': bid.bidResponse ? bid.bidResponse.floorData?.floorRuleValue : undefined,
|
|
290
290
|
'md': bid.bidResponse ? getMetadata(bid.bidResponse.meta) : undefined
|
|
291
291
|
});
|
|
292
292
|
});
|
|
@@ -337,11 +337,11 @@ function executeBidsLoggerCall(e, highestCpmBids) {
|
|
|
337
337
|
let auctionId = e.auctionId;
|
|
338
338
|
let referrer = config.getConfig('pageUrl') || cache.auctions[auctionId].referer || '';
|
|
339
339
|
let auctionCache = cache.auctions[auctionId];
|
|
340
|
-
let
|
|
340
|
+
let wiid = auctionCache?.wiid || auctionId;
|
|
341
|
+
let floorData = auctionCache?.floorData;
|
|
342
|
+
let floorFetchStatus = getFloorFetchStatus(auctionCache?.floorData);
|
|
341
343
|
let outputObj = { s: [] };
|
|
342
344
|
let pixelURL = END_POINT_BID_LOGGER;
|
|
343
|
-
// will return true if floor data is present.
|
|
344
|
-
let fetchStatus = getFloorFetchStatus(auctionCache.floorData);
|
|
345
345
|
|
|
346
346
|
if (!auctionCache) {
|
|
347
347
|
return;
|
|
@@ -353,7 +353,7 @@ function executeBidsLoggerCall(e, highestCpmBids) {
|
|
|
353
353
|
|
|
354
354
|
pixelURL += 'pubid=' + publisherId;
|
|
355
355
|
outputObj['pubid'] = '' + publisherId;
|
|
356
|
-
outputObj['iid'] = '' +
|
|
356
|
+
outputObj['iid'] = '' + wiid;
|
|
357
357
|
outputObj['to'] = '' + auctionCache.timeout;
|
|
358
358
|
outputObj['purl'] = referrer;
|
|
359
359
|
outputObj['orig'] = getDomainFromUrl(referrer);
|
|
@@ -364,7 +364,7 @@ function executeBidsLoggerCall(e, highestCpmBids) {
|
|
|
364
364
|
outputObj['tgid'] = getTgId();
|
|
365
365
|
outputObj['pbv'] = getGlobal()?.version || '-1';
|
|
366
366
|
|
|
367
|
-
if (floorData &&
|
|
367
|
+
if (floorData && floorFetchStatus) {
|
|
368
368
|
outputObj['fmv'] = floorData.floorRequestData ? floorData.floorRequestData.modelVersion || undefined : undefined;
|
|
369
369
|
outputObj['ft'] = floorData.floorResponseData ? (floorData.floorResponseData.enforcements.enforceJS == false ? 0 : 1) : undefined;
|
|
370
370
|
}
|
|
@@ -379,8 +379,25 @@ function executeBidsLoggerCall(e, highestCpmBids) {
|
|
|
379
379
|
'mt': getAdUnitAdFormats(origAdUnit),
|
|
380
380
|
'sz': getSizesForAdUnit(adUnit, adUnitId),
|
|
381
381
|
'ps': gatherPartnerBidsForAdUnitForLogger(adUnit, adUnitId, highestCpmBids.filter(bid => bid.adUnitCode === adUnitId)),
|
|
382
|
-
'fskp':
|
|
382
|
+
'fskp': floorData && floorFetchStatus ? (floorData.floorRequestData ? (floorData.floorRequestData.skipped == false ? 0 : 1) : undefined) : undefined,
|
|
383
|
+
'sid': generateUUID()
|
|
383
384
|
};
|
|
385
|
+
if (floorData?.floorRequestData) {
|
|
386
|
+
const { location, fetchStatus, floorProvider } = floorData?.floorRequestData;
|
|
387
|
+
slotObject.ffs = {
|
|
388
|
+
[CONSTANTS.FLOOR_VALUES.SUCCESS]: 1,
|
|
389
|
+
[CONSTANTS.FLOOR_VALUES.ERROR]: 2,
|
|
390
|
+
[CONSTANTS.FLOOR_VALUES.TIMEOUT]: 4,
|
|
391
|
+
undefined: 0
|
|
392
|
+
}[fetchStatus];
|
|
393
|
+
slotObject.fsrc = {
|
|
394
|
+
[CONSTANTS.FLOOR_VALUES.FETCH]: 2,
|
|
395
|
+
[CONSTANTS.FLOOR_VALUES.NO_DATA]: 2,
|
|
396
|
+
[CONSTANTS.FLOOR_VALUES.AD_UNIT]: 1,
|
|
397
|
+
[CONSTANTS.FLOOR_VALUES.SET_CONFIG]: 1
|
|
398
|
+
}[location];
|
|
399
|
+
slotObject.fp = floorProvider;
|
|
400
|
+
}
|
|
384
401
|
slotsArray.push(slotObject);
|
|
385
402
|
return slotsArray;
|
|
386
403
|
}, []);
|
|
@@ -412,6 +429,7 @@ function executeBidWonLoggerCall(auctionId, adUnitId) {
|
|
|
412
429
|
let origAdUnit = getAdUnit(cache.auctions[auctionId].origAdUnits, adUnitId) || {};
|
|
413
430
|
let auctionCache = cache.auctions[auctionId];
|
|
414
431
|
let floorData = auctionCache.floorData;
|
|
432
|
+
let wiid = cache.auctions[auctionId]?.wiid || auctionId;
|
|
415
433
|
let referrer = config.getConfig('pageUrl') || cache.auctions[auctionId].referer || '';
|
|
416
434
|
let adv = winningBid.bidResponse ? getAdDomain(winningBid.bidResponse) || undefined : undefined;
|
|
417
435
|
let fskp = floorData ? (floorData.floorRequestData ? (floorData.floorRequestData.skipped == false ? 0 : 1) : undefined) : undefined;
|
|
@@ -420,7 +438,7 @@ function executeBidWonLoggerCall(auctionId, adUnitId) {
|
|
|
420
438
|
pixelURL += 'pubid=' + publisherId;
|
|
421
439
|
pixelURL += '&purl=' + enc(config.getConfig('pageUrl') || cache.auctions[auctionId].referer || '');
|
|
422
440
|
pixelURL += '&tst=' + Math.round((new window.Date()).getTime() / 1000);
|
|
423
|
-
pixelURL += '&iid=' + enc(
|
|
441
|
+
pixelURL += '&iid=' + enc(wiid);
|
|
424
442
|
pixelURL += '&bidid=' + enc(winningBidId);
|
|
425
443
|
pixelURL += '&pid=' + enc(profileId);
|
|
426
444
|
pixelURL += '&pdvid=' + enc(profileVersionId);
|
|
@@ -484,6 +502,9 @@ function bidRequestedHandler(args) {
|
|
|
484
502
|
dimensions: bid.sizes
|
|
485
503
|
};
|
|
486
504
|
}
|
|
505
|
+
if (bid.bidder === 'pubmatic' && !!bid?.params?.wiid) {
|
|
506
|
+
cache.auctions[args.auctionId].wiid = bid.params.wiid;
|
|
507
|
+
}
|
|
487
508
|
cache.auctions[args.auctionId].adUnitCodes[bid.adUnitCode].bids[bid.bidId] = [copyRequiredBidDetails(bid)];
|
|
488
509
|
if (bid.floorData) {
|
|
489
510
|
cache.auctions[args.auctionId].floorData['floorRequestData'] = bid.floorData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getBidRequest, logWarn, isBoolean, isStr, isArray, inIframe, mergeDeep, deepAccess, isNumber, deepSetValue, logInfo, logError, deepClone, uniques, isPlainObject, isInteger } from '../src/utils.js';
|
|
1
|
+
import { getBidRequest, logWarn, isBoolean, isStr, isArray, inIframe, mergeDeep, deepAccess, isNumber, deepSetValue, logInfo, logError, deepClone, uniques, isPlainObject, isInteger, generateUUID } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { BANNER, VIDEO, NATIVE, ADPOD } from '../src/mediaTypes.js';
|
|
4
4
|
import { config } from '../src/config.js';
|
|
@@ -1081,8 +1081,10 @@ export const spec = {
|
|
|
1081
1081
|
var bid;
|
|
1082
1082
|
var blockedIabCategories = [];
|
|
1083
1083
|
var allowedIabCategories = [];
|
|
1084
|
+
var wiid = generateUUID();
|
|
1084
1085
|
|
|
1085
1086
|
validBidRequests.forEach(originalBid => {
|
|
1087
|
+
originalBid.params.wiid = originalBid.params.wiid || bidderRequest.auctionId || wiid;
|
|
1086
1088
|
bid = deepClone(originalBid);
|
|
1087
1089
|
bid.params.adSlot = bid.params.adSlot || '';
|
|
1088
1090
|
_parseAdSlot(bid);
|
|
@@ -19,7 +19,7 @@ const SUPPORTED_AD_TYPES = [BANNER, VIDEO];
|
|
|
19
19
|
const BIDDER_CODE = 'rise';
|
|
20
20
|
const ADAPTER_VERSION = '6.0.0';
|
|
21
21
|
const TTL = 360;
|
|
22
|
-
const
|
|
22
|
+
const DEFAULT_CURRENCY = 'USD';
|
|
23
23
|
const DEFAULT_SELLER_ENDPOINT = 'https://hb.yellowblue.io/';
|
|
24
24
|
const MODES = {
|
|
25
25
|
PRODUCTION: 'hb-multi',
|
|
@@ -73,7 +73,7 @@ export const spec = {
|
|
|
73
73
|
const bidResponse = {
|
|
74
74
|
requestId: adUnit.requestId,
|
|
75
75
|
cpm: adUnit.cpm,
|
|
76
|
-
currency: adUnit.currency ||
|
|
76
|
+
currency: adUnit.currency || DEFAULT_CURRENCY,
|
|
77
77
|
width: adUnit.width,
|
|
78
78
|
height: adUnit.height,
|
|
79
79
|
ttl: adUnit.ttl || TTL,
|
|
@@ -140,18 +140,20 @@ registerBidder(spec);
|
|
|
140
140
|
/**
|
|
141
141
|
* Get floor price
|
|
142
142
|
* @param bid {bid}
|
|
143
|
+
* @param mediaType {string}
|
|
144
|
+
* @param currency {string}
|
|
143
145
|
* @returns {Number}
|
|
144
146
|
*/
|
|
145
|
-
function getFloor(bid, mediaType) {
|
|
147
|
+
function getFloor(bid, mediaType, currency) {
|
|
146
148
|
if (!isFn(bid.getFloor)) {
|
|
147
149
|
return 0;
|
|
148
150
|
}
|
|
149
151
|
let floorResult = bid.getFloor({
|
|
150
|
-
currency:
|
|
152
|
+
currency: currency,
|
|
151
153
|
mediaType: mediaType,
|
|
152
154
|
size: '*'
|
|
153
155
|
});
|
|
154
|
-
return floorResult.currency ===
|
|
156
|
+
return floorResult.currency === currency && floorResult.floor ? floorResult.floor : 0;
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
/**
|
|
@@ -289,7 +291,7 @@ function generateBidParameters(bid, bidderRequest) {
|
|
|
289
291
|
const {params} = bid;
|
|
290
292
|
const mediaType = isBanner(bid) ? BANNER : VIDEO;
|
|
291
293
|
const sizesArray = getSizesArray(bid, mediaType);
|
|
292
|
-
|
|
294
|
+
const currency = params.currency || config.getConfig('currency.adServerCurrency') || DEFAULT_CURRENCY;
|
|
293
295
|
// fix floor price in case of NAN
|
|
294
296
|
if (isNaN(params.floorPrice)) {
|
|
295
297
|
params.floorPrice = 0;
|
|
@@ -299,12 +301,13 @@ function generateBidParameters(bid, bidderRequest) {
|
|
|
299
301
|
mediaType,
|
|
300
302
|
adUnitCode: getBidIdParameter('adUnitCode', bid),
|
|
301
303
|
sizes: sizesArray,
|
|
302
|
-
|
|
304
|
+
currency: currency,
|
|
305
|
+
floorPrice: Math.max(getFloor(bid, mediaType, currency), params.floorPrice),
|
|
303
306
|
bidId: getBidIdParameter('bidId', bid),
|
|
304
307
|
bidderRequestId: getBidIdParameter('bidderRequestId', bid),
|
|
305
308
|
loop: getBidIdParameter('bidderRequestsCount', bid),
|
|
306
309
|
transactionId: bid.ortb2Imp?.ext?.tid,
|
|
307
|
-
coppa: 0
|
|
310
|
+
coppa: 0,
|
|
308
311
|
};
|
|
309
312
|
|
|
310
313
|
const pos = deepAccess(bid, `mediaTypes.${mediaType}.pos`);
|
|
@@ -26,6 +26,7 @@ The adapter supports Video(instream).
|
|
|
26
26
|
| `testMode` | optional | Boolean | This activates the test mode | false
|
|
27
27
|
| `rtbDomain` | optional | String | Sets the seller end point | "www.test.com"
|
|
28
28
|
| `is_wrapper` | private | Boolean | Please don't use unless your account manager asked you to | false
|
|
29
|
+
| `currency` | optional | String | 3 letters currency | "EUR"
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
# Test Parameters
|
|
@@ -215,7 +215,8 @@ const setEventsListeners = (function () {
|
|
|
215
215
|
[CONSTANTS.EVENTS.AUCTION_INIT]: ['onAuctionInitEvent'],
|
|
216
216
|
[CONSTANTS.EVENTS.AUCTION_END]: ['onAuctionEndEvent', getAdUnitTargeting],
|
|
217
217
|
[CONSTANTS.EVENTS.BID_RESPONSE]: ['onBidResponseEvent'],
|
|
218
|
-
[CONSTANTS.EVENTS.BID_REQUESTED]: ['onBidRequestEvent']
|
|
218
|
+
[CONSTANTS.EVENTS.BID_REQUESTED]: ['onBidRequestEvent'],
|
|
219
|
+
[CONSTANTS.EVENTS.BID_ACCEPTED]: ['onBidAcceptedEvent']
|
|
219
220
|
}).forEach(([ev, [handler, preprocess]]) => {
|
|
220
221
|
events.on(ev, (args) => {
|
|
221
222
|
preprocess && preprocess(args);
|
|
@@ -172,6 +172,11 @@ export const spec = {
|
|
|
172
172
|
deepSetValue(sovrnBidReq, 'source.tid', tid)
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
const coppa = deepAccess(bidderRequest, 'ortb2.regs.coppa');
|
|
176
|
+
if (coppa) {
|
|
177
|
+
deepSetValue(sovrnBidReq, 'regs.coppa', 1);
|
|
178
|
+
}
|
|
179
|
+
|
|
175
180
|
if (bidderRequest.gdprConsent) {
|
|
176
181
|
deepSetValue(sovrnBidReq, 'regs.ext.gdpr', +bidderRequest.gdprConsent.gdprApplies);
|
|
177
182
|
deepSetValue(sovrnBidReq, 'user.ext.consent', bidderRequest.gdprConsent.consentString)
|
|
@@ -38,7 +38,14 @@ const converter = ortbConverter({
|
|
|
38
38
|
bidResponse(buildBidResponse, bid, context) {
|
|
39
39
|
context.mediaType = deepAccess(bid, 'ext.prebid.type');
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const response = buildBidResponse(bid, context);
|
|
42
|
+
|
|
43
|
+
if (context.mediaType == 'video') {
|
|
44
|
+
response.nurl = bid.nurl;
|
|
45
|
+
response.vastUrl = deepAccess(bid, 'ext.prebid.cache.vastXml.url') ?? null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return response;
|
|
42
49
|
}
|
|
43
50
|
});
|
|
44
51
|
|
|
@@ -120,10 +127,8 @@ export const spec = {
|
|
|
120
127
|
onTimeout: function(timeoutData) {},
|
|
121
128
|
|
|
122
129
|
onBidWon: function(bid) {
|
|
123
|
-
if (bid && bid.nurl
|
|
124
|
-
bid.nurl
|
|
125
|
-
triggerPixel(winUrl, null);
|
|
126
|
-
});
|
|
130
|
+
if (bid && bid.nurl) {
|
|
131
|
+
triggerPixel(bid.nurl, null);
|
|
127
132
|
}
|
|
128
133
|
},
|
|
129
134
|
|