prebid.js 9.2.0 → 9.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.
Files changed (279) hide show
  1. package/creative/constants.js +2 -1
  2. package/creative/crossDomain.js +16 -4
  3. package/dist/33acrossAnalyticsAdapter.js +1 -1
  4. package/dist/33acrossBidAdapter.js +1 -1
  5. package/dist/33acrossIdSystem.js +1 -1
  6. package/dist/BTBidAdapter.js +1 -1
  7. package/dist/adagioAnalyticsAdapter.js +1 -1
  8. package/dist/adagioBidAdapter.js +1 -1
  9. package/dist/adagioRtdProvider.js +1 -1
  10. package/dist/adagioUtils.js +1 -1
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adfBidAdapter.js +1 -1
  13. package/dist/adgenerationBidAdapter.js +1 -1
  14. package/dist/adlooxRtdProvider.js +1 -1
  15. package/dist/adnuntiusBidAdapter.js +1 -1
  16. package/dist/adqueryBidAdapter.js +1 -1
  17. package/dist/adrelevantisBidAdapter.js +1 -1
  18. package/dist/adstirBidAdapter.js +1 -1
  19. package/dist/adtrgtmeBidAdapter.js +1 -1
  20. package/dist/adxcgAnalyticsAdapter.js +1 -1
  21. package/dist/adxcgBidAdapter.js +1 -1
  22. package/dist/adyoulikeBidAdapter.js +1 -1
  23. package/dist/agmaAnalyticsAdapter.js +1 -1
  24. package/dist/ajaBidAdapter.js +1 -1
  25. package/dist/amxBidAdapter.js +1 -1
  26. package/dist/amxIdSystem.js +1 -1
  27. package/dist/appierAnalyticsAdapter.js +1 -1
  28. package/dist/appnexusBidAdapter.js +1 -1
  29. package/dist/asoBidAdapter.js +1 -1
  30. package/dist/axonixBidAdapter.js +1 -1
  31. package/dist/bidglassBidAdapter.js +1 -1
  32. package/dist/big-richmediaBidAdapter.js +1 -1
  33. package/dist/bridBidAdapter.js +1 -1
  34. package/dist/bridgewellBidAdapter.js +1 -1
  35. package/dist/brightMountainMediaBidAdapter.js +1 -1
  36. package/dist/carodaBidAdapter.js +1 -1
  37. package/dist/chtnwBidAdapter.js +1 -1
  38. package/dist/chunk-core.js +1 -1
  39. package/dist/codefuelBidAdapter.js +1 -1
  40. package/dist/concertBidAdapter.js +1 -1
  41. package/dist/connectadBidAdapter.js +1 -1
  42. package/dist/consentManagement.js +1 -0
  43. package/dist/consentManagementGpp.js +1 -1
  44. package/dist/consentManagementTcf.js +1 -1
  45. package/dist/consumableBidAdapter.js +1 -1
  46. package/dist/conversantAnalyticsAdapter.js +1 -1
  47. package/dist/conversantBidAdapter.js +1 -1
  48. package/dist/copper6sspBidAdapter.js +1 -0
  49. package/dist/cpmstarBidAdapter.js +1 -1
  50. package/dist/craftBidAdapter.js +1 -1
  51. package/dist/criteoBidAdapter.js +1 -1
  52. package/dist/cwireBidAdapter.js +1 -1
  53. package/dist/dailymotionBidAdapter.js +1 -1
  54. package/dist/deltaprojectsBidAdapter.js +1 -1
  55. package/dist/dependencies.json +51 -13
  56. package/dist/dianomiBidAdapter.js +1 -1
  57. package/dist/dspxBidAdapter.js +1 -1
  58. package/dist/dxkultureBidAdapter.js +1 -1
  59. package/dist/eplanningBidAdapter.js +1 -1
  60. package/dist/euidIdSystem.js +1 -1
  61. package/dist/exadsBidAdapter.js +1 -1
  62. package/dist/feedadBidAdapter.js +1 -1
  63. package/dist/finativeBidAdapter.js +1 -1
  64. package/dist/freewheel-sspBidAdapter.js +1 -1
  65. package/dist/gmosspBidAdapter.js +1 -1
  66. package/dist/goldbachBidAdapter.js +1 -1
  67. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  68. package/dist/greenbidsRtdProvider.js +1 -1
  69. package/dist/gridBidAdapter.js +1 -1
  70. package/dist/gumgumBidAdapter.js +1 -1
  71. package/dist/h12mediaBidAdapter.js +1 -1
  72. package/dist/hypelabBidAdapter.js +1 -1
  73. package/dist/id5AnalyticsAdapter.js +1 -1
  74. package/dist/id5IdSystem.js +1 -1
  75. package/dist/illuminBidAdapter.js +1 -1
  76. package/dist/imdsBidAdapter.js +1 -1
  77. package/dist/improvedigitalBidAdapter.js +1 -1
  78. package/dist/insticatorBidAdapter.js +1 -1
  79. package/dist/intentIqIdSystem.js +1 -1
  80. package/dist/ixBidAdapter.js +1 -1
  81. package/dist/jixieBidAdapter.js +1 -1
  82. package/dist/justpremiumBidAdapter.js +1 -1
  83. package/dist/kargoBidAdapter.js +1 -1
  84. package/dist/kimberliteBidAdapter.js +1 -1
  85. package/dist/konduitAnalyticsAdapter.js +1 -1
  86. package/dist/kueezBidAdapter.js +1 -1
  87. package/dist/kueezRtbBidAdapter.js +1 -1
  88. package/dist/lassoBidAdapter.js +1 -1
  89. package/dist/lifestreetBidAdapter.js +1 -1
  90. package/dist/liveIntentIdSystem.js +1 -1
  91. package/dist/logicadBidAdapter.js +1 -1
  92. package/dist/loglyliftBidAdapter.js +1 -1
  93. package/dist/luceadBidAdapter.js +1 -1
  94. package/dist/luponmediaBidAdapter.js +1 -1
  95. package/dist/mabidderBidAdapter.js +1 -1
  96. package/dist/magniteAnalyticsAdapter.js +1 -1
  97. package/dist/malltvAnalyticsAdapter.js +1 -1
  98. package/dist/marsmediaBidAdapter.js +1 -1
  99. package/dist/mediafuseBidAdapter.js +1 -1
  100. package/dist/medianetAnalyticsAdapter.js +1 -1
  101. package/dist/medianetBidAdapter.js +1 -1
  102. package/dist/mediasquareBidAdapter.js +1 -1
  103. package/dist/mgidBidAdapter.js +1 -1
  104. package/dist/minutemediaBidAdapter.js +1 -1
  105. package/dist/missenaBidAdapter.js +1 -1
  106. package/dist/nexx360BidAdapter.js +1 -1
  107. package/dist/nobidAnalyticsAdapter.js +1 -1
  108. package/dist/nobidBidAdapter.js +1 -1
  109. package/dist/not-for-prod/prebid.js +184 -178
  110. package/dist/oguryBidAdapter.js +1 -1
  111. package/dist/onetagBidAdapter.js +1 -1
  112. package/dist/ooloAnalyticsAdapter.js +1 -1
  113. package/dist/openwebBidAdapter.js +1 -1
  114. package/dist/openxBidAdapter.js +1 -1
  115. package/dist/optidigitalBidAdapter.js +1 -1
  116. package/dist/orakiBidAdapter.js +1 -0
  117. package/dist/orbidderBidAdapter.js +1 -1
  118. package/dist/outbrainBidAdapter.js +1 -1
  119. package/dist/ozoneBidAdapter.js +1 -1
  120. package/dist/pairIdSystem.js +1 -1
  121. package/dist/pixfutureBidAdapter.js +1 -1
  122. package/dist/prebidServerBidAdapter.js +1 -1
  123. package/dist/processResponse.js +1 -0
  124. package/dist/publinkIdSystem.js +1 -1
  125. package/dist/publirBidAdapter.js +1 -1
  126. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  127. package/dist/pubmaticBidAdapter.js +1 -1
  128. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  129. package/dist/pxyzBidAdapter.js +1 -1
  130. package/dist/quantcastBidAdapter.js +1 -1
  131. package/dist/readpeakBidAdapter.js +1 -1
  132. package/dist/relaidoBidAdapter.js +1 -1
  133. package/dist/retailspotBidAdapter.js +1 -1
  134. package/dist/rhythmoneBidAdapter.js +1 -1
  135. package/dist/riseBidAdapter.js +1 -1
  136. package/dist/rubiconBidAdapter.js +1 -1
  137. package/dist/seedingAllianceBidAdapter.js +1 -1
  138. package/dist/seedtagBidAdapter.js +1 -1
  139. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  140. package/dist/sharethroughBidAdapter.js +1 -1
  141. package/dist/shinezBidAdapter.js +1 -1
  142. package/dist/shinezRtbBidAdapter.js +1 -1
  143. package/dist/smaatoBidAdapter.js +1 -1
  144. package/dist/smartadserverBidAdapter.js +1 -1
  145. package/dist/smartxBidAdapter.js +1 -1
  146. package/dist/smartyadsBidAdapter.js +1 -1
  147. package/dist/smartyadsUtils.js +1 -0
  148. package/dist/smilewantedBidAdapter.js +1 -1
  149. package/dist/snigelBidAdapter.js +1 -1
  150. package/dist/sonobiBidAdapter.js +1 -1
  151. package/dist/sovrnBidAdapter.js +1 -1
  152. package/dist/sspBCBidAdapter.js +1 -1
  153. package/dist/stnBidAdapter.js +1 -1
  154. package/dist/stvBidAdapter.js +1 -1
  155. package/dist/sublimeBidAdapter.js +1 -1
  156. package/dist/taboolaBidAdapter.js +1 -1
  157. package/dist/tagorasBidAdapter.js +1 -1
  158. package/dist/tappxBidAdapter.js +1 -1
  159. package/dist/targetVideoBidAdapter.js +1 -1
  160. package/dist/teadsBidAdapter.js +1 -1
  161. package/dist/terceptAnalyticsAdapter.js +1 -1
  162. package/dist/themoneytizerBidAdapter.js +1 -1
  163. package/dist/trionBidAdapter.js +1 -1
  164. package/dist/tripleliftBidAdapter.js +1 -1
  165. package/dist/ttdBidAdapter.js +1 -1
  166. package/dist/twistDigitalBidAdapter.js +1 -1
  167. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  168. package/dist/uid2IdSystem.js +1 -1
  169. package/dist/underdogmediaBidAdapter.js +1 -1
  170. package/dist/undertoneBidAdapter.js +1 -1
  171. package/dist/unrulyBidAdapter.js +1 -1
  172. package/dist/userId.js +1 -1
  173. package/dist/viantOrtbBidAdapter.js +1 -1
  174. package/dist/vidazooBidAdapter.js +1 -1
  175. package/dist/vidazooUtils.js +1 -0
  176. package/dist/videobyteBidAdapter.js +1 -1
  177. package/dist/visxBidAdapter.js +1 -1
  178. package/dist/vuukleBidAdapter.js +1 -1
  179. package/dist/widespaceBidAdapter.js +1 -1
  180. package/dist/winrBidAdapter.js +1 -1
  181. package/dist/yahooAdsBidAdapter.js +1 -1
  182. package/dist/yieldmoBidAdapter.js +1 -1
  183. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  184. package/dist/yuktamediaAnalyticsAdapter.js +1 -1
  185. package/dist/zeta_global_sspBidAdapter.js +1 -1
  186. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  187. package/libraries/consentManagement/cmUtils.js +38 -0
  188. package/libraries/processResponse/index.js +12 -0
  189. package/libraries/smartyadsUtils/getAdUrlByRegion.js +32 -0
  190. package/libraries/vidazooUtils/bidderUtils.js +480 -0
  191. package/libraries/vidazooUtils/constants.js +7 -0
  192. package/modules/adagioRtdProvider.js +9 -7
  193. package/modules/addefendBidAdapter.js +1 -2
  194. package/modules/adfBidAdapter.js +1 -10
  195. package/modules/adlooxRtdProvider.js +1 -1
  196. package/modules/adnuntiusBidAdapter.js +1 -0
  197. package/modules/adxcgAnalyticsAdapter.js +1 -2
  198. package/modules/carodaBidAdapter.js +3 -8
  199. package/modules/codefuelBidAdapter.js +1 -10
  200. package/modules/consentManagementGpp.js +2 -38
  201. package/modules/consentManagementTcf.js +7 -38
  202. package/modules/conversantAnalyticsAdapter.js +1 -2
  203. package/modules/copper6sspBidAdapter.js +19 -0
  204. package/modules/copper6sspBidAdapter.md +79 -0
  205. package/modules/cpmstarBidAdapter.js +52 -36
  206. package/modules/cpmstarBidAdapter.md +1 -4
  207. package/modules/criteoBidAdapter.js +10 -3
  208. package/modules/dailymotionBidAdapter.js +1 -1
  209. package/modules/deltaprojectsBidAdapter.js +2 -11
  210. package/modules/dianomiBidAdapter.js +1 -9
  211. package/modules/finativeBidAdapter.js +1 -10
  212. package/modules/gridBidAdapter.js +2 -12
  213. package/modules/id5AnalyticsAdapter.js +1 -2
  214. package/modules/illuminBidAdapter.js +9 -304
  215. package/modules/intentIqIdSystem.js +408 -50
  216. package/modules/intentIqIdSystem.md +92 -0
  217. package/modules/kueezRtbBidAdapter.js +17 -312
  218. package/modules/liveIntentIdSystem.js +2 -2
  219. package/modules/luponmediaBidAdapter.js +4 -10
  220. package/modules/mabidderBidAdapter.js +1 -2
  221. package/modules/medianetAnalyticsAdapter.js +1 -2
  222. package/modules/medianetBidAdapter.js +1 -1
  223. package/modules/mgidBidAdapter.js +1 -10
  224. package/modules/orakiBidAdapter.js +19 -0
  225. package/modules/orakiBidAdapter.md +79 -0
  226. package/modules/orbidderBidAdapter.js +4 -2
  227. package/modules/outbrainBidAdapter.js +8 -43
  228. package/modules/ozoneBidAdapter.js +9 -7
  229. package/modules/pairIdSystem.js +27 -10
  230. package/modules/pixfutureBidAdapter.js +1 -2
  231. package/modules/prebidServerBidAdapter/index.js +1 -1
  232. package/modules/seedtagBidAdapter.js +4 -0
  233. package/modules/shinezRtbBidAdapter.js +12 -304
  234. package/modules/smartadserverBidAdapter.js +3 -0
  235. package/modules/smartyadsBidAdapter.js +6 -110
  236. package/modules/snigelBidAdapter.js +1 -2
  237. package/modules/tagorasBidAdapter.js +13 -316
  238. package/modules/tappxBidAdapter.js +1 -2
  239. package/modules/terceptAnalyticsAdapter.js +1 -2
  240. package/modules/twistDigitalBidAdapter.js +9 -433
  241. package/modules/userId/index.js +31 -21
  242. package/modules/viantOrtbBidAdapter.js +20 -0
  243. package/modules/vidazooBidAdapter.js +26 -468
  244. package/modules/visxBidAdapter.js +27 -29
  245. package/modules/yahooAdsBidAdapter.js +4 -1
  246. package/modules/yuktamediaAnalyticsAdapter.js +1 -2
  247. package/modules/zeta_global_sspBidAdapter.js +2 -2
  248. package/package.json +1 -1
  249. package/src/adRendering.js +25 -2
  250. package/src/constants.js +2 -0
  251. package/src/prebid.js +2 -1
  252. package/src/utils.js +19 -1
  253. package/test/spec/creative/crossDomainCreative_spec.js +38 -2
  254. package/test/spec/fpd/gdpr_spec.js +24 -2
  255. package/test/spec/libraries/processResponse_spec.js +60 -0
  256. package/test/spec/modules/adagioRtdProvider_spec.js +12 -0
  257. package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -3
  258. package/test/spec/modules/conversantAnalyticsAdapter_spec.js +1 -1
  259. package/test/spec/modules/copper6sspBidAdapter_spec.js +514 -0
  260. package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
  261. package/test/spec/modules/dailymotionBidAdapter_spec.js +18 -14
  262. package/test/spec/modules/illuminBidAdapter_spec.js +26 -13
  263. package/test/spec/modules/intentIqIdSystem_spec.js +264 -36
  264. package/test/spec/modules/kueezRtbBidAdapter_spec.js +26 -15
  265. package/test/spec/modules/orakiBidAdapter_spec.js +510 -0
  266. package/test/spec/modules/outbrainBidAdapter_spec.js +32 -1
  267. package/test/spec/modules/seedtagBidAdapter_spec.js +27 -0
  268. package/test/spec/modules/shinezRtbBidAdapter_spec.js +26 -14
  269. package/test/spec/modules/smartadserverBidAdapter_spec.js +7 -0
  270. package/test/spec/modules/smartyadsBidAdapter_spec.js +6 -83
  271. package/test/spec/modules/tagorasBidAdapter_spec.js +26 -15
  272. package/test/spec/modules/twistDigitalBidAdapter_spec.js +19 -22
  273. package/test/spec/modules/userId_spec.js +86 -47
  274. package/test/spec/modules/viantOrtbBidAdapter_spec.js +87 -6
  275. package/test/spec/modules/vidazooBidAdapter_spec.js +21 -23
  276. package/test/spec/modules/visxBidAdapter_spec.js +180 -0
  277. package/test/spec/modules/yahooAdsBidAdapter_spec.js +1 -1
  278. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +11 -0
  279. package/test/spec/unit/pbjs_api_spec.js +6 -1
@@ -7,12 +7,12 @@
7
7
  import {deepSetValue, isEmpty, isNumber, isPlainObject, isStr, logError, logInfo, logWarn} from '../src/utils.js';
8
8
  import {config} from '../src/config.js';
9
9
  import {gppDataHandler} from '../src/adapterManager.js';
10
- import {timedAuctionHook} from '../src/utils/perfMetrics.js';
11
10
  import {enrichFPD} from '../src/fpd/enrichment.js';
12
11
  import {getGlobal} from '../src/prebidGlobal.js';
13
12
  import {cmpClient, MODE_CALLBACK} from '../libraries/cmp/cmpClient.js';
14
13
  import {GreedyPromise} from '../src/utils/promise.js';
15
14
  import {buildActivityParams} from '../src/activities/params.js';
15
+ import {consentManagementHook} from '../libraries/consentManagement/cmUtils.js';
16
16
 
17
17
  const DEFAULT_CMP = 'iab';
18
18
  const DEFAULT_CONSENT_TIMEOUT = 10000;
@@ -228,20 +228,6 @@ function loadConsentData(cb) {
228
228
  }
229
229
  }
230
230
 
231
- /**
232
- * Like `loadConsentData`, but cache and re-use previously loaded data.
233
- * @param cb
234
- */
235
- function loadIfMissing(cb) {
236
- if (consentData) {
237
- logInfo('User consent information already known. Pulling internally stored information...');
238
- // eslint-disable-next-line standard/no-callback-literal
239
- cb(false);
240
- } else {
241
- loadConsentData(cb);
242
- }
243
- }
244
-
245
231
  /**
246
232
  * If consentManagement module is enabled (ie included in setConfig), this hook function will attempt to fetch the
247
233
  * user's encoded consent string from the supported CMP. Once obtained, the module will store this
@@ -250,29 +236,7 @@ function loadIfMissing(cb) {
250
236
  * @param {object} reqBidsConfigObj required; This is the same param that's used in pbjs.requestBids.
251
237
  * @param {function} fn required; The next function in the chain, used by hook.js
252
238
  */
253
- export const requestBidsHook = timedAuctionHook('gpp', function requestBidsHook(fn, reqBidsConfigObj) {
254
- loadIfMissing(function (shouldCancelAuction, errMsg, ...extraArgs) {
255
- if (errMsg) {
256
- let log = logWarn;
257
- if (shouldCancelAuction) {
258
- log = logError;
259
- errMsg = `${errMsg} Canceling auction as per consentManagement config.`;
260
- }
261
- log(errMsg, ...extraArgs);
262
- }
263
-
264
- if (shouldCancelAuction) {
265
- fn.stopTiming();
266
- if (typeof reqBidsConfigObj.bidsBackHandler === 'function') {
267
- reqBidsConfigObj.bidsBackHandler();
268
- } else {
269
- logError('Error executing bidsBackHandler');
270
- }
271
- } else {
272
- fn.call(this, reqBidsConfigObj);
273
- }
274
- });
275
- });
239
+ export const requestBidsHook = consentManagementHook('gpp', () => consentData, loadConsentData);
276
240
 
277
241
  function processCmpData(consentData) {
278
242
  if (
@@ -8,11 +8,11 @@ import {deepSetValue, isNumber, isPlainObject, isStr, logError, logInfo, logWarn
8
8
  import {config} from '../src/config.js';
9
9
  import {gdprDataHandler} from '../src/adapterManager.js';
10
10
  import {includes} from '../src/polyfill.js';
11
- import {timedAuctionHook} from '../src/utils/perfMetrics.js';
12
11
  import {registerOrtbProcessor, REQUEST} from '../src/pbjsORTB.js';
13
12
  import {enrichFPD} from '../src/fpd/enrichment.js';
14
13
  import {getGlobal} from '../src/prebidGlobal.js';
15
14
  import {cmpClient} from '../libraries/cmp/cmpClient.js';
15
+ import {consentManagementHook} from '../libraries/consentManagement/cmUtils.js';
16
16
 
17
17
  const DEFAULT_CMP = 'iab';
18
18
  const DEFAULT_CONSENT_TIMEOUT = 10000;
@@ -22,6 +22,7 @@ export let userCMP;
22
22
  export let consentTimeout;
23
23
  export let gdprScope;
24
24
  export let staticConsentData;
25
+ let dsaPlatform = false;
25
26
  let actionTimeout;
26
27
 
27
28
  let consentData;
@@ -156,20 +157,6 @@ function loadConsentData(cb) {
156
157
  }
157
158
  }
158
159
 
159
- /**
160
- * Like `loadConsentData`, but cache and re-use previously loaded data.
161
- * @param cb
162
- */
163
- function loadIfMissing(cb) {
164
- if (consentData) {
165
- logInfo('User consent information already known. Pulling internally stored information...');
166
- // eslint-disable-next-line standard/no-callback-literal
167
- cb(false);
168
- } else {
169
- loadConsentData(cb);
170
- }
171
- }
172
-
173
160
  /**
174
161
  * If consentManagement module is enabled (ie included in setConfig), this hook function will attempt to fetch the
175
162
  * user's encoded consent string from the supported CMP. Once obtained, the module will store this
@@ -178,29 +165,7 @@ function loadIfMissing(cb) {
178
165
  * @param {object} reqBidsConfigObj required; This is the same param that's used in pbjs.requestBids.
179
166
  * @param {function} fn required; The next function in the chain, used by hook.js
180
167
  */
181
- export const requestBidsHook = timedAuctionHook('gdpr', function requestBidsHook(fn, reqBidsConfigObj) {
182
- loadIfMissing(function (shouldCancelAuction, errMsg, ...extraArgs) {
183
- if (errMsg) {
184
- let log = logWarn;
185
- if (shouldCancelAuction) {
186
- log = logError;
187
- errMsg = `${errMsg} Canceling auction as per consentManagement config.`;
188
- }
189
- log(errMsg, ...extraArgs);
190
- }
191
-
192
- if (shouldCancelAuction) {
193
- fn.stopTiming();
194
- if (typeof reqBidsConfigObj.bidsBackHandler === 'function') {
195
- reqBidsConfigObj.bidsBackHandler();
196
- } else {
197
- logError('Error executing bidsBackHandler');
198
- }
199
- } else {
200
- fn.call(this, reqBidsConfigObj);
201
- }
202
- });
203
- });
168
+ export const requestBidsHook = consentManagementHook('gdpr', () => consentData, loadConsentData);
204
169
 
205
170
  /**
206
171
  * This function checks the consent data provided by CMP to ensure it's in an expected state.
@@ -282,6 +247,7 @@ export function setConsentConfig(config) {
282
247
 
283
248
  // if true, then gdprApplies should be set to true
284
249
  gdprScope = config.defaultGdprScope === true;
250
+ dsaPlatform = !!config.dsaPlatform;
285
251
 
286
252
  logInfo('consentManagement module has been activated...');
287
253
 
@@ -315,6 +281,9 @@ export function enrichFPDHook(next, fpd) {
315
281
  }
316
282
  deepSetValue(ortb2, 'user.ext.consent', consent.consentString);
317
283
  }
284
+ if (dsaPlatform) {
285
+ deepSetValue(ortb2, 'regs.ext.dsa.dsarequired', 3);
286
+ }
318
287
  return ortb2;
319
288
  }));
320
289
  }
@@ -1,7 +1,6 @@
1
1
  import {ajax} from '../src/ajax.js';
2
2
  import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
3
3
  import { EVENTS } from '../src/constants.js';
4
- import {getGlobal} from '../src/prebidGlobal.js';
5
4
  import adapterManager from '../src/adapterManager.js';
6
5
  import {logInfo, logWarn, logError, logMessage, deepAccess, isInteger} from '../src/utils.js';
7
6
  import {getRefererInfo} from '../src/refererDetection.js';
@@ -515,7 +514,7 @@ cnvrHelper.createPayload = function(payloadType, auctionId, timestamp) {
515
514
  cnvrSampleRate: initOptions.cnvr_sample_rate,
516
515
  auction: {
517
516
  auctionId: auctionId,
518
- preBidVersion: getGlobal().version,
517
+ preBidVersion: '$prebid.version$',
519
518
  sid: initOptions.site_id,
520
519
  auctionTimestamp: timestamp
521
520
  },
@@ -0,0 +1,19 @@
1
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
2
+ import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
3
+ import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';
4
+
5
+ const BIDDER_CODE = 'copper6ssp';
6
+ const AD_URL = 'https://endpoint.copper6.com/pbjs';
7
+ const SYNC_URL = 'https://сsync.copper6.com';
8
+
9
+ export const spec = {
10
+ code: BIDDER_CODE,
11
+ supportedMediaTypes: [BANNER, VIDEO, NATIVE],
12
+
13
+ isBidRequestValid: isBidRequestValid(),
14
+ buildRequests: buildRequests(AD_URL),
15
+ interpretResponse,
16
+ getUserSyncs: getUserSyncs(SYNC_URL)
17
+ };
18
+
19
+ registerBidder(spec);
@@ -0,0 +1,79 @@
1
+ # Overview
2
+
3
+ ```
4
+ Module Name: Copper6SSP Bidder Adapter
5
+ Module Type: Copper6SSP Bidder Adapter
6
+ Maintainer: info@copper6.com
7
+ ```
8
+
9
+ # Description
10
+
11
+ Connects to Copper6SSP exchange for bids.
12
+ Copper6SSP bid adapter supports Banner, Video (instream and outstream) and Native.
13
+
14
+ # Test Parameters
15
+ ```
16
+ var adUnits = [
17
+ // Will return static test banner
18
+ {
19
+ code: 'adunit1',
20
+ mediaTypes: {
21
+ banner: {
22
+ sizes: [ [300, 250], [320, 50] ],
23
+ }
24
+ },
25
+ bids: [
26
+ {
27
+ bidder: 'copper6ssp',
28
+ params: {
29
+ placementId: 'testBanner',
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ code: 'addunit2',
36
+ mediaTypes: {
37
+ video: {
38
+ playerSize: [ [640, 480] ],
39
+ context: 'instream',
40
+ minduration: 5,
41
+ maxduration: 60,
42
+ }
43
+ },
44
+ bids: [
45
+ {
46
+ bidder: 'copper6ssp',
47
+ params: {
48
+ placementId: 'testVideo',
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ code: 'addunit3',
55
+ mediaTypes: {
56
+ native: {
57
+ title: {
58
+ required: true
59
+ },
60
+ body: {
61
+ required: true
62
+ },
63
+ icon: {
64
+ required: true,
65
+ size: [64, 64]
66
+ }
67
+ }
68
+ },
69
+ bids: [
70
+ {
71
+ bidder: 'copper6ssp',
72
+ params: {
73
+ placementId: 'testNative',
74
+ }
75
+ }
76
+ ]
77
+ }
78
+ ];
79
+ ```
@@ -1,8 +1,8 @@
1
1
  import * as utils from '../src/utils.js';
2
- import {registerBidder} from '../src/adapters/bidderFactory.js';
3
- import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
- import {config} from '../src/config.js';
5
- import {getBidIdParameter} from '../src/utils.js';
2
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
3
+ import { VIDEO, BANNER } from '../src/mediaTypes.js';
4
+ import { config } from '../src/config.js';
5
+ import { ortbConverter } from '../libraries/ortbConverter/converter.js';
6
6
 
7
7
  const BIDDER_CODE = 'cpmstar';
8
8
 
@@ -12,15 +12,18 @@ const ENDPOINT_PRODUCTION = 'https://server.cpmstar.com/view.aspx';
12
12
 
13
13
  const DEFAULT_TTL = 300;
14
14
  const DEFAULT_CURRENCY = 'USD';
15
+ const DEFAULT_NET_REVENUE = true;
15
16
 
16
- function fixedEncodeURIComponent(str) {
17
- return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
18
- return '%' + c.charCodeAt(0).toString(16);
19
- });
20
- }
17
+ export const converter = ortbConverter({
18
+ context: {
19
+ ttl: DEFAULT_TTL,
20
+ netRevenue: DEFAULT_NET_REVENUE
21
+ }
22
+ });
21
23
 
22
24
  export const spec = {
23
25
  code: BIDDER_CODE,
26
+ gvlid: 1317,
24
27
  supportedMediaTypes: [BANNER, VIDEO],
25
28
  pageID: Math.floor(Math.random() * 10e6),
26
29
 
@@ -43,22 +46,30 @@ export const spec = {
43
46
 
44
47
  buildRequests: function (validBidRequests, bidderRequest) {
45
48
  var requests = [];
46
- // This reference to window.top can cause issues when loaded in an iframe if not protected with a try/catch.
47
49
 
48
50
  for (var i = 0; i < validBidRequests.length; i++) {
49
51
  var bidRequest = validBidRequests[i];
50
- var referer = bidderRequest.refererInfo.page ? bidderRequest.refererInfo.page : bidderRequest.refererInfo.domain;
51
- referer = encodeURIComponent(referer);
52
- var e = getBidIdParameter('endpoint', bidRequest.params);
53
- var ENDPOINT = e == 'dev' ? ENDPOINT_DEV : e == 'staging' ? ENDPOINT_STAGING : ENDPOINT_PRODUCTION;
54
- var mediaType = spec.getMediaType(bidRequest);
55
- var playerSize = spec.getPlayerSize(bidRequest);
56
- var videoArgs = '&fv=0' + (playerSize ? ('&w=' + playerSize[0] + '&h=' + playerSize[1]) : '');
57
- var url = ENDPOINT + '?media=' + mediaType + (mediaType == VIDEO ? videoArgs : '') +
58
- '&json=c_b&mv=1&poolid=' + getBidIdParameter('placementId', bidRequest.params) +
59
- '&reachedTop=' + encodeURIComponent(bidderRequest.refererInfo.reachedTop) +
60
- '&requestid=' + bidRequest.bidId +
61
- '&referer=' + encodeURIComponent(referer);
52
+ const referer = bidderRequest.refererInfo.page ? bidderRequest.refererInfo.page : bidderRequest.refererInfo.domain;
53
+ const e = utils.getBidIdParameter('endpoint', bidRequest.params);
54
+ const ENDPOINT = e == 'dev' ? ENDPOINT_DEV : e == 'staging' ? ENDPOINT_STAGING : ENDPOINT_PRODUCTION;
55
+ const url = new URL(ENDPOINT);
56
+ const body = {};
57
+ const mediaType = spec.getMediaType(bidRequest);
58
+ const playerSize = spec.getPlayerSize(bidRequest);
59
+ url.searchParams.set('media', mediaType);
60
+ if (mediaType == VIDEO) {
61
+ url.searchParams.set('fv', 0);
62
+ if (playerSize) {
63
+ url.searchParams.set('w', playerSize?.[0]);
64
+ url.searchParams.set('h', playerSize?.[1]);
65
+ }
66
+ }
67
+ url.searchParams.set('json', 'c_b');
68
+ url.searchParams.set('mv', 1);
69
+ url.searchParams.set('poolid', utils.getBidIdParameter('placementId', bidRequest.params));
70
+ url.searchParams.set('reachedTop', bidderRequest.refererInfo.reachedTop);
71
+ url.searchParams.set('requestid', bidRequest.bidId);
72
+ url.searchParams.set('referer', referer);
62
73
 
63
74
  if (bidRequest.schain && bidRequest.schain.nodes) {
64
75
  var schain = bidRequest.schain;
@@ -67,45 +78,49 @@ export const spec = {
67
78
  for (var i2 = 0; i2 < schain.nodes.length; i2++) {
68
79
  var node = schain.nodes[i2];
69
80
  schainString += '!' +
70
- fixedEncodeURIComponent(node.asi || '') + ',' +
71
- fixedEncodeURIComponent(node.sid || '') + ',' +
72
- fixedEncodeURIComponent(node.hp || '') + ',' +
73
- fixedEncodeURIComponent(node.rid || '') + ',' +
74
- fixedEncodeURIComponent(node.name || '') + ',' +
75
- fixedEncodeURIComponent(node.domain || '');
81
+ (node.asi || '') + ',' +
82
+ (node.sid || '') + ',' +
83
+ (node.hp || '') + ',' +
84
+ (node.rid || '') + ',' +
85
+ (node.name || '') + ',' +
86
+ (node.domain || '');
76
87
  }
77
- url += '&schain=' + schainString;
88
+ url.searchParams.set('schain', schainString);
78
89
  }
79
90
 
80
91
  if (bidderRequest.gdprConsent) {
81
92
  if (bidderRequest.gdprConsent.consentString != null) {
82
- url += '&gdpr_consent=' + bidderRequest.gdprConsent.consentString;
93
+ url.searchParams.set('gdpr_consent', bidderRequest.gdprConsent.consentString);
83
94
  }
84
95
  if (bidderRequest.gdprConsent.gdprApplies != null) {
85
- url += '&gdpr=' + (bidderRequest.gdprConsent.gdprApplies ? 1 : 0);
96
+ url.searchParams.set('gdpr', (bidderRequest.gdprConsent.gdprApplies ? 1 : 0));
86
97
  }
87
98
  }
88
99
 
89
100
  if (bidderRequest.uspConsent != null) {
90
- url += '&us_privacy=' + bidderRequest.uspConsent;
101
+ url.searchParams.set('us_privacy', bidderRequest.uspConsent);
91
102
  }
92
103
 
93
104
  if (config.getConfig('coppa')) {
94
- url += '&tfcd=' + (config.getConfig('coppa') ? 1 : 0);
105
+ url.searchParams.set('tfcd', (config.getConfig('coppa') ? 1 : 0));
95
106
  }
96
107
 
97
- let body = {};
98
108
  let adUnitCode = bidRequest.adUnitCode;
99
109
  if (adUnitCode) {
100
110
  body.adUnitCode = adUnitCode;
101
111
  }
102
112
  if (mediaType == VIDEO) {
103
113
  body.video = utils.deepAccess(bidRequest, 'mediaTypes.video');
114
+ } else if (mediaType == BANNER) {
115
+ body.banner = utils.deepAccess(bidRequest, 'mediaTypes.banner');
104
116
  }
105
117
 
118
+ const ortb = converter.toORTB({ bidderRequest, bidRequests: [bidRequest] });
119
+ Object.assign(body, ortb);
120
+
106
121
  requests.push({
107
122
  method: 'POST',
108
- url: url,
123
+ url: url.toString(),
109
124
  bidRequest: bidRequest,
110
125
  data: body
111
126
  });
@@ -144,7 +159,7 @@ export const spec = {
144
159
  width: rawBid.width || 0,
145
160
  height: rawBid.height || 0,
146
161
  currency: rawBid.currency ? rawBid.currency : DEFAULT_CURRENCY,
147
- netRevenue: rawBid.netRevenue ? rawBid.netRevenue : true,
162
+ netRevenue: rawBid.netRevenue ? rawBid.netRevenue : DEFAULT_NET_REVENUE,
148
163
  ttl: rawBid.ttl ? rawBid.ttl : DEFAULT_TTL,
149
164
  creativeId: rawBid.creativeid || 0,
150
165
  meta: {
@@ -191,4 +206,5 @@ export const spec = {
191
206
  }
192
207
 
193
208
  };
209
+
194
210
  registerBidder(spec);
@@ -3,10 +3,7 @@
3
3
  ```
4
4
  Module Name: Cpmstar Bidder Adapter
5
5
  Module Type: Bidder Adapter
6
- Maintainer: josh@cpmstar.com
7
- gdpr_supported: true
8
- usp_supported: true
9
- coppa_supported: true
6
+ Maintainer: prebid@cpmstar.com
10
7
  ```
11
8
 
12
9
  # Description
@@ -540,9 +540,16 @@ function hasValidVideoMediaType(bidRequest) {
540
540
  var requiredMediaTypesParams = ['mimes', 'playerSize', 'maxduration', 'protocols', 'api', 'skip', 'placement', 'playbackmethod'];
541
541
 
542
542
  requiredMediaTypesParams.forEach(function (param) {
543
- if (deepAccess(bidRequest, 'mediaTypes.video.' + param) === undefined && deepAccess(bidRequest, 'params.video.' + param) === undefined) {
544
- isValid = false;
545
- logError('Criteo Bid Adapter: mediaTypes.video.' + param + ' is required');
543
+ if (param === 'placement') {
544
+ if (deepAccess(bidRequest, 'mediaTypes.video.' + param) === undefined && deepAccess(bidRequest, 'params.video.' + param) === undefined && deepAccess(bidRequest, 'mediaTypes.video.plcmt') === undefined && deepAccess(bidRequest, 'params.video.plcmt') === undefined) {
545
+ isValid = false;
546
+ logError('Criteo Bid Adapter: mediaTypes.video.' + param + ' or mediaTypes.video.plcmt is required');
547
+ }
548
+ } else {
549
+ if (deepAccess(bidRequest, 'mediaTypes.video.' + param) === undefined && deepAccess(bidRequest, 'params.video.' + param) === undefined) {
550
+ isValid = false;
551
+ logError('Criteo Bid Adapter: mediaTypes.video.' + param + ' is required');
552
+ }
546
553
  }
547
554
  });
548
555
 
@@ -224,7 +224,7 @@ export const spec = {
224
224
  const pixelSyncs = [];
225
225
 
226
226
  serverResponses.forEach((response) => {
227
- (response.user_syncs || []).forEach((syncUrl) => {
227
+ (response?.body?.userSyncs || []).forEach((syncUrl) => {
228
228
  if (syncUrl.type === 'image') {
229
229
  pixelSyncs.push({ url: syncUrl.url, type: 'image' });
230
230
  }
@@ -8,7 +8,8 @@ import {
8
8
  isFn,
9
9
  isNumber,
10
10
  logError,
11
- logWarn
11
+ logWarn,
12
+ setOnAny
12
13
  } from '../src/utils.js';
13
14
  import {config} from '../src/config.js';
14
15
 
@@ -234,16 +235,6 @@ export function getBidFloor(bid, mediaType, size, currency) {
234
235
  }
235
236
  }
236
237
 
237
- /** -- Helper methods -- */
238
- function setOnAny(collection, key) {
239
- for (let i = 0, result; i < collection.length; i++) {
240
- result = deepAccess(collection[i], key);
241
- if (result) {
242
- return result;
243
- }
244
- }
245
- }
246
-
247
238
  /** -- Register -- */
248
239
  export const spec = {
249
240
  code: BIDDER_CODE,
@@ -10,6 +10,7 @@ import {
10
10
  parseSizesInput,
11
11
  deepSetValue,
12
12
  formatQS,
13
+ setOnAny
13
14
  } from '../src/utils.js';
14
15
  import { config } from '../src/config.js';
15
16
  import { Renderer } from '../src/Renderer.js';
@@ -355,15 +356,6 @@ function parseNative(bid) {
355
356
  return result;
356
357
  }
357
358
 
358
- function setOnAny(collection, key) {
359
- for (let i = 0, result; i < collection.length; i++) {
360
- result = deepAccess(collection[i], key);
361
- if (result) {
362
- return result;
363
- }
364
- }
365
- }
366
-
367
359
  function flatten(arr) {
368
360
  return [].concat(...arr);
369
361
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  import {registerBidder} from '../src/adapters/bidderFactory.js';
5
5
  import {NATIVE} from '../src/mediaTypes.js';
6
- import {_map, deepAccess, deepSetValue, isEmpty} from '../src/utils.js';
6
+ import {_map, deepSetValue, isEmpty, setOnAny} from '../src/utils.js';
7
7
  import {config} from '../src/config.js';
8
8
  import {convertOrtbRequestToProprietaryNative} from '../src/native.js';
9
9
 
@@ -224,15 +224,6 @@ function parseNative(bid) {
224
224
  return result;
225
225
  }
226
226
 
227
- function setOnAny(collection, key) {
228
- for (let i = 0, result; i < collection.length; i++) {
229
- result = deepAccess(collection[i], key);
230
- if (result) {
231
- return result;
232
- }
233
- }
234
- }
235
-
236
227
  function flatten(arr) {
237
228
  return [].concat(...arr);
238
229
  }
@@ -15,6 +15,7 @@ import { Renderer } from '../src/Renderer.js';
15
15
  import { VIDEO, BANNER } from '../src/mediaTypes.js';
16
16
  import { config } from '../src/config.js';
17
17
  import { getStorageManager } from '../src/storageManager.js';
18
+ import { getBidFromResponse } from '../libraries/processResponse/index.js';
18
19
 
19
20
  /**
20
21
  * @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
@@ -441,7 +442,7 @@ export const spec = {
441
442
 
442
443
  if (!errorMessage && serverResponse.seatbid) {
443
444
  serverResponse.seatbid.forEach(respItem => {
444
- _addBidResponse(_getBidFromResponse(respItem), bidRequest, bidResponses, RendererConst, bidderCode);
445
+ _addBidResponse(getBidFromResponse(respItem, LOG_ERROR_MESS), bidRequest, bidResponses, RendererConst, bidderCode);
445
446
  });
446
447
  }
447
448
  if (errorMessage) logError(errorMessage);
@@ -512,17 +513,6 @@ function _getFloor (mediaTypes, bid) {
512
513
  return floor;
513
514
  }
514
515
 
515
- function _getBidFromResponse(respItem) {
516
- if (!respItem) {
517
- logError(LOG_ERROR_MESS.emptySeatbid);
518
- } else if (!respItem.bid) {
519
- logError(LOG_ERROR_MESS.hasNoArrayOfBids + JSON.stringify(respItem));
520
- } else if (!respItem.bid[0]) {
521
- logError(LOG_ERROR_MESS.noBid);
522
- }
523
- return respItem && respItem.bid && respItem.bid[0];
524
- }
525
-
526
516
  function _addBidResponse(serverBid, bidRequest, bidResponses, RendererConst, bidderCode) {
527
517
  if (!serverBid) return;
528
518
  let errorMessage;
@@ -4,7 +4,6 @@ import adapterManager from '../src/adapterManager.js';
4
4
  import { ajax } from '../src/ajax.js';
5
5
  import { logInfo, logError } from '../src/utils.js';
6
6
  import * as events from '../src/events.js';
7
- import {getGlobal} from '../src/prebidGlobal.js';
8
7
 
9
8
  const {
10
9
  AUCTION_END,
@@ -33,7 +32,7 @@ const FLUSH_EVENTS = [
33
32
 
34
33
  const CONFIG_URL_PREFIX = 'https://api.id5-sync.com/analytics'
35
34
  const TZ = new Date().getTimezoneOffset();
36
- const PBJS_VERSION = getGlobal().version;
35
+ const PBJS_VERSION = 'v' + '$prebid.version$';
37
36
  const ID5_REDACTED = '__ID5_REDACTED__';
38
37
  const isArray = Array.isArray;
39
38