prebid.js 9.26.0 → 9.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.
Files changed (305) hide show
  1. package/creative/renderers/native/renderer.js +29 -8
  2. package/dist/33acrossAnalyticsAdapter.js +1 -1
  3. package/dist/33acrossBidAdapter.js +1 -1
  4. package/dist/33acrossIdSystem.js +1 -1
  5. package/dist/BTBidAdapter.js +1 -1
  6. package/dist/acuityadsBidAdapter.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/adgenerationBidAdapter.js +1 -1
  13. package/dist/adlooxAdServerVideo.js +1 -1
  14. package/dist/adlooxAnalyticsAdapter.js +1 -1
  15. package/dist/adlooxRtdProvider.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/akamaiDapRtdProvider.js +1 -1
  26. package/dist/amxBidAdapter.js +1 -1
  27. package/dist/amxIdSystem.js +1 -1
  28. package/dist/aniviewBidAdapter.js +1 -1
  29. package/dist/appierAnalyticsAdapter.js +1 -1
  30. package/dist/appnexusBidAdapter.js +1 -1
  31. package/dist/asoBidAdapter.js +1 -1
  32. package/dist/axonixBidAdapter.js +1 -1
  33. package/dist/bidglassBidAdapter.js +1 -1
  34. package/dist/big-richmediaBidAdapter.js +1 -1
  35. package/dist/bitmediaBidAdapter.js +1 -1
  36. package/dist/blueBidAdapter.js +1 -0
  37. package/dist/bridBidAdapter.js +1 -1
  38. package/dist/bridgeuppBidAdapter.js +1 -1
  39. package/dist/bridgewellBidAdapter.js +1 -1
  40. package/dist/brightMountainMediaBidAdapter.js +1 -1
  41. package/dist/carodaBidAdapter.js +1 -1
  42. package/dist/chtnwBidAdapter.js +1 -1
  43. package/dist/chunk-core.js +1 -1
  44. package/dist/conceptxBidAdapter.js +1 -1
  45. package/dist/concertBidAdapter.js +1 -1
  46. package/dist/connectadBidAdapter.js +1 -1
  47. package/dist/consumableBidAdapter.js +1 -1
  48. package/dist/contxtfulBidAdapter.js +1 -1
  49. package/dist/contxtfulRtdProvider.js +1 -1
  50. package/dist/conversantAnalyticsAdapter.js +1 -1
  51. package/dist/conversantBidAdapter.js +1 -1
  52. package/dist/craftBidAdapter.js +1 -1
  53. package/dist/creative-renderer-native.js +1 -1
  54. package/dist/criteoBidAdapter.js +1 -1
  55. package/dist/cwireBidAdapter.js +1 -1
  56. package/dist/dailymotionBidAdapter.js +1 -1
  57. package/dist/dependencies.json +7 -1
  58. package/dist/dspxBidAdapter.js +1 -1
  59. package/dist/dxkultureBidAdapter.js +1 -1
  60. package/dist/eplanningBidAdapter.js +1 -1
  61. package/dist/equativBidAdapter.js +1 -1
  62. package/dist/escalaxBidAdapter.js +1 -1
  63. package/dist/eskimiBidAdapter.js +1 -1
  64. package/dist/euidIdSystem.js +1 -1
  65. package/dist/exadsBidAdapter.js +1 -1
  66. package/dist/feedadBidAdapter.js +1 -1
  67. package/dist/finativeBidAdapter.js +1 -1
  68. package/dist/freewheel-sspBidAdapter.js +1 -1
  69. package/dist/gmosspBidAdapter.js +1 -1
  70. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  71. package/dist/greenbidsBidAdapter.js +1 -1
  72. package/dist/greenbidsRtdProvider.js +1 -1
  73. package/dist/gridBidAdapter.js +1 -1
  74. package/dist/gumgumBidAdapter.js +1 -1
  75. package/dist/h12mediaBidAdapter.js +1 -1
  76. package/dist/hypelabBidAdapter.js +1 -1
  77. package/dist/id5AnalyticsAdapter.js +1 -1
  78. package/dist/id5IdSystem.js +1 -1
  79. package/dist/imdsBidAdapter.js +1 -1
  80. package/dist/improvedigitalBidAdapter.js +1 -1
  81. package/dist/inmobiBidAdapter.js +1 -1
  82. package/dist/insticatorBidAdapter.js +1 -1
  83. package/dist/intentIqAnalyticsAdapter.js +1 -1
  84. package/dist/intentIqConstants.js +1 -1
  85. package/dist/ixBidAdapter.js +1 -1
  86. package/dist/jixieBidAdapter.js +1 -1
  87. package/dist/justpremiumBidAdapter.js +1 -1
  88. package/dist/jwplayerVideoProvider.js +1 -1
  89. package/dist/kargoBidAdapter.js +1 -1
  90. package/dist/kimberliteBidAdapter.js +1 -1
  91. package/dist/konduitAnalyticsAdapter.js +1 -1
  92. package/dist/kueezBidAdapter.js +1 -1
  93. package/dist/lassoBidAdapter.js +1 -1
  94. package/dist/lifestreetBidAdapter.js +1 -1
  95. package/dist/liveIntentId.js +1 -1
  96. package/dist/liveIntentIdSystem.js +1 -1
  97. package/dist/liveIntentRtdProvider.js +1 -0
  98. package/dist/logicadBidAdapter.js +1 -1
  99. package/dist/loglyliftBidAdapter.js +1 -1
  100. package/dist/luceadBidAdapter.js +1 -1
  101. package/dist/mabidderBidAdapter.js +1 -1
  102. package/dist/madsenseBidAdapter.js +1 -1
  103. package/dist/magniteAnalyticsAdapter.js +1 -1
  104. package/dist/malltvAnalyticsAdapter.js +1 -1
  105. package/dist/marsmediaBidAdapter.js +1 -1
  106. package/dist/mediafuseBidAdapter.js +1 -1
  107. package/dist/medianetAnalyticsAdapter.js +1 -1
  108. package/dist/medianetBidAdapter.js +1 -1
  109. package/dist/mediasquareBidAdapter.js +1 -1
  110. package/dist/mgidBidAdapter.js +1 -1
  111. package/dist/minutemediaBidAdapter.js +1 -1
  112. package/dist/missenaBidAdapter.js +1 -1
  113. package/dist/mspa.js +1 -1
  114. package/dist/nativeRendering.js +1 -1
  115. package/dist/nextMillenniumBidAdapter.js +1 -1
  116. package/dist/nexx360BidAdapter.js +1 -1
  117. package/dist/nobidAnalyticsAdapter.js +1 -1
  118. package/dist/nobidBidAdapter.js +1 -1
  119. package/dist/not-for-prod/prebid.js +193 -191
  120. package/dist/oguryBidAdapter.js +1 -1
  121. package/dist/omsBidAdapter.js +1 -1
  122. package/dist/onetagBidAdapter.js +1 -1
  123. package/dist/ooloAnalyticsAdapter.js +1 -1
  124. package/dist/openwebBidAdapter.js +1 -1
  125. package/dist/openxBidAdapter.js +1 -1
  126. package/dist/optidigitalBidAdapter.js +1 -1
  127. package/dist/orbidderBidAdapter.js +1 -1
  128. package/dist/orbitsoftBidAdapter.js +1 -1
  129. package/dist/outbrainBidAdapter.js +1 -1
  130. package/dist/pixfutureBidAdapter.js +1 -1
  131. package/dist/publinkIdSystem.js +1 -1
  132. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  133. package/dist/pubmaticBidAdapter.js +1 -1
  134. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  135. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  136. package/dist/pxyzBidAdapter.js +1 -1
  137. package/dist/quantcastBidAdapter.js +1 -1
  138. package/dist/readpeakBidAdapter.js +1 -1
  139. package/dist/relaidoBidAdapter.js +1 -1
  140. package/dist/retailspotBidAdapter.js +1 -1
  141. package/dist/rhythmoneBidAdapter.js +1 -1
  142. package/dist/riseBidAdapter.js +1 -1
  143. package/dist/riseUtils.js +1 -1
  144. package/dist/rubiconBidAdapter.js +1 -1
  145. package/dist/seedingAllianceBidAdapter.js +1 -1
  146. package/dist/seedtagBidAdapter.js +1 -1
  147. package/dist/sharedIdSystem.js +1 -1
  148. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  149. package/dist/sharethroughBidAdapter.js +1 -1
  150. package/dist/shinezBidAdapter.js +1 -1
  151. package/dist/showheroes-bsBidAdapter.js +1 -1
  152. package/dist/sizeUtils.js +1 -1
  153. package/dist/smaatoBidAdapter.js +1 -1
  154. package/dist/smartadserverBidAdapter.js +1 -1
  155. package/dist/smartxBidAdapter.js +1 -1
  156. package/dist/smilewantedBidAdapter.js +1 -1
  157. package/dist/snigelBidAdapter.js +1 -1
  158. package/dist/sonobiBidAdapter.js +1 -1
  159. package/dist/sovrnBidAdapter.js +1 -1
  160. package/dist/sparteoBidAdapter.js +1 -1
  161. package/dist/sspBCBidAdapter.js +1 -1
  162. package/dist/stnBidAdapter.js +1 -1
  163. package/dist/stvBidAdapter.js +1 -1
  164. package/dist/sublimeBidAdapter.js +1 -1
  165. package/dist/symitriDapRtdProvider.js +1 -1
  166. package/dist/taboolaBidAdapter.js +1 -1
  167. package/dist/tappxBidAdapter.js +1 -1
  168. package/dist/targetVideoBidAdapter.js +1 -1
  169. package/dist/teadsBidAdapter.js +1 -1
  170. package/dist/terceptAnalyticsAdapter.js +1 -1
  171. package/dist/themoneytizerBidAdapter.js +1 -1
  172. package/dist/trionBidAdapter.js +1 -1
  173. package/dist/tripleliftBidAdapter.js +1 -1
  174. package/dist/ttdBidAdapter.js +1 -1
  175. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  176. package/dist/uid2IdSystem.js +1 -1
  177. package/dist/underdogmediaBidAdapter.js +1 -1
  178. package/dist/undertoneBidAdapter.js +1 -1
  179. package/dist/unrulyBidAdapter.js +1 -1
  180. package/dist/userId.js +1 -1
  181. package/dist/vdoaiBidAdapter.js +1 -1
  182. package/dist/vidazooUtils.js +1 -1
  183. package/dist/videobyteBidAdapter.js +1 -1
  184. package/dist/visxBidAdapter.js +1 -1
  185. package/dist/vuukleBidAdapter.js +1 -1
  186. package/dist/widespaceBidAdapter.js +1 -1
  187. package/dist/winrBidAdapter.js +1 -1
  188. package/dist/wurflRtdProvider.js +1 -1
  189. package/dist/yahooAdsBidAdapter.js +1 -1
  190. package/dist/yieldlabBidAdapter.js +1 -1
  191. package/dist/yieldmoBidAdapter.js +1 -1
  192. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  193. package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
  194. package/integrationExamples/gpt/liveIntentRtdProviderExample.html +164 -0
  195. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +3 -1
  196. package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +2 -0
  197. package/integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html +2 -0
  198. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -0
  199. package/integrationExamples/videoModule/jwplayer/eventsUI.html +2 -0
  200. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +2 -0
  201. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +3 -1
  202. package/integrationExamples/videoModule/jwplayer/playlist.html +3 -1
  203. package/libraries/creative-renderer-native/renderer.js +1 -1
  204. package/libraries/intentIqConstants/intentIqConstants.js +1 -1
  205. package/libraries/liveIntentId/shared.js +18 -5
  206. package/libraries/mspa/activityControls.js +26 -7
  207. package/libraries/riseUtils/constants.js +20 -0
  208. package/libraries/riseUtils/index.js +143 -38
  209. package/libraries/sizeUtils/sizeUtils.js +25 -0
  210. package/libraries/vidazooUtils/bidderUtils.js +2 -0
  211. package/modules/33acrossIdSystem.js +64 -23
  212. package/modules/33acrossIdSystem.md +2 -1
  213. package/modules/acuityadsBidAdapter.js +1 -1
  214. package/modules/adagioRtdProvider.js +15 -9
  215. package/modules/adlooxAnalyticsAdapter.js +12 -6
  216. package/modules/blueBidAdapter.js +122 -0
  217. package/modules/blueBidAdapter.md +28 -0
  218. package/modules/conceptxBidAdapter.js +2 -0
  219. package/modules/consumableBidAdapter.js +3 -1
  220. package/modules/contxtfulBidAdapter.js +25 -13
  221. package/modules/contxtfulRtdProvider.js +9 -12
  222. package/modules/eplanningBidAdapter.js +5 -1
  223. package/modules/equativBidAdapter.js +13 -18
  224. package/modules/escalaxBidAdapter.js +2 -2
  225. package/modules/eskimiBidAdapter.js +4 -1
  226. package/modules/improvedigitalBidAdapter.js +0 -67
  227. package/modules/intentIqAnalyticsAdapter.js +1 -1
  228. package/modules/ixBidAdapter.js +7 -1
  229. package/modules/jwplayerVideoProvider.js +99 -6
  230. package/modules/liveIntentRtdProvider.js +52 -0
  231. package/modules/liveIntentRtdProvider.md +45 -0
  232. package/modules/minutemediaBidAdapter.js +6 -80
  233. package/modules/minutemediaBidAdapter.md +1 -1
  234. package/modules/missenaBidAdapter.js +2 -0
  235. package/modules/nativeRendering.js +2 -1
  236. package/modules/omsBidAdapter.js +25 -11
  237. package/modules/omsBidAdapter.md +15 -0
  238. package/modules/openwebBidAdapter.js +6 -81
  239. package/modules/openwebBidAdapter.md +1 -1
  240. package/modules/openxBidAdapter.js +19 -6
  241. package/modules/openxBidAdapter.md +46 -1
  242. package/modules/orbitsoftBidAdapter.js +1 -1
  243. package/modules/permutiveRtdProvider.md +6 -5
  244. package/modules/pubmaticAnalyticsAdapter.js +61 -19
  245. package/modules/riseBidAdapter.js +11 -92
  246. package/modules/riseBidAdapter.md +1 -1
  247. package/modules/sharedIdSystem.js +9 -3
  248. package/modules/shinezBidAdapter.js +4 -80
  249. package/modules/shinezBidAdapter.md +2 -2
  250. package/modules/stnBidAdapter.js +7 -86
  251. package/modules/stnBidAdapter.md +1 -1
  252. package/modules/symitriDapRtdProvider.js +4 -4
  253. package/modules/symitriDapRtdProvider.md +2 -2
  254. package/modules/userId/eids.js +32 -5
  255. package/modules/wurflRtdProvider.js +7 -1
  256. package/modules/wurflRtdProvider.md +1 -1
  257. package/modules/yieldlabBidAdapter.js +2 -2
  258. package/modules/zeta_global_sspAnalyticsAdapter.js +5 -2
  259. package/package.json +2 -2
  260. package/src/adapters/bidderFactory.js +7 -6
  261. package/src/adloader.js +0 -1
  262. package/src/native.js +6 -3
  263. package/test/spec/creative/nativeRenderer_spec.js +45 -10
  264. package/test/spec/libraries/mspa/activityControls_spec.js +63 -9
  265. package/test/spec/modules/33acrossIdSystem_spec.js +288 -2
  266. package/test/spec/modules/acuityadsBidAdapter_spec.js +49 -0
  267. package/test/spec/modules/adagioRtdProvider_spec.js +119 -3
  268. package/test/spec/modules/adlooxAdServerVideo_spec.js +0 -1
  269. package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +31 -0
  270. package/test/spec/modules/blueBidAdapter_spec.js +91 -0
  271. package/test/spec/modules/consumableBidAdapter_spec.js +42 -0
  272. package/test/spec/modules/contxtfulRtdProvider_spec.js +37 -2
  273. package/test/spec/modules/eplanningBidAdapter_spec.js +74 -1
  274. package/test/spec/modules/equativBidAdapter_spec.js +5 -6
  275. package/test/spec/modules/excoBidAdapter_spec.js +33 -18
  276. package/test/spec/modules/illuminBidAdapter_spec.js +33 -18
  277. package/test/spec/modules/improvedigitalBidAdapter_spec.js +3 -3
  278. package/test/spec/modules/ixBidAdapter_spec.js +68 -2
  279. package/test/spec/modules/kueezRtbBidAdapter_spec.js +33 -18
  280. package/test/spec/modules/liveIntentExternalIdSystem_spec.js +16 -6
  281. package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +16 -6
  282. package/test/spec/modules/liveIntentIdSystem_spec.js +49 -6
  283. package/test/spec/modules/liveIntentRtdProvider_spec.js +116 -0
  284. package/test/spec/modules/minutemediaBidAdapter_spec.js +126 -6
  285. package/test/spec/modules/missenaBidAdapter_spec.js +12 -3
  286. package/test/spec/modules/omsBidAdapter_spec.js +78 -0
  287. package/test/spec/modules/openwebBidAdapter_spec.js +126 -6
  288. package/test/spec/modules/openxBidAdapter_spec.js +236 -8
  289. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +29 -36
  290. package/test/spec/modules/riseBidAdapter_spec.js +126 -6
  291. package/test/spec/modules/sharedIdSystem_spec.js +25 -1
  292. package/test/spec/modules/shinezBidAdapter_spec.js +133 -9
  293. package/test/spec/modules/shinezRtbBidAdapter_spec.js +33 -18
  294. package/test/spec/modules/stnBidAdapter_spec.js +126 -5
  295. package/test/spec/modules/symitriDapRtdProvider_spec.js +36 -0
  296. package/test/spec/modules/tagorasBidAdapter_spec.js +33 -18
  297. package/test/spec/modules/twistDigitalBidAdapter_spec.js +34 -18
  298. package/test/spec/modules/userId_spec.js +103 -2
  299. package/test/spec/modules/vidazooBidAdapter_spec.js +34 -18
  300. package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +81 -0
  301. package/test/spec/modules/wurflRtdProvider_spec.js +8 -3
  302. package/test/spec/modules/yieldlabBidAdapter_spec.js +5 -5
  303. package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +3 -2
  304. package/test/spec/native_spec.js +4 -2
  305. package/test/spec/unit/core/bidderFactory_spec.js +120 -43
@@ -127,7 +127,7 @@ describe('Adagio Rtd Provider', function () {
127
127
  };
128
128
 
129
129
  it('store new session data for further usage', function () {
130
- const storageValue = null;
130
+ const storageValue = JSON.stringify({abTest: {}});
131
131
  sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
132
132
  sandbox.stub(Date, 'now').returns(1714116520710);
133
133
  sandbox.stub(Math, 'random').returns(0.8);
@@ -155,7 +155,7 @@ describe('Adagio Rtd Provider', function () {
155
155
  });
156
156
 
157
157
  it('store existing session data for further usage', function () {
158
- const storageValue = JSON.stringify({session: session});
158
+ const storageValue = JSON.stringify({session: session, abTest: {}});
159
159
  sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
160
160
  sandbox.stub(Date, 'now').returns(1714116520710);
161
161
  sandbox.stub(Math, 'random').returns(0.8);
@@ -179,7 +179,7 @@ describe('Adagio Rtd Provider', function () {
179
179
  });
180
180
 
181
181
  it('store new session if old session has expired data for further usage', function () {
182
- const storageValue = JSON.stringify({session: session});
182
+ const storageValue = JSON.stringify({session: session, abTest: {}});
183
183
  sandbox.stub(Date, 'now').returns(1715679344351);
184
184
  sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
185
185
  sandbox.stub(Math, 'random').returns(0.8);
@@ -197,6 +197,122 @@ describe('Adagio Rtd Provider', function () {
197
197
  rnd: Math.random(),
198
198
  }
199
199
  }
200
+ expect(spy.withArgs({
201
+ action: 'session',
202
+ ts: Date.now(),
203
+ data: expected,
204
+ }).calledOnce).to.be.true;
205
+ });
206
+ });
207
+
208
+ describe('store session data in localStorage for old snippet', function () {
209
+ it('store new session data for further usage', function () {
210
+ const storageValue = null;
211
+ sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
212
+ sandbox.stub(Date, 'now').returns(1714116520710);
213
+ sandbox.stub(Math, 'random').returns(0.8);
214
+ sandbox.stub(utils, 'generateUUID').returns('uid-1234');
215
+
216
+ const spy = sandbox.spy(_internal.getAdagioNs().queue, 'push')
217
+
218
+ adagioRtdSubmodule.init(config);
219
+
220
+ const expected = {
221
+ session: {
222
+ new: true,
223
+ id: utils.generateUUID(),
224
+ rnd: Math.random(),
225
+ pages: 1
226
+ }
227
+ }
228
+
229
+ expect(spy.withArgs({
230
+ action: 'session',
231
+ ts: Date.now(),
232
+ data: expected,
233
+ }).calledOnce).to.be.true;
234
+ });
235
+
236
+ it('update session data for further usage', function () {
237
+ const storageValue = JSON.stringify({
238
+ session: {
239
+ new: true,
240
+ id: 'uid-1234',
241
+ rnd: 0.8,
242
+ pages: 1,
243
+ expiry: 1714116520710,
244
+ testName: 't',
245
+ testVersion: 'clt'
246
+ }
247
+ });
248
+ sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
249
+ sandbox.stub(Date, 'now').returns(1714116520710);
250
+ sandbox.stub(Math, 'random').returns(0.8);
251
+ sandbox.stub(utils, 'generateUUID').returns('uid-1234');
252
+
253
+ const spy = sandbox.spy(_internal.getAdagioNs().queue, 'push')
254
+
255
+ adagioRtdSubmodule.init(config);
256
+
257
+ const expected = {
258
+ session: {
259
+ new: false,
260
+ expiry: 1714116520710,
261
+ id: utils.generateUUID(),
262
+ rnd: Math.random(),
263
+ pages: 1,
264
+ testName: 't',
265
+ testVersion: 'clt'
266
+ }
267
+ }
268
+
269
+ expect(spy.withArgs({
270
+ action: 'session',
271
+ ts: Date.now(),
272
+ data: expected,
273
+ }).calledOnce).to.be.true;
274
+ });
275
+ });
276
+
277
+ describe('update session data in localStorage from old snippet to new version', function () {
278
+ it('update session data for new snippet', function () {
279
+ const storageValue = JSON.stringify({
280
+ session: {
281
+ new: false,
282
+ id: 'uid-1234',
283
+ rnd: 0.8,
284
+ pages: 1,
285
+ expiry: 1714116520710,
286
+ testName: 't',
287
+ testVersion: 'clt'
288
+ },
289
+ abTest: {
290
+ expiry: 1714116520810,
291
+ testName: 't',
292
+ testVersion: 'srv'
293
+ }
294
+ });
295
+ sandbox.stub(storage, 'getDataFromLocalStorage').callsArgWith(1, storageValue);
296
+ sandbox.stub(Date, 'now').returns(1714116520710);
297
+ sandbox.stub(Math, 'random').returns(0.8);
298
+ sandbox.stub(utils, 'generateUUID').returns('uid-1234');
299
+
300
+ const spy = sandbox.spy(_internal.getAdagioNs().queue, 'push')
301
+
302
+ adagioRtdSubmodule.init(config);
303
+
304
+ const expected = {
305
+ session: {
306
+ new: false,
307
+ expiry: 1714116520710,
308
+ id: utils.generateUUID(),
309
+ rnd: Math.random(),
310
+ pages: 1,
311
+ testName: 't',
312
+ testVersion: 'srv',
313
+ v: 2
314
+ }
315
+ }
200
316
 
201
317
  expect(spy.withArgs({
202
318
  action: 'session',
@@ -34,7 +34,6 @@ describe('Adloox Ad Server Video', function () {
34
34
  };
35
35
 
36
36
  const analyticsOptions = {
37
- js: 'https://j.adlooxtracking.com/ads/js/tfav_adl_%%clientid%%.js',
38
37
  client: 'adlooxtest',
39
38
  clientid: 127,
40
39
  platformid: 0,
@@ -45,6 +45,11 @@ describe('Adloox Analytics Adapter', function () {
45
45
  adapter: analyticsAdapter
46
46
  });
47
47
  describe('enableAnalytics', function () {
48
+ afterEach(function () {
49
+ analyticsAdapter.disableAnalytics();
50
+ expect(analyticsAdapter.context).is.null;
51
+ });
52
+
48
53
  describe('invalid options', function () {
49
54
  it('should require options', function (done) {
50
55
  adapterManager.enableAnalytics({
@@ -68,6 +73,32 @@ describe('Adloox Analytics Adapter', function () {
68
73
  done();
69
74
  });
70
75
 
76
+ it('should accept subdomains of adlooxtracking.com for options.js', function (done) {
77
+ const analyticsOptionsLocal = utils.deepClone(analyticsOptions);
78
+ analyticsOptionsLocal.js = 'https://test.adlooxtracking.com/test.js';
79
+
80
+ adapterManager.enableAnalytics({
81
+ provider: analyticsAdapterName,
82
+ options: analyticsOptionsLocal
83
+ });
84
+ expect(analyticsAdapter.context).is.not.null;
85
+
86
+ done();
87
+ });
88
+
89
+ it('should reject non-subdomains of adlooxtracking.com for options.js', function (done) {
90
+ const analyticsOptionsLocal = utils.deepClone(analyticsOptions);
91
+ analyticsOptionsLocal.js = 'https://example.com/test.js';
92
+
93
+ adapterManager.enableAnalytics({
94
+ provider: analyticsAdapterName,
95
+ options: analyticsOptionsLocal
96
+ });
97
+ expect(analyticsAdapter.context).is.null;
98
+
99
+ done();
100
+ });
101
+
71
102
  it('should reject non-function options.toselector', function (done) {
72
103
  const analyticsOptionsLocal = utils.deepClone(analyticsOptions);
73
104
  analyticsOptionsLocal.toselector = esplode;
@@ -0,0 +1,91 @@
1
+ import { expect } from 'chai';
2
+ import sinon from 'sinon';
3
+ import { spec, storage } from 'modules/blueBidAdapter.js';
4
+
5
+ const BIDDER_CODE = 'blue';
6
+ const ENDPOINT_URL = 'https://bidder-us-east-1.getblue.io/engine/?src=prebid';
7
+ const GVLID = 620;
8
+ const COOKIE_NAME = 'ckid';
9
+ const CURRENCY = 'USD';
10
+
11
+ describe('blueBidAdapter:', function () {
12
+ let sandbox;
13
+
14
+ beforeEach(function () {
15
+ sandbox = sinon.createSandbox();
16
+ });
17
+
18
+ afterEach(function () {
19
+ sandbox.restore();
20
+ });
21
+
22
+ describe('isBidRequestValid:', function () {
23
+ it('should return true for valid bid requests', function () {
24
+ const validBid = {
25
+ params: {
26
+ placementId: '12345',
27
+ publisherId: '67890',
28
+ },
29
+ };
30
+ expect(spec.isBidRequestValid(validBid)).to.be.true;
31
+ });
32
+
33
+ it('should return false for invalid bid requests', function () {
34
+ const invalidBid = {
35
+ params: {
36
+ placementId: '12345',
37
+ },
38
+ };
39
+ expect(spec.isBidRequestValid(invalidBid)).to.be.false;
40
+ });
41
+ });
42
+
43
+ describe('buildRequests:', function () {
44
+ let validBidRequests;
45
+ let bidderRequest;
46
+
47
+ beforeEach(function () {
48
+ validBidRequests = [
49
+ {
50
+ bidId: 'bid1',
51
+ params: {
52
+ placementId: '12345',
53
+ publisherId: '67890',
54
+ },
55
+ getFloor: () => ({ currency: CURRENCY, floor: 1.5 }),
56
+ },
57
+ ];
58
+
59
+ bidderRequest = {
60
+ refererInfo: {
61
+ page: 'https://example.com',
62
+ },
63
+ };
64
+
65
+ sandbox.stub(storage, 'getDataFromLocalStorage').returns('testBuyerId');
66
+ });
67
+
68
+ it('should build a valid OpenRTB request', function () {
69
+ const request = spec.buildRequests(validBidRequests, bidderRequest);
70
+
71
+ expect(request.method).to.equal('POST');
72
+ expect(request.url).to.equal(ENDPOINT_URL);
73
+ expect(request.options.contentType).to.equal('text/plain');
74
+
75
+ const ortbRequest = JSON.parse(request.data);
76
+ expect(ortbRequest.ext.gvlid).to.equal(GVLID);
77
+ expect(ortbRequest.user.ext.buyerid).to.equal('testBuyerId');
78
+ expect(ortbRequest.imp[0].bidfloor).to.equal(1.5);
79
+ expect(ortbRequest.imp[0].bidfloorcur).to.equal(CURRENCY);
80
+ });
81
+
82
+ it('should omit bidfloor if getFloor is not implemented', function () {
83
+ validBidRequests[0].getFloor = undefined;
84
+
85
+ const request = spec.buildRequests(validBidRequests, bidderRequest);
86
+ const ortbRequest = JSON.parse(request.data);
87
+
88
+ expect(ortbRequest.imp[0].bidfloor).to.be.undefined;
89
+ });
90
+ });
91
+ });
@@ -755,6 +755,48 @@ describe('Consumable BidAdapter', function () {
755
755
  expect(data.user.eids).to.deep.equal(bidderRequest.bidRequest[0].userIdAsEids);
756
756
  });
757
757
 
758
+ it('Request should remove non-objects for userIdAsEids', function () {
759
+ bidderRequest.bidRequest[0].userId = {};
760
+ bidderRequest.bidRequest[0].userId.tdid = 'TTD_ID';
761
+ bidderRequest.bidRequest[0].userIdAsEids = [
762
+ {
763
+ source: 'adserver.org',
764
+ uids: [
765
+ {
766
+ id: 'TTD_ID_FROM_USER_ID_MODULE',
767
+ atype: 1,
768
+ ext: {
769
+ rtiPartner: 'TDID',
770
+ },
771
+ },
772
+ ],
773
+ },
774
+ 'RANDOM_IDENTIFIER_STRING'
775
+ ];
776
+ let scrubbedEids = [
777
+ {
778
+ source: 'adserver.org',
779
+ uids: [
780
+ {
781
+ id: 'TTD_ID_FROM_USER_ID_MODULE',
782
+ atype: 1,
783
+ ext: {
784
+ rtiPartner: 'TDID',
785
+ },
786
+ },
787
+ ],
788
+ },
789
+ ];
790
+ let request = spec.buildRequests(
791
+ bidderRequest.bidRequest,
792
+ BIDDER_REQUEST_1
793
+ );
794
+ let data = JSON.parse(request.data);
795
+ expect(data.user.eids).to.deep.equal(
796
+ scrubbedEids
797
+ );
798
+ });
799
+
758
800
  it('Request should NOT have adsrvrOrgId params if userId is NOT object', function() {
759
801
  let request = spec.buildRequests(bidderRequest.bidRequest, BIDDER_REQUEST_1);
760
802
  let data = JSON.parse(request.data);
@@ -4,12 +4,15 @@ import { loadExternalScriptStub } from 'test/mocks/adloaderStub.js';
4
4
  import { getStorageManager } from '../../../src/storageManager.js';
5
5
  import { MODULE_TYPE_UID } from '../../../src/activities/modules.js';
6
6
  import * as events from '../../../src/events';
7
+ import * as utils from 'src/utils.js';
7
8
  import Sinon from 'sinon';
9
+ import { deepClone } from '../../../src/utils.js';
8
10
 
9
11
  const MODULE_NAME = 'contxtful';
10
12
 
11
13
  const VERSION = 'v1';
12
14
  const CUSTOMER = 'CUSTOMER';
15
+ const SM = 'SM';
13
16
  const CONTXTFUL_CONNECTOR_ENDPOINT = `https://api.receptivity.io/${VERSION}/prebid/${CUSTOMER}/connector/rxConnector.js`;
14
17
 
15
18
  const RX_FROM_SESSION_STORAGE = { ReceptivityState: 'Receptive', test_info: 'rx_from_session_storage' };
@@ -62,6 +65,8 @@ describe('contxtfulRtdProvider', function () {
62
65
 
63
66
  eventsEmitSpy = sandbox.spy(events, ['emit']);
64
67
 
68
+ sandbox.stub(utils, 'generateUUID').returns(SM);
69
+
65
70
  let tagId = CUSTOMER;
66
71
  sessionStorage.clear();
67
72
  });
@@ -534,6 +539,7 @@ describe('contxtfulRtdProvider', function () {
534
539
  name: 'contxtful',
535
540
  ext: {
536
541
  rx: RX_FROM_API,
542
+ sm: SM,
537
543
  params: {
538
544
  ev: config.params?.version,
539
545
  ci: config.params?.customer,
@@ -549,11 +555,40 @@ describe('contxtfulRtdProvider', function () {
549
555
 
550
556
  expect(data.name).to.deep.equal(expectedData.name);
551
557
  expect(data.ext.rx).to.deep.equal(expectedData.ext.rx);
558
+ expect(data.ext.sm).to.deep.equal(expectedData.ext.sm);
552
559
  expect(data.ext.params).to.deep.equal(expectedData.ext.params);
553
560
  done();
554
561
  }, TIMEOUT);
555
562
  });
556
563
 
564
+ it('does not change the sm', function (done) {
565
+ let config = buildInitConfig(VERSION, CUSTOMER);
566
+ contxtfulSubmodule.init(config);
567
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
568
+
569
+ let firstReqBidsConfigObj = {
570
+ ortb2Fragments: {
571
+ global: {},
572
+ bidder: {},
573
+ },
574
+ };
575
+
576
+ let secondReqBidsConfigObj = deepClone(firstReqBidsConfigObj);
577
+
578
+ setTimeout(() => {
579
+ const onDoneSpy = sinon.spy();
580
+ contxtfulSubmodule.getBidRequestData(firstReqBidsConfigObj, onDoneSpy, config);
581
+ contxtfulSubmodule.getBidRequestData(secondReqBidsConfigObj, onDoneSpy, config);
582
+
583
+ let firstData = firstReqBidsConfigObj.ortb2Fragments.bidder[config.params.bidders[0]].user.data[0];
584
+ let secondData = secondReqBidsConfigObj.ortb2Fragments.bidder[config.params.bidders[0]].user.data[0];
585
+
586
+ expect(firstData.ext.sm).to.equal(secondData.ext.sm);
587
+
588
+ done();
589
+ }, TIMEOUT);
590
+ });
591
+
557
592
  describe('before rxApi is loaded', function () {
558
593
  const moveEventTheories = [
559
594
  [
@@ -628,7 +663,7 @@ describe('contxtfulRtdProvider', function () {
628
663
  });
629
664
 
630
665
  describe('after rxApi is loaded', function () {
631
- it('does not add event', function (done) {
666
+ it('should add event', function (done) {
632
667
  let config = buildInitConfig(VERSION, CUSTOMER);
633
668
  contxtfulSubmodule.init(config);
634
669
  window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
@@ -648,7 +683,7 @@ describe('contxtfulRtdProvider', function () {
648
683
 
649
684
  let events = ext.events;
650
685
 
651
- expect(events).to.be.undefined;
686
+ expect(events).to.be.not.undefined;
652
687
  done();
653
688
  }, TIMEOUT);
654
689
  });
@@ -53,6 +53,68 @@ describe('E-Planning Adapter', function () {
53
53
  'adUnitCode': ADUNIT_CODE2,
54
54
  'sizes': [[300, 250], [300, 600]],
55
55
  };
56
+ const validBidWithSchain = {
57
+ 'bidder': 'eplanning',
58
+ 'bidId': BID_ID2,
59
+ 'params': {
60
+ 'ci': CI,
61
+ },
62
+ 'adUnitCode': ADUNIT_CODE2,
63
+ 'sizes': [[300, 250], [300, 600]],
64
+ 'schain': {
65
+ ver: '1.0',
66
+ complete: 1,
67
+ nodes: [
68
+ {
69
+ asi: 'directseller.com',
70
+ sid: '00001',
71
+ rid: 'BidRequest1',
72
+ hp: 1,
73
+ name: 'publisher',
74
+ domain: 'publisher.com'
75
+ }
76
+ ]
77
+ }
78
+ };
79
+ const validBidWithSchainNodes = {
80
+ 'bidder': 'eplanning',
81
+ 'bidId': BID_ID2,
82
+ 'params': {
83
+ 'ci': CI,
84
+ },
85
+ 'adUnitCode': ADUNIT_CODE2,
86
+ 'sizes': [[300, 250], [300, 600]],
87
+ 'schain': {
88
+ ver: '1.0',
89
+ complete: 1,
90
+ nodes: [
91
+ {
92
+ asi: 'directseller.com',
93
+ sid: '00001',
94
+ rid: 'BidRequest1',
95
+ hp: 1,
96
+ name: 'publisher',
97
+ domain: 'publisher.com'
98
+ },
99
+ {
100
+ asi: 'reseller.com',
101
+ sid: 'aaaaa',
102
+ rid: 'BidRequest2',
103
+ hp: 1,
104
+ name: 'publisher2',
105
+ domain: 'publisher2.com'
106
+ },
107
+ {
108
+ asi: 'reseller3.com',
109
+ sid: 'aaaaab',
110
+ rid: 'BidRequest3',
111
+ hp: 1,
112
+ name: 'publisher3',
113
+ domain: 'publisher3.com'
114
+ }
115
+ ]
116
+ }
117
+ };
56
118
  const ML = '1';
57
119
  const validBidMappingLinear = {
58
120
  'bidder': 'eplanning',
@@ -727,7 +789,18 @@ describe('E-Planning Adapter', function () {
727
789
  expect(data.vctx).to.equal(2);
728
790
  expect(data.vv).to.equal(3);
729
791
  });
730
-
792
+ it('should return sch parameter', function () {
793
+ let bidRequests = [validBidWithSchain], schainExpected, schain;
794
+ schain = validBidWithSchain.schain;
795
+ schainExpected = schain.ver + ',' + schain.complete + '!' + schain.nodes.map(node => node.asi + ',' + node.sid + ',' + node.hp + ',' + node.rid + ',' + node.name + ',' + node.domain).join('!');
796
+ const data = spec.buildRequests(bidRequests, bidderRequest).data;
797
+ expect(data.sch).to.deep.equal(schainExpected);
798
+ });
799
+ it('should not return sch parameter', function () {
800
+ let bidRequests = [validBidWithSchainNodes];
801
+ const data = spec.buildRequests(bidRequests, bidderRequest).data;
802
+ expect(data.sch).to.equal(undefined);
803
+ });
731
804
  it('should return correct e parameter with linear mapping attribute with more than one adunit', function () {
732
805
  let bidRequestsML = [validBidMappingLinear];
733
806
  const NEW_CODE = ADUNIT_CODE + '2';
@@ -535,8 +535,8 @@ describe('Equativ bid adapter tests', () => {
535
535
 
536
536
  // ASSERT
537
537
  expect(utils.logWarn.callCount).to.equal(2);
538
- expect(utils.logWarn.getCall(0).args[0]).to.satisfy(arg => arg.includes('"mimes" is missing'));
539
- expect(utils.logWarn.getCall(1).args[0]).to.satisfy(arg => arg.includes('"placement" is missing'));
538
+ expect(utils.logWarn.getCall(0).args[0]).to.satisfy(arg => arg.includes('"mediaTypes.video.mimes" is missing'));
539
+ expect(utils.logWarn.getCall(1).args[0]).to.satisfy(arg => arg.includes('"mediaTypes.video.placement" is missing'));
540
540
  });
541
541
 
542
542
  it('should not send a video request when it has an empty body and no other impressions with any media types are defined', () => {
@@ -622,7 +622,6 @@ describe('Equativ bid adapter tests', () => {
622
622
  spec.buildRequests(bidRequests, bidderRequest);
623
623
 
624
624
  // ASSERT
625
- expect(utils.logWarn.callCount).to.equal(1)
626
625
  expect(utils.logWarn.getCall(0).args[0]).to.satisfy(arg => arg.includes(warningMsgFromLibrary));
627
626
  }
628
627
  });
@@ -646,9 +645,9 @@ describe('Equativ bid adapter tests', () => {
646
645
  // ASSERT
647
646
  expect(utils.logWarn.callCount).to.equal(4); // the first message, regarding missing assets, is supplied by the ortbConverter library
648
647
  expect(utils.logWarn.getCall(0).args[0]).to.satisfy(arg => arg.includes('no assets were specified'));
649
- expect(utils.logWarn.getCall(1).args[0]).to.satisfy(arg => arg.includes('"privacy" is missing'));
650
- expect(utils.logWarn.getCall(2).args[0]).to.satisfy(arg => arg.includes('"plcmttype" is missing'));
651
- expect(utils.logWarn.getCall(3).args[0]).to.satisfy(arg => arg.includes('"eventtrackers" is missing'));
648
+ expect(utils.logWarn.getCall(1).args[0]).to.satisfy(arg => arg.includes('"mediaTypes.native.ortb.privacy" is missing'));
649
+ expect(utils.logWarn.getCall(2).args[0]).to.satisfy(arg => arg.includes('"mediaTypes.native.ortb.plcmttype" is missing'));
650
+ expect(utils.logWarn.getCall(3).args[0]).to.satisfy(arg => arg.includes('"mediaTypes.native.ortb.eventtrackers" is missing'));
652
651
  }
653
652
  });
654
653
  });
@@ -94,6 +94,36 @@ const VIDEO_BID = {
94
94
  }
95
95
  }
96
96
 
97
+ const ORTB2_DEVICE = {
98
+ sua: {
99
+ 'source': 2,
100
+ 'platform': {
101
+ 'brand': 'Android',
102
+ 'version': ['8', '0', '0']
103
+ },
104
+ 'browsers': [
105
+ {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
106
+ {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
107
+ {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
108
+ ],
109
+ 'mobile': 1,
110
+ 'model': 'SM-G955U',
111
+ 'bitness': '64',
112
+ 'architecture': ''
113
+ },
114
+ w: 980,
115
+ h: 1720,
116
+ dnt: 0,
117
+ ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1',
118
+ language: 'en',
119
+ devicetype: 1,
120
+ make: 'Apple',
121
+ model: 'iPhone 12 Pro Max',
122
+ os: 'iOS',
123
+ osv: '17.4',
124
+ ext: {fiftyonedegrees_deviceId: '17595-133085-133468-18092'},
125
+ };
126
+
97
127
  const BIDDER_REQUEST = {
98
128
  'gdprConsent': {
99
129
  'consentString': 'consent_string',
@@ -117,24 +147,7 @@ const BIDDER_REQUEST = {
117
147
  'gpp_sid': [7],
118
148
  'coppa': 0
119
149
  },
120
- 'device': {
121
- 'sua': {
122
- 'source': 2,
123
- 'platform': {
124
- 'brand': 'Android',
125
- 'version': ['8', '0', '0']
126
- },
127
- 'browsers': [
128
- {'brand': 'Not_A Brand', 'version': ['99', '0', '0', '0']},
129
- {'brand': 'Google Chrome', 'version': ['109', '0', '5414', '119']},
130
- {'brand': 'Chromium', 'version': ['109', '0', '5414', '119']}
131
- ],
132
- 'mobile': 1,
133
- 'model': 'SM-G955U',
134
- 'bitness': '64',
135
- 'architecture': ''
136
- }
137
- }
150
+ 'device': ORTB2_DEVICE,
138
151
  }
139
152
  };
140
153
 
@@ -315,6 +328,7 @@ describe('ExcoBidAdapter', function () {
315
328
  'bitness': '64',
316
329
  'architecture': ''
317
330
  },
331
+ device: ORTB2_DEVICE,
318
332
  uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
319
333
  uqs: getTopWindowQueryParams(),
320
334
  mediaTypes: {
@@ -386,6 +400,7 @@ describe('ExcoBidAdapter', function () {
386
400
  'bitness': '64',
387
401
  'architecture': ''
388
402
  },
403
+ device: ORTB2_DEVICE,
389
404
  url: 'https%3A%2F%2Fwww.greatsite.com',
390
405
  referrer: 'https://www.somereferrer.com',
391
406
  cb: 1000,