prebid.js 9.1.0 → 9.3.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 (362) hide show
  1. package/browsers.json +3 -3
  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 -0
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adgenerationBidAdapter.js +1 -1
  13. package/dist/adlooxRtdProvider.js +1 -1
  14. package/dist/admanBidAdapter.js +1 -1
  15. package/dist/adnuntiusBidAdapter.js +1 -1
  16. package/dist/adpod.js +1 -1
  17. package/dist/adprimeBidAdapter.js +1 -1
  18. package/dist/adqueryBidAdapter.js +1 -1
  19. package/dist/adrelevantisBidAdapter.js +1 -1
  20. package/dist/adstirBidAdapter.js +1 -1
  21. package/dist/adtrgtmeBidAdapter.js +1 -1
  22. package/dist/adxcgAnalyticsAdapter.js +1 -1
  23. package/dist/adxcgBidAdapter.js +1 -1
  24. package/dist/adyoulikeBidAdapter.js +1 -1
  25. package/dist/agmaAnalyticsAdapter.js +1 -1
  26. package/dist/ajaBidAdapter.js +1 -1
  27. package/dist/amxBidAdapter.js +1 -1
  28. package/dist/amxIdSystem.js +1 -1
  29. package/dist/appierAnalyticsAdapter.js +1 -1
  30. package/dist/appnexusBidAdapter.js +1 -1
  31. package/dist/appnexusUtils.js +1 -1
  32. package/dist/asoBidAdapter.js +1 -1
  33. package/dist/autoplayDetection.js +1 -1
  34. package/dist/axisBidAdapter.js +1 -1
  35. package/dist/axonixBidAdapter.js +1 -1
  36. package/dist/beyondmediaBidAdapter.js +1 -1
  37. package/dist/bidglassBidAdapter.js +1 -1
  38. package/dist/big-richmediaBidAdapter.js +1 -1
  39. package/dist/bliinkBidAdapter.js +1 -1
  40. package/dist/boldwinBidAdapter.js +1 -1
  41. package/dist/bridBidAdapter.js +1 -1
  42. package/dist/bridgewellBidAdapter.js +1 -1
  43. package/dist/brightMountainMediaBidAdapter.js +1 -1
  44. package/dist/carodaBidAdapter.js +1 -1
  45. package/dist/chtnwBidAdapter.js +1 -1
  46. package/dist/chunk-core.js +1 -1
  47. package/dist/compassBidAdapter.js +1 -1
  48. package/dist/concertBidAdapter.js +1 -1
  49. package/dist/connectadBidAdapter.js +1 -1
  50. package/dist/consentManagement.js +1 -0
  51. package/dist/consentManagementGpp.js +1 -1
  52. package/dist/consentManagementTcf.js +1 -1
  53. package/dist/consumableBidAdapter.js +1 -1
  54. package/dist/contentexchangeBidAdapter.js +1 -1
  55. package/dist/conversantAnalyticsAdapter.js +1 -1
  56. package/dist/conversantBidAdapter.js +1 -1
  57. package/dist/copper6sspBidAdapter.js +1 -0
  58. package/dist/craftBidAdapter.js +1 -1
  59. package/dist/criteoBidAdapter.js +1 -1
  60. package/dist/cwireBidAdapter.js +1 -1
  61. package/dist/dailymotionBidAdapter.js +1 -1
  62. package/dist/dependencies.json +96 -6
  63. package/dist/dspxBidAdapter.js +1 -1
  64. package/dist/dxkultureBidAdapter.js +1 -1
  65. package/dist/e_volutionBidAdapter.js +1 -1
  66. package/dist/emtvBidAdapter.js +1 -1
  67. package/dist/eplanningBidAdapter.js +1 -1
  68. package/dist/euidIdSystem.js +1 -1
  69. package/dist/exadsBidAdapter.js +1 -1
  70. package/dist/feedadBidAdapter.js +1 -1
  71. package/dist/finativeBidAdapter.js +1 -1
  72. package/dist/freewheel-sspBidAdapter.js +1 -1
  73. package/dist/globalsunBidAdapter.js +1 -1
  74. package/dist/gmosspBidAdapter.js +1 -1
  75. package/dist/goldbachBidAdapter.js +1 -1
  76. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  77. package/dist/greenbidsRtdProvider.js +1 -1
  78. package/dist/gridBidAdapter.js +1 -1
  79. package/dist/gumgumBidAdapter.js +1 -1
  80. package/dist/h12mediaBidAdapter.js +1 -1
  81. package/dist/hypelabBidAdapter.js +1 -1
  82. package/dist/id5AnalyticsAdapter.js +1 -1
  83. package/dist/id5IdSystem.js +1 -1
  84. package/dist/illuminBidAdapter.js +1 -1
  85. package/dist/imdsBidAdapter.js +1 -1
  86. package/dist/improvedigitalBidAdapter.js +1 -1
  87. package/dist/insticatorBidAdapter.js +1 -1
  88. package/dist/intentIqIdSystem.js +1 -1
  89. package/dist/iqzoneBidAdapter.js +1 -1
  90. package/dist/ixBidAdapter.js +1 -1
  91. package/dist/jixieBidAdapter.js +1 -1
  92. package/dist/justpremiumBidAdapter.js +1 -1
  93. package/dist/kargoBidAdapter.js +1 -1
  94. package/dist/kimberliteBidAdapter.js +1 -1
  95. package/dist/kiviadsBidAdapter.js +1 -1
  96. package/dist/konduitAnalyticsAdapter.js +1 -1
  97. package/dist/krushmediaBidAdapter.js +1 -1
  98. package/dist/kueezBidAdapter.js +1 -1
  99. package/dist/kueezRtbBidAdapter.js +1 -1
  100. package/dist/lassoBidAdapter.js +1 -1
  101. package/dist/lifestreetBidAdapter.js +1 -1
  102. package/dist/liveIntentIdSystem.js +1 -1
  103. package/dist/logicadBidAdapter.js +1 -1
  104. package/dist/loglyliftBidAdapter.js +1 -1
  105. package/dist/loyalBidAdapter.js +1 -1
  106. package/dist/luceadBidAdapter.js +1 -1
  107. package/dist/lunamediahbBidAdapter.js +1 -1
  108. package/dist/mabidderBidAdapter.js +1 -1
  109. package/dist/magniteAnalyticsAdapter.js +1 -1
  110. package/dist/malltvAnalyticsAdapter.js +1 -1
  111. package/dist/marsmediaBidAdapter.js +1 -1
  112. package/dist/mathildeadsBidAdapter.js +1 -1
  113. package/dist/mediafuseBidAdapter.js +1 -1
  114. package/dist/medianetAnalyticsAdapter.js +1 -1
  115. package/dist/medianetBidAdapter.js +1 -1
  116. package/dist/mediasquareBidAdapter.js +1 -1
  117. package/dist/mgidBidAdapter.js +1 -1
  118. package/dist/mgidXBidAdapter.js +1 -1
  119. package/dist/minutemediaBidAdapter.js +1 -1
  120. package/dist/missenaBidAdapter.js +1 -1
  121. package/dist/mobfoxpbBidAdapter.js +1 -1
  122. package/dist/mobianRtdProvider.js +1 -1
  123. package/dist/nexx360BidAdapter.js +1 -1
  124. package/dist/nobidAnalyticsAdapter.js +1 -1
  125. package/dist/nobidBidAdapter.js +1 -1
  126. package/dist/not-for-prod/prebid.js +211 -204
  127. package/dist/oguryBidAdapter.js +1 -1
  128. package/dist/onetagBidAdapter.js +1 -1
  129. package/dist/ooloAnalyticsAdapter.js +1 -1
  130. package/dist/openwebBidAdapter.js +1 -1
  131. package/dist/openxBidAdapter.js +1 -1
  132. package/dist/optidigitalBidAdapter.js +1 -1
  133. package/dist/orakiBidAdapter.js +1 -0
  134. package/dist/orbidderBidAdapter.js +1 -1
  135. package/dist/ortbConverter.js +1 -1
  136. package/dist/outbrainBidAdapter.js +1 -1
  137. package/dist/ozoneBidAdapter.js +1 -1
  138. package/dist/paapi.js +1 -1
  139. package/dist/pairIdSystem.js +1 -1
  140. package/dist/pgamsspBidAdapter.js +1 -1
  141. package/dist/pixfutureBidAdapter.js +1 -1
  142. package/dist/playdigoBidAdapter.js +1 -1
  143. package/dist/prebidServerBidAdapter.js +1 -1
  144. package/dist/pubCircleBidAdapter.js +1 -1
  145. package/dist/publinkIdSystem.js +1 -1
  146. package/dist/publirBidAdapter.js +1 -1
  147. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  148. package/dist/pubmaticBidAdapter.js +1 -1
  149. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  150. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  151. package/dist/pxyzBidAdapter.js +1 -1
  152. package/dist/qtBidAdapter.js +1 -1
  153. package/dist/quantcastBidAdapter.js +1 -1
  154. package/dist/raynRtdProvider.js +1 -1
  155. package/dist/readpeakBidAdapter.js +1 -1
  156. package/dist/relaidoBidAdapter.js +1 -1
  157. package/dist/retailspotBidAdapter.js +1 -1
  158. package/dist/rhythmoneBidAdapter.js +1 -1
  159. package/dist/riseBidAdapter.js +1 -1
  160. package/dist/rubiconBidAdapter.js +1 -1
  161. package/dist/seedingAllianceBidAdapter.js +1 -1
  162. package/dist/seedtagBidAdapter.js +1 -1
  163. package/dist/setupadBidAdapter.js +1 -1
  164. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  165. package/dist/sharethroughBidAdapter.js +1 -1
  166. package/dist/shinezBidAdapter.js +1 -1
  167. package/dist/shinezRtbBidAdapter.js +1 -1
  168. package/dist/smaatoBidAdapter.js +1 -1
  169. package/dist/smartadserverBidAdapter.js +1 -1
  170. package/dist/smartxBidAdapter.js +1 -1
  171. package/dist/smartyadsBidAdapter.js +1 -1
  172. package/dist/smartyadsUtils.js +1 -0
  173. package/dist/smartytechBidAdapter.js +1 -1
  174. package/dist/smilewantedBidAdapter.js +1 -1
  175. package/dist/snigelBidAdapter.js +1 -1
  176. package/dist/sonobiBidAdapter.js +1 -1
  177. package/dist/sovrnBidAdapter.js +1 -1
  178. package/dist/sspBCBidAdapter.js +1 -1
  179. package/dist/stnBidAdapter.js +1 -1
  180. package/dist/stvBidAdapter.js +1 -1
  181. package/dist/sublimeBidAdapter.js +1 -1
  182. package/dist/taboolaBidAdapter.js +1 -1
  183. package/dist/tagorasBidAdapter.js +1 -1
  184. package/dist/tappxBidAdapter.js +1 -1
  185. package/dist/targetVideoBidAdapter.js +1 -1
  186. package/dist/teadsBidAdapter.js +1 -1
  187. package/dist/teqblazeUtils.js +1 -0
  188. package/dist/terceptAnalyticsAdapter.js +1 -1
  189. package/dist/themoneytizerBidAdapter.js +1 -1
  190. package/dist/topicsFpdModule.js +1 -1
  191. package/dist/trionBidAdapter.js +1 -1
  192. package/dist/tripleliftBidAdapter.js +1 -1
  193. package/dist/ttdBidAdapter.js +1 -1
  194. package/dist/twistDigitalBidAdapter.js +1 -1
  195. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  196. package/dist/uid2IdSystem.js +1 -1
  197. package/dist/underdogmediaBidAdapter.js +1 -1
  198. package/dist/undertoneBidAdapter.js +1 -1
  199. package/dist/unrulyBidAdapter.js +1 -1
  200. package/dist/userId.js +1 -1
  201. package/dist/vidazooBidAdapter.js +1 -1
  202. package/dist/vidazooUtils.js +1 -0
  203. package/dist/videobyteBidAdapter.js +1 -1
  204. package/dist/visiblemeasuresBidAdapter.js +1 -1
  205. package/dist/visxBidAdapter.js +1 -1
  206. package/dist/vuukleBidAdapter.js +1 -1
  207. package/dist/widespaceBidAdapter.js +1 -1
  208. package/dist/winrBidAdapter.js +1 -1
  209. package/dist/yahooAdsBidAdapter.js +1 -1
  210. package/dist/yieldmoBidAdapter.js +1 -1
  211. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  212. package/dist/yuktamediaAnalyticsAdapter.js +1 -1
  213. package/integrationExamples/gpt/raynRtdProvider_example.html +1 -0
  214. package/libraries/adagioUtils/adagioUtils.js +35 -0
  215. package/libraries/appnexusUtils/anUtils.js +1 -0
  216. package/libraries/autoplayDetection/autoplay.js +8 -1
  217. package/libraries/consentManagement/cmUtils.js +38 -0
  218. package/libraries/ortbConverter/converter.js +1 -1
  219. package/libraries/smartyadsUtils/getAdUrlByRegion.js +32 -0
  220. package/libraries/teqblazeUtils/bidderUtils.js +253 -0
  221. package/libraries/vidazooUtils/bidderUtils.js +481 -0
  222. package/libraries/vidazooUtils/constants.js +7 -0
  223. package/modules/.submodules.json +1 -0
  224. package/modules/acuityadsBidAdapter.js +5 -203
  225. package/modules/adagioBidAdapter.js +1 -17
  226. package/modules/adagioRtdProvider.js +41 -51
  227. package/modules/adagioRtdProvider.md +1 -0
  228. package/modules/addefendBidAdapter.js +1 -2
  229. package/modules/adlooxRtdProvider.js +1 -1
  230. package/modules/admanBidAdapter.js +31 -188
  231. package/modules/adnuntiusBidAdapter.js +1 -0
  232. package/modules/adprimeBidAdapter.js +28 -165
  233. package/modules/adxcgAnalyticsAdapter.js +1 -2
  234. package/modules/axisBidAdapter.js +33 -165
  235. package/modules/beyondmediaBidAdapter.js +5 -189
  236. package/modules/bliinkBidAdapter.js +3 -31
  237. package/modules/boldwinBidAdapter.js +21 -159
  238. package/modules/ceeIdSystem.js +1 -1
  239. package/modules/compassBidAdapter.js +5 -198
  240. package/modules/consentManagementGpp.js +2 -38
  241. package/modules/consentManagementTcf.js +7 -38
  242. package/modules/contentexchangeBidAdapter.js +5 -200
  243. package/modules/conversantAnalyticsAdapter.js +1 -2
  244. package/modules/conversantBidAdapter.js +1 -0
  245. package/modules/copper6sspBidAdapter.js +19 -0
  246. package/modules/copper6sspBidAdapter.md +79 -0
  247. package/modules/criteoBidAdapter.js +10 -3
  248. package/modules/e_volutionBidAdapter.js +4 -186
  249. package/modules/emtvBidAdapter.js +5 -198
  250. package/modules/globalsunBidAdapter.js +5 -199
  251. package/modules/id5AnalyticsAdapter.js +1 -2
  252. package/modules/id5IdSystem.js +31 -2
  253. package/modules/id5IdSystem.md +67 -2
  254. package/modules/intentIqIdSystem.js +408 -50
  255. package/modules/intentIqIdSystem.md +92 -0
  256. package/modules/iqzoneBidAdapter.js +5 -224
  257. package/modules/kiviadsBidAdapter.js +5 -199
  258. package/modules/krushmediaBidAdapter.js +25 -143
  259. package/modules/liveIntentIdSystem.js +2 -2
  260. package/modules/loyalBidAdapter.js +4 -178
  261. package/modules/lunamediahbBidAdapter.js +5 -118
  262. package/modules/mabidderBidAdapter.js +1 -2
  263. package/modules/mathildeadsBidAdapter.js +5 -198
  264. package/modules/medianetAnalyticsAdapter.js +1 -2
  265. package/modules/medianetBidAdapter.js +1 -1
  266. package/modules/mgidXBidAdapter.js +14 -207
  267. package/modules/mobfoxpbBidAdapter.js +4 -135
  268. package/modules/mobianRtdProvider.js +2 -2
  269. package/modules/nobidAnalyticsAdapter.js +2 -3
  270. package/modules/orakiBidAdapter.js +19 -0
  271. package/modules/orakiBidAdapter.md +79 -0
  272. package/modules/orbidderBidAdapter.js +4 -2
  273. package/modules/ozoneBidAdapter.js +117 -58
  274. package/modules/paapi.js +2 -1
  275. package/modules/pairIdSystem.js +27 -10
  276. package/modules/pgamsspBidAdapter.js +5 -240
  277. package/modules/pixfutureBidAdapter.js +1 -2
  278. package/modules/playdigoBidAdapter.js +4 -186
  279. package/modules/prebidServerBidAdapter/index.js +10 -3
  280. package/modules/pubCircleBidAdapter.js +5 -218
  281. package/modules/pubmaticAnalyticsAdapter.js +21 -8
  282. package/modules/pubxaiAnalyticsAdapter.js +1 -5
  283. package/modules/qtBidAdapter.js +5 -224
  284. package/modules/raynRtdProvider.js +36 -3
  285. package/modules/seedtagBidAdapter.js +5 -0
  286. package/modules/setupadBidAdapter.js +58 -140
  287. package/modules/smartadserverBidAdapter.js +3 -0
  288. package/modules/smartyadsBidAdapter.js +6 -110
  289. package/modules/smartytechBidAdapter.js +7 -2
  290. package/modules/snigelBidAdapter.js +1 -2
  291. package/modules/tappxBidAdapter.js +1 -2
  292. package/modules/terceptAnalyticsAdapter.js +1 -2
  293. package/modules/topicsFpdModule.js +1 -1
  294. package/modules/twistDigitalBidAdapter.js +1 -12
  295. package/modules/uid2IdSystem.js +0 -1
  296. package/modules/uid2IdSystem_shared.js +0 -1
  297. package/modules/userId/index.js +31 -21
  298. package/modules/vidazooBidAdapter.js +26 -468
  299. package/modules/visiblemeasuresBidAdapter.js +5 -199
  300. package/modules/yahooAdsBidAdapter.js +4 -1
  301. package/modules/yuktamediaAnalyticsAdapter.js +1 -2
  302. package/package.json +1 -1
  303. package/src/auction.js +5 -63
  304. package/src/utils/focusTimeout.js +41 -0
  305. package/src/utils/ttlCollection.js +2 -1
  306. package/src/utils.js +42 -0
  307. package/src/videoCache.js +72 -0
  308. package/test/mocks/videoCacheStub.js +1 -1
  309. package/test/spec/auctionmanager_spec.js +16 -1
  310. package/test/spec/fpd/gdpr_spec.js +24 -2
  311. package/test/spec/libraries/teqblazeUtils/bidderUtils_spec.js +519 -0
  312. package/test/spec/modules/acuityadsBidAdapter_spec.js +79 -43
  313. package/test/spec/modules/adagioRtdProvider_spec.js +62 -1
  314. package/test/spec/modules/admanBidAdapter_spec.js +370 -247
  315. package/test/spec/modules/adnuntiusBidAdapter_spec.js +6 -3
  316. package/test/spec/modules/adprimeBidAdapter_spec.js +225 -78
  317. package/test/spec/modules/axisBidAdapter_spec.js +78 -14
  318. package/test/spec/modules/beyondmediaBidAdapter_spec.js +80 -18
  319. package/test/spec/modules/bliinkBidAdapter_spec.js +8 -2
  320. package/test/spec/modules/boldwinBidAdapter_spec.js +221 -75
  321. package/test/spec/modules/compassBidAdapter_spec.js +130 -16
  322. package/test/spec/modules/contentexchangeBidAdapter_spec.js +134 -21
  323. package/test/spec/modules/conversantAnalyticsAdapter_spec.js +1 -1
  324. package/test/spec/modules/conversantBidAdapter_spec.js +7 -0
  325. package/test/spec/modules/copper6sspBidAdapter_spec.js +514 -0
  326. package/test/spec/modules/e_volutionBidAdapter_spec.js +65 -3
  327. package/test/spec/modules/emtvBidAdapter_spec.js +131 -16
  328. package/test/spec/modules/globalsunBidAdapter_spec.js +130 -16
  329. package/test/spec/modules/id5IdSystem_spec.js +79 -3
  330. package/test/spec/modules/intentIqIdSystem_spec.js +264 -36
  331. package/test/spec/modules/iqzoneBidAdapter_spec.js +66 -12
  332. package/test/spec/modules/kiviadsBidAdapter_spec.js +131 -20
  333. package/test/spec/modules/krushmediaBidAdapter_spec.js +272 -90
  334. package/test/spec/modules/loyalBidAdapter_spec.js +114 -14
  335. package/test/spec/modules/lunamediahbBidAdapter_spec.js +221 -87
  336. package/test/spec/modules/mathildeadsBidAdapter_spec.js +87 -18
  337. package/test/spec/modules/mgidXBidAdapter_spec.js +11 -3
  338. package/test/spec/modules/mobfoxpbBidAdapter_spec.js +229 -91
  339. package/test/spec/modules/orakiBidAdapter_spec.js +510 -0
  340. package/test/spec/modules/ozoneBidAdapter_spec.js +192 -22
  341. package/test/spec/modules/paapi_spec.js +5 -5
  342. package/test/spec/modules/pgamsspBidAdapter_spec.js +83 -16
  343. package/test/spec/modules/playdigoBidAdapter_spec.js +38 -9
  344. package/test/spec/modules/prebidServerBidAdapter_spec.js +14 -0
  345. package/test/spec/modules/pubCircleBidAdapter_spec.js +82 -17
  346. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +52 -5
  347. package/test/spec/modules/qtBidAdapter_spec.js +15 -3
  348. package/test/spec/modules/raynRtdProvider_spec.js +25 -0
  349. package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
  350. package/test/spec/modules/setupadBidAdapter_spec.js +124 -97
  351. package/test/spec/modules/smartadserverBidAdapter_spec.js +7 -0
  352. package/test/spec/modules/smartyadsBidAdapter_spec.js +6 -83
  353. package/test/spec/modules/smartytechBidAdapter_spec.js +5 -1
  354. package/test/spec/modules/topicsFpdModule_spec.js +43 -59
  355. package/test/spec/modules/twistDigitalBidAdapter_spec.js +5 -3
  356. package/test/spec/modules/userId_spec.js +86 -47
  357. package/test/spec/modules/vidazooBidAdapter_spec.js +21 -23
  358. package/test/spec/modules/visiblemeasuresBidAdapter_spec.js +130 -16
  359. package/test/spec/modules/yahooAdsBidAdapter_spec.js +1 -1
  360. package/test/spec/ortbConverter/converter_spec.js +7 -3
  361. package/test/spec/unit/utils/focusTimeout_spec.js +60 -0
  362. package/test/spec/videoCache_spec.js +56 -53
@@ -1,4 +1,4 @@
1
- import { spec } from 'modules/setupadBidAdapter.js';
1
+ import { spec, biddersCreativeIds } from 'modules/setupadBidAdapter.js';
2
2
 
3
3
  describe('SetupadAdapter', function () {
4
4
  const userIdAsEids = [
@@ -42,9 +42,104 @@ describe('SetupadAdapter', function () {
42
42
  },
43
43
  userIdAsEids,
44
44
  },
45
+ {
46
+ adUnitCode: 'test-div-2',
47
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
48
+ bidId: '22c4871113f461',
49
+ bidder: 'rubicon',
50
+ bidderRequestId: '15246a574e859f',
51
+ uspConsent: 'usp-context-string',
52
+ gdprConsent: {
53
+ consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA',
54
+ gdprApplies: true,
55
+ },
56
+ params: {
57
+ placement_id: '123',
58
+ account_id: 'test-account-id',
59
+ },
60
+ sizes: [[300, 250]],
61
+ ortb2: {
62
+ device: {
63
+ w: 1500,
64
+ h: 1000,
65
+ },
66
+ site: {
67
+ domain: 'test.com',
68
+ page: 'http://test.com',
69
+ },
70
+ },
71
+ userIdAsEids,
72
+ },
45
73
  ];
46
74
 
47
75
  const bidderRequest = {
76
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
77
+ auctionStart: 1579746300522,
78
+ bidderCode: 'setupad',
79
+ bidderRequestId: '15246a574e859f',
80
+ bids: [
81
+ {
82
+ adUnitCode: 'test-div',
83
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
84
+ bidId: '22c4871113f461',
85
+ bidder: 'rubicon',
86
+ bidderRequestId: '15246a574e859f',
87
+ uspConsent: 'usp-context-string',
88
+ gdprConsent: {
89
+ consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA',
90
+ gdprApplies: true,
91
+ },
92
+ params: {
93
+ placement_id: '123',
94
+ account_id: 'test-account-id',
95
+ },
96
+ sizes: [[300, 250]],
97
+ ortb2: {
98
+ device: {
99
+ w: 1500,
100
+ h: 1000,
101
+ },
102
+ site: {
103
+ domain: 'test.com',
104
+ page: 'http://test.com',
105
+ },
106
+ },
107
+ userIdAsEids,
108
+ },
109
+ {
110
+ adUnitCode: 'test-div-2',
111
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
112
+ bidId: '22c4871113f461',
113
+ bidder: 'rubicon',
114
+ bidderRequestId: '15246a574e859f',
115
+ uspConsent: 'usp-context-string',
116
+ gdprConsent: {
117
+ consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA',
118
+ gdprApplies: true,
119
+ },
120
+ params: {
121
+ placement_id: '123',
122
+ account_id: 'test-account-id',
123
+ },
124
+ sizes: [[300, 250]],
125
+ ortb2: {
126
+ device: {
127
+ w: 1500,
128
+ h: 1000,
129
+ },
130
+ site: {
131
+ domain: 'test.com',
132
+ page: 'http://test.com',
133
+ },
134
+ },
135
+ userIdAsEids,
136
+ },
137
+ ],
138
+ gdprConsent: {
139
+ consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA',
140
+ vendorData: {},
141
+ gdprApplies: true,
142
+ },
48
143
  ortb2: {
49
144
  device: {
50
145
  w: 1500,
@@ -52,39 +147,27 @@ describe('SetupadAdapter', function () {
52
147
  },
53
148
  },
54
149
  refererInfo: {
150
+ canonicalUrl: null,
55
151
  domain: 'test.com',
56
152
  page: 'http://test.com',
57
- ref: '',
153
+ referer: null,
58
154
  },
59
155
  };
60
156
 
61
157
  const serverResponse = {
62
158
  body: {
63
- id: 'f7b3d2da-e762-410c-b069-424f92c4c4b2',
64
159
  seatbid: [
65
160
  {
66
- bid: [
67
- {
68
- id: 'test-bid-id',
69
- price: 0.8,
70
- adm: 'this is an ad',
71
- adid: 'test-ad-id',
72
- adomain: ['test.addomain.com'],
73
- w: 300,
74
- h: 250,
75
- },
76
- ],
77
- seat: 'testBidder',
161
+ bid: [{ crid: 123 }, { crid: 1234 }],
162
+ seat: 'pubmatic',
78
163
  },
79
- ],
80
- cur: 'USD',
81
- ext: {
82
- sync: {
83
- image: ['urlA?gdpr={{.GDPR}}'],
84
- iframe: ['urlB'],
164
+ {
165
+ bid: [{ crid: 12345 }],
166
+ seat: 'setupad',
85
167
  },
86
- },
168
+ ],
87
169
  },
170
+ testCase: 1,
88
171
  };
89
172
 
90
173
  describe('isBidRequestValid', function () {
@@ -119,77 +202,25 @@ describe('SetupadAdapter', function () {
119
202
  });
120
203
 
121
204
  describe('buildRequests', function () {
122
- it('check request params with GDPR and USP', function () {
123
- const request = spec.buildRequests(bidRequests, bidRequests[0]);
124
- expect(JSON.parse(request[0].data).user.ext.consent).to.equal(
125
- 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA'
126
- );
127
- expect(JSON.parse(request[0].data).regs.ext.gdpr).to.equal(1);
128
- expect(JSON.parse(request[0].data).regs.ext.us_privacy).to.equal('usp-context-string');
129
- });
130
-
131
- it('check request params without GDPR', function () {
132
- let bidRequestsWithoutGDPR = Object.assign({}, bidRequests[0]);
133
- delete bidRequestsWithoutGDPR.gdprConsent;
134
- const request = spec.buildRequests([bidRequestsWithoutGDPR], bidRequestsWithoutGDPR);
135
- expect(JSON.parse(request[0].data).regs.ext.gdpr).to.be.undefined;
136
- expect(JSON.parse(request[0].data).regs.ext.us_privacy).to.equal('usp-context-string');
205
+ it('should return correct storedrequest id for bids if placement_id is provided', function () {
206
+ const request = spec.buildRequests(bidRequests, bidderRequest);
207
+ expect(request.data.imp[0].ext.prebid.storedrequest.id).to.equal('123');
137
208
  });
138
209
 
139
210
  it('should return correct storedrequest id if account_id is provided', function () {
140
- const request = spec.buildRequests(bidRequests, bidRequests[0]);
141
- expect(JSON.parse(request[0].data).ext.prebid.storedrequest.id).to.equal('test-account-id');
142
- });
143
-
144
- it('should return correct storedrequest id if account_id is not provided', function () {
145
- let bidRequestsWithoutAccountId = Object.assign({}, bidRequests[0]);
146
- delete bidRequestsWithoutAccountId.params.account_id;
147
- const request = spec.buildRequests(
148
- [bidRequestsWithoutAccountId],
149
- bidRequestsWithoutAccountId
150
- );
151
- expect(JSON.parse(request[0].data).ext.prebid.storedrequest.id).to.equal('default');
152
- });
153
-
154
- it('validate generated params', function () {
155
- const request = spec.buildRequests(bidRequests);
156
- expect(request[0].bidId).to.equal('22c4871113f461');
157
- expect(JSON.parse(request[0].data).id).to.equal('15246a574e859f');
158
- });
159
-
160
- it('check if correct site object was added', function () {
161
211
  const request = spec.buildRequests(bidRequests, bidderRequest);
162
- const siteObj = JSON.parse(request[0].data).site;
163
-
164
- expect(siteObj.domain).to.equal('test.com');
165
- expect(siteObj.page).to.equal('http://test.com');
166
- expect(siteObj.ref).to.equal('');
212
+ expect(request.data.ext.prebid.storedrequest.id).to.equal('test-account-id');
167
213
  });
168
214
 
169
- it('check if correct device object was added', function () {
215
+ it('should return setupad custom adapter param', function () {
170
216
  const request = spec.buildRequests(bidRequests, bidderRequest);
171
- const deviceObj = JSON.parse(request[0].data).device;
172
-
173
- expect(deviceObj.w).to.equal(1500);
174
- expect(deviceObj.h).to.equal(1000);
175
- });
176
-
177
- it('check if imp object was added', function () {
178
- const request = spec.buildRequests(bidRequests);
179
- expect(JSON.parse(request[0].data).imp).to.be.an('array');
180
- });
181
-
182
- it('should send "user.ext.eids" in the request for Prebid.js supported modules only', function () {
183
- const request = spec.buildRequests(bidRequests);
184
- expect(JSON.parse(request[0].data).user.ext.eids).to.deep.equal(userIdAsEids);
217
+ expect(request.data.setupad).to.equal('adapter');
185
218
  });
186
219
 
187
- it('should send an undefined "user.ext.eids" in the request if userId module is unsupported', function () {
188
- let bidRequestsUnsupportedUserIdModule = Object.assign({}, bidRequests[0]);
189
- delete bidRequestsUnsupportedUserIdModule.userIdAsEids;
190
- const request = spec.buildRequests(bidRequestsUnsupportedUserIdModule);
191
-
192
- expect(JSON.parse(request[0].data).user.ext.eids).to.be.undefined;
220
+ // Change this to 1 whenever TEST_REQUEST = 1. This is allowed only for testing requests locally
221
+ it('should return correct test attribute value from global value', function () {
222
+ const request = spec.buildRequests(bidRequests, bidderRequest);
223
+ expect(request.data.test).to.equal(0);
193
224
  });
194
225
  });
195
226
 
@@ -256,25 +287,21 @@ describe('SetupadAdapter', function () {
256
287
  describe('interpretResponse', function () {
257
288
  it('should return empty array if error during parsing', () => {
258
289
  const wrongServerResponse = 'wrong data';
259
- let request = spec.buildRequests(bidRequests, bidRequests[0]);
290
+ let request = spec.buildRequests(bidRequests, bidderRequest);
260
291
  let result = spec.interpretResponse(wrongServerResponse, request);
261
292
 
262
293
  expect(result).to.be.instanceof(Array);
263
294
  expect(result.length).to.equal(0);
264
295
  });
265
296
 
266
- it('should get correct bid response', function () {
267
- const result = spec.interpretResponse(serverResponse, bidRequests[0]);
268
- expect(result).to.be.an('array').with.lengthOf(1);
269
- expect(result[0].requestId).to.equal('22c4871113f461');
270
- expect(result[0].cpm).to.equal(0.8);
271
- expect(result[0].width).to.equal(300);
272
- expect(result[0].height).to.equal(250);
273
- expect(result[0].creativeId).to.equal('test-bid-id');
274
- expect(result[0].currency).to.equal('USD');
275
- expect(result[0].netRevenue).to.equal(true);
276
- expect(result[0].ttl).to.equal(360);
277
- expect(result[0].ad).to.equal('this is an ad');
297
+ it('should update biddersCreativeIds correctly', function () {
298
+ spec.interpretResponse(serverResponse, bidderRequest);
299
+
300
+ expect(biddersCreativeIds).to.deep.equal({
301
+ 123: 'pubmatic',
302
+ 1234: 'pubmatic',
303
+ 12345: 'setupad',
304
+ });
278
305
  });
279
306
  });
280
307
 
@@ -458,6 +458,13 @@ describe('Smart bid adapter tests', function () {
458
458
  expect(syncs).to.have.lengthOf(0);
459
459
  });
460
460
 
461
+ it('should set browsingTopics=false in request.options', () => {
462
+ const requests = spec.buildRequests(DEFAULT_PARAMS_WO_OPTIONAL);
463
+ expect(requests[0]).to.have.property('options').and.to.deep.equal({
464
+ browsingTopics: false
465
+ });
466
+ });
467
+
461
468
  describe('gdpr tests', function () {
462
469
  afterEach(function () {
463
470
  config.setConfig({ ortb2: undefined });
@@ -61,12 +61,10 @@ describe('SmartyadsAdapter', function () {
61
61
  it('Returns valid data if array of bids is valid', function () {
62
62
  let data = serverRequest.data;
63
63
  expect(data).to.be.an('object');
64
- expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'language', 'secure', 'host', 'page', 'placements', 'coppa', 'eeid', 'ifa');
64
+ expect(data).to.have.all.keys('deviceWidth', 'deviceHeight', 'host', 'page', 'placements', 'coppa', 'eeid', 'ifa');
65
65
  expect(data.deviceWidth).to.be.a('number');
66
66
  expect(data.deviceHeight).to.be.a('number');
67
67
  expect(data.coppa).to.be.a('number');
68
- expect(data.language).to.be.a('string');
69
- expect(data.secure).to.be.within(0, 1);
70
68
  expect(data.host).to.be.a('string');
71
69
  expect(data.page).to.be.a('string');
72
70
  let placement = data['placements'][0];
@@ -126,8 +124,8 @@ describe('SmartyadsAdapter', function () {
126
124
  expect(dataItem.width).to.equal(300);
127
125
  expect(dataItem.height).to.equal(250);
128
126
  expect(dataItem.ad).to.equal('Test');
129
- expect(dataItem.meta).to.have.property('advertiserDomains')
130
- expect(dataItem.meta.advertiserDomains).to.deep.equal(['example.com']);
127
+ expect(dataItem.meta).to.have.property('advertiserDomains');
128
+ expect(dataItem.meta.advertiserDomains).to.be.an('array');
131
129
  expect(dataItem.ttl).to.equal(120);
132
130
  expect(dataItem.creativeId).to.equal('2');
133
131
  expect(dataItem.netRevenue).to.be.true;
@@ -152,7 +150,7 @@ describe('SmartyadsAdapter', function () {
152
150
 
153
151
  let dataItem = videoResponses[0];
154
152
  expect(dataItem).to.have.all.keys('requestId', 'cpm', 'vastUrl', 'ttl', 'creativeId',
155
- 'netRevenue', 'currency', 'dealId', 'mediaType');
153
+ 'netRevenue', 'currency', 'dealId', 'mediaType', 'meta');
156
154
  expect(dataItem.requestId).to.equal('23fhj33i987f');
157
155
  expect(dataItem.cpm).to.equal(0.5);
158
156
  expect(dataItem.vastUrl).to.equal('test.com');
@@ -183,7 +181,7 @@ describe('SmartyadsAdapter', function () {
183
181
  expect(nativeResponses).to.be.an('array').that.is.not.empty;
184
182
 
185
183
  let dataItem = nativeResponses[0];
186
- expect(dataItem).to.have.keys('requestId', 'cpm', 'ttl', 'creativeId', 'netRevenue', 'currency', 'mediaType', 'native');
184
+ expect(dataItem).to.have.keys('requestId', 'cpm', 'ttl', 'creativeId', 'netRevenue', 'currency', 'mediaType', 'native', 'meta');
187
185
  expect(dataItem.native).to.have.keys('clickUrl', 'impressionTrackers', 'title', 'image')
188
186
  expect(dataItem.requestId).to.equal('23fhj33i987f');
189
187
  expect(dataItem.cpm).to.equal(0.4);
@@ -263,7 +261,7 @@ describe('SmartyadsAdapter', function () {
263
261
  });
264
262
  });
265
263
  describe('getUserSyncs', function () {
266
- const syncUrl = 'https://as.ck-ie.com/prebidjs?p=7c47322e527cf8bdeb7facc1bb03387a&gdpr=0&gdpr_consent=&type=iframe&us_privacy=&gpp=';
264
+ const syncUrl = 'https://as.ck-ie.com/prebidjs?p=7c47322e527cf8bdeb7facc1bb03387a/iframe?pbjs=1&coppa=0';
267
265
  const syncOptions = {
268
266
  iframeEnabled: true
269
267
  };
@@ -277,79 +275,4 @@ describe('SmartyadsAdapter', function () {
277
275
  ]);
278
276
  });
279
277
  });
280
-
281
- describe('onBidWon', function () {
282
- it('should exists', function () {
283
- expect(spec.onBidWon).to.exist.and.to.be.a('function');
284
- });
285
-
286
- it('should send a valid bid won notice', function () {
287
- const bid = {
288
- 'c': 'o',
289
- 'm': 'prebid',
290
- 'secret_key': 'prebid_js',
291
- 'winTest': '1',
292
- 'postData': [{
293
- 'bidder': 'smartyads',
294
- 'params': [
295
- {'host': 'prebid',
296
- 'accountid': '123',
297
- 'sourceid': '12345'
298
- }]
299
- }]
300
- };
301
- spec.onBidWon(bid);
302
- expect(server.requests.length).to.equal(1);
303
- });
304
- });
305
-
306
- describe('onTimeout', function () {
307
- it('should exists', function () {
308
- expect(spec.onTimeout).to.exist.and.to.be.a('function');
309
- });
310
-
311
- it('should send a valid bid timeout notice', function () {
312
- const bid = {
313
- 'c': 'o',
314
- 'm': 'prebid',
315
- 'secret_key': 'prebid_js',
316
- 'bidTimeout': '1',
317
- 'postData': [{
318
- 'bidder': 'smartyads',
319
- 'params': [
320
- {'host': 'prebid',
321
- 'accountid': '123',
322
- 'sourceid': '12345'
323
- }]
324
- }]
325
- };
326
- spec.onTimeout(bid);
327
- expect(server.requests.length).to.equal(1);
328
- });
329
- });
330
-
331
- describe('onBidderError', function () {
332
- it('should exists', function () {
333
- expect(spec.onBidderError).to.exist.and.to.be.a('function');
334
- });
335
-
336
- it('should send a valid bidder error notice', function () {
337
- const bid = {
338
- 'c': 'o',
339
- 'm': 'prebid',
340
- 'secret_key': 'prebid_js',
341
- 'bidderError': '1',
342
- 'postData': [{
343
- 'bidder': 'smartyads',
344
- 'params': [
345
- {'host': 'prebid',
346
- 'accountid': '123',
347
- 'sourceid': '12345'
348
- }]
349
- }]
350
- };
351
- spec.onBidderError(bid);
352
- expect(server.requests.length).to.equal(1);
353
- });
354
- });
355
278
  });
@@ -204,7 +204,11 @@ function mockResponseData(requestData) {
204
204
  creativeId: `creative-id-${index}`,
205
205
  cpm: Math.floor(Math.random() * 100),
206
206
  currency: `UAH-${rndIndex}`,
207
- mediaType: mediaType
207
+ mediaType: mediaType,
208
+ meta: {
209
+ primaryCatId: 'IAB2-2',
210
+ secondaryCatIds: ['IAB2-14', 'IAB2-6']
211
+ }
208
212
  };
209
213
  });
210
214
  return {
@@ -308,33 +308,6 @@ describe('topics', () => {
308
308
  }],
309
309
  name: 'ads.pubmatic.com'
310
310
  }];
311
- const consentString = 'CPi8wgAPi8wgAADABBENCrCsAP_AAH_AAAAAISNB7D==';
312
- const consentConfig = {
313
- consentString: consentString,
314
- gdprApplies: true,
315
- vendorData: {
316
- metadata: consentString,
317
- gdprApplies: true,
318
- purpose: {
319
- consents: {
320
- 1: true,
321
- 2: true,
322
- 3: true,
323
- 4: true
324
- }
325
- }
326
- }
327
- };
328
- const mockData = [
329
- {
330
- name: 'domain',
331
- segment: [{id: 123}]
332
- },
333
- {
334
- name: 'domain',
335
- segment: [{id: 321}],
336
- }
337
- ];
338
311
 
339
312
  const evt = {
340
313
  data: '{"segment":{"domain":"ads.pubmatic.com","topics":[{"configVersion":"chrome.1","modelVersion":"2206021246","taxonomyVersion":"1","topic":165,"version":"chrome.1:1:2206021246"}],"bidder":"pubmatic"},"date":1669743901858}',
@@ -345,49 +318,60 @@ describe('topics', () => {
345
318
  storage.removeDataFromLocalStorage(topicStorageName);
346
319
  });
347
320
 
348
- describe('when cached data is available and not expired', () => {
321
+ describe('caching', () => {
349
322
  let sandbox;
350
323
  beforeEach(() => {
351
324
  sandbox = sinon.sandbox.create();
352
- const storedSegments = JSON.stringify(
353
- [['pubmatic', {
354
- '2206021246': {
355
- 'ext': {'segtax': 600, 'segclass': '2206021246'},
356
- 'segment': [{'id': '243'}, {'id': '265'}],
357
- 'name': 'ads.pubmatic.com'
358
- },
359
- 'lastUpdated': new Date().getTime()
360
- }]]
361
- );
362
- storage.setDataInLocalStorage(topicStorageName, storedSegments);
363
- config.setConfig({
364
- userSync: {
365
- topics: {
366
- maxTopicCaller: 4,
367
- bidders: [{
368
- bidder: 'pubmatic',
369
- iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
370
- }]
371
- }
372
- }
373
- })
374
- });
325
+ })
326
+
375
327
  afterEach(() => {
376
328
  sandbox.restore();
377
329
  config.resetConfig();
378
330
  });
379
331
 
380
- it('should return segments for bidder if transmitUfpd is allowed', () => {
381
- assert.deepEqual(getCachedTopics(), expected);
382
- });
332
+ it('should return no segments when not configured', () => {
333
+ config.setConfig({userSync: {}});
334
+ expect(getCachedTopics()).to.eql([]);
335
+ })
336
+
337
+ describe('when cached data is available and not expired', () => {
338
+ beforeEach(() => {
339
+ const storedSegments = JSON.stringify(
340
+ [['pubmatic', {
341
+ '2206021246': {
342
+ 'ext': {'segtax': 600, 'segclass': '2206021246'},
343
+ 'segment': [{'id': '243'}, {'id': '265'}],
344
+ 'name': 'ads.pubmatic.com'
345
+ },
346
+ 'lastUpdated': new Date().getTime()
347
+ }]]
348
+ );
349
+ storage.setDataInLocalStorage(topicStorageName, storedSegments);
350
+ config.setConfig({
351
+ userSync: {
352
+ topics: {
353
+ maxTopicCaller: 4,
354
+ bidders: [{
355
+ bidder: 'pubmatic',
356
+ iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
357
+ }]
358
+ }
359
+ }
360
+ })
361
+ });
383
362
 
384
- it('should NOT return segments for bidder if enrichUfpd is NOT allowed', () => {
385
- sandbox.stub(activities, 'isActivityAllowed').callsFake((activity, params) => {
386
- return !(activity === ACTIVITY_ENRICH_UFPD && params.component === 'bidder.pubmatic');
363
+ it('should return segments for bidder if transmitUfpd is allowed', () => {
364
+ assert.deepEqual(getCachedTopics(), expected);
365
+ });
366
+
367
+ it('should NOT return segments for bidder if enrichUfpd is NOT allowed', () => {
368
+ sandbox.stub(activities, 'isActivityAllowed').callsFake((activity, params) => {
369
+ return !(activity === ACTIVITY_ENRICH_UFPD && params.component === 'bidder.pubmatic');
370
+ });
371
+ expect(getCachedTopics()).to.eql([]);
387
372
  });
388
- expect(getCachedTopics()).to.eql([]);
389
373
  });
390
- })
374
+ });
391
375
 
392
376
  it('should return empty segments for bidder if there is cached segments stored which is expired', () => {
393
377
  let storedSegments = '[["pubmatic",{"2206021246":{"ext":{"segtax":600,"segclass":"2206021246"},"segment":[{"id":"243"},{"id":"265"}],"name":"ads.pubmatic.com"},"lastUpdated":10}]]';
@@ -3,9 +3,6 @@ import {
3
3
  spec as adapter,
4
4
  createDomain,
5
5
  hashCode,
6
- extractPID,
7
- extractCID,
8
- extractSubDomain,
9
6
  getStorageItem,
10
7
  setStorageItem,
11
8
  tryParseJSON,
@@ -18,6 +15,11 @@ import {useFakeTimers} from 'sinon';
18
15
  import {BANNER, VIDEO} from '../../../src/mediaTypes';
19
16
  import {config} from '../../../src/config';
20
17
  import {deepSetValue} from 'src/utils.js';
18
+ import {
19
+ extractPID,
20
+ extractCID,
21
+ extractSubDomain
22
+ } from '../../../libraries/vidazooUtils/bidderUtils.js';
21
23
 
22
24
  export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
23
25