prebid.js 9.4.1 → 9.6.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 (397) hide show
  1. package/.eslintrc.js +31 -5
  2. package/.github/workflows/jscpd.yml +2 -2
  3. package/.github/workflows/linter.yml +107 -0
  4. package/creative/crossDomain.js +6 -3
  5. package/dist/33acrossAnalyticsAdapter.js +1 -1
  6. package/dist/33acrossBidAdapter.js +1 -1
  7. package/dist/33acrossIdSystem.js +1 -1
  8. package/dist/BTBidAdapter.js +1 -1
  9. package/dist/adagioAnalyticsAdapter.js +1 -1
  10. package/dist/adagioBidAdapter.js +1 -1
  11. package/dist/adagioRtdProvider.js +1 -1
  12. package/dist/adagioUtils.js +1 -1
  13. package/dist/addefendBidAdapter.js +1 -1
  14. package/dist/adgenerationBidAdapter.js +1 -1
  15. package/dist/adkernelAdnBidAdapter.js +1 -1
  16. package/dist/adkernelBidAdapter.js +1 -1
  17. package/dist/adkernelUtils.js +1 -0
  18. package/dist/adlooxRtdProvider.js +1 -1
  19. package/dist/admixerBidAdapter.js +1 -1
  20. package/dist/adqueryBidAdapter.js +1 -1
  21. package/dist/adrelevantisBidAdapter.js +1 -1
  22. package/dist/adstirBidAdapter.js +1 -1
  23. package/dist/adtrgtmeBidAdapter.js +1 -1
  24. package/dist/advRedAnalyticsAdapter.js +1 -0
  25. package/dist/adxcgAnalyticsAdapter.js +1 -1
  26. package/dist/adxcgBidAdapter.js +1 -1
  27. package/dist/adyoulikeBidAdapter.js +1 -1
  28. package/dist/agmaAnalyticsAdapter.js +1 -1
  29. package/dist/aidemBidAdapter.js +1 -1
  30. package/dist/ajaBidAdapter.js +1 -1
  31. package/dist/akamaiDapRtdProvider.js +1 -1
  32. package/dist/amxBidAdapter.js +1 -1
  33. package/dist/amxIdSystem.js +1 -1
  34. package/dist/anonymisedRtdProvider.js +1 -1
  35. package/dist/apacdexBidAdapter.js +1 -1
  36. package/dist/appierAnalyticsAdapter.js +1 -1
  37. package/dist/appnexusBidAdapter.js +1 -1
  38. package/dist/asoBidAdapter.js +1 -1
  39. package/dist/axonixBidAdapter.js +1 -1
  40. package/dist/azerionedgeRtdProvider.js +1 -1
  41. package/dist/bidglassBidAdapter.js +1 -1
  42. package/dist/big-richmediaBidAdapter.js +1 -1
  43. package/dist/bridBidAdapter.js +1 -1
  44. package/dist/bridgewellBidAdapter.js +1 -1
  45. package/dist/brightMountainMediaBidAdapter.js +1 -1
  46. package/dist/carodaBidAdapter.js +1 -1
  47. package/dist/chtnwBidAdapter.js +1 -1
  48. package/dist/chunk-core.js +1 -1
  49. package/dist/concertBidAdapter.js +1 -1
  50. package/dist/connatixBidAdapter.js +1 -1
  51. package/dist/connectIdSystem.js +1 -1
  52. package/dist/connectadBidAdapter.js +1 -1
  53. package/dist/consumableBidAdapter.js +1 -1
  54. package/dist/contxtfulRtdProvider.js +1 -1
  55. package/dist/conversantAnalyticsAdapter.js +1 -1
  56. package/dist/conversantBidAdapter.js +1 -1
  57. package/dist/craftBidAdapter.js +1 -1
  58. package/dist/criteoBidAdapter.js +1 -1
  59. package/dist/currencyUtils.js +1 -1
  60. package/dist/cwireBidAdapter.js +1 -1
  61. package/dist/dailymotionBidAdapter.js +1 -1
  62. package/dist/debugging-standalone.js +1 -1
  63. package/dist/dependencies.json +69 -8
  64. package/dist/dfpAdServerVideo.js +1 -1
  65. package/dist/dfpAdpod.js +1 -1
  66. package/dist/dfpUtils.js +1 -1
  67. package/dist/discoveryBidAdapter.js +1 -1
  68. package/dist/dspxBidAdapter.js +1 -1
  69. package/dist/dxkultureBidAdapter.js +1 -1
  70. package/dist/eightPodAnalyticsAdapter.js +1 -1
  71. package/dist/eightPodBidAdapter.js +1 -1
  72. package/dist/eplanningBidAdapter.js +1 -1
  73. package/dist/euidIdSystem.js +1 -1
  74. package/dist/exadsBidAdapter.js +1 -1
  75. package/dist/feedadBidAdapter.js +1 -1
  76. package/dist/finativeBidAdapter.js +1 -1
  77. package/dist/fintezaAnalyticsAdapter.js +1 -1
  78. package/dist/fpdUtils.js +1 -0
  79. package/dist/freewheel-sspBidAdapter.js +1 -1
  80. package/dist/gmosspBidAdapter.js +1 -1
  81. package/dist/goldbachBidAdapter.js +1 -1
  82. package/dist/gptPreAuction.js +1 -1
  83. package/dist/gptUtils.js +1 -1
  84. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  85. package/dist/greenbidsRtdProvider.js +1 -1
  86. package/dist/gridBidAdapter.js +1 -1
  87. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  88. package/dist/growthCodeRtdProvider.js +1 -1
  89. package/dist/gumgumBidAdapter.js +1 -1
  90. package/dist/h12mediaBidAdapter.js +1 -1
  91. package/dist/hypelabBidAdapter.js +1 -1
  92. package/dist/id5AnalyticsAdapter.js +1 -1
  93. package/dist/id5IdSystem.js +1 -1
  94. package/dist/imdsBidAdapter.js +1 -1
  95. package/dist/improvedigitalBidAdapter.js +1 -1
  96. package/dist/insticatorBidAdapter.js +1 -1
  97. package/dist/intentIqAnalyticsAdapter.js +1 -0
  98. package/dist/ixBidAdapter.js +1 -1
  99. package/dist/jixieBidAdapter.js +1 -1
  100. package/dist/justpremiumBidAdapter.js +1 -1
  101. package/dist/jwplayerBidAdapter.js +1 -1
  102. package/dist/jwplayerRtdProvider.js +1 -1
  103. package/dist/kargoBidAdapter.js +1 -1
  104. package/dist/kimberliteBidAdapter.js +1 -1
  105. package/dist/konduitAnalyticsAdapter.js +1 -1
  106. package/dist/kueezBidAdapter.js +1 -1
  107. package/dist/lassoBidAdapter.js +1 -1
  108. package/dist/lifestreetBidAdapter.js +1 -1
  109. package/dist/liveIntentIdSystem.js +1 -1
  110. package/dist/logicadBidAdapter.js +1 -1
  111. package/dist/loglyliftBidAdapter.js +1 -1
  112. package/dist/luceadBidAdapter.js +1 -1
  113. package/dist/mabidderBidAdapter.js +1 -1
  114. package/dist/magniteAnalyticsAdapter.js +1 -1
  115. package/dist/malltvAnalyticsAdapter.js +1 -1
  116. package/dist/marsmediaBidAdapter.js +1 -1
  117. package/dist/mediafuseBidAdapter.js +1 -1
  118. package/dist/mediagoBidAdapter.js +1 -1
  119. package/dist/medianetAnalyticsAdapter.js +1 -1
  120. package/dist/medianetBidAdapter.js +1 -1
  121. package/dist/mediasquareBidAdapter.js +1 -1
  122. package/dist/mgidBidAdapter.js +1 -1
  123. package/dist/minutemediaBidAdapter.js +1 -1
  124. package/dist/missenaBidAdapter.js +1 -1
  125. package/dist/mobianRtdProvider.js +1 -1
  126. package/dist/nextMillenniumBidAdapter.js +1 -1
  127. package/dist/nexx360BidAdapter.js +1 -1
  128. package/dist/nobidAnalyticsAdapter.js +1 -1
  129. package/dist/nobidBidAdapter.js +1 -1
  130. package/dist/not-for-prod/prebid.js +208 -199
  131. package/dist/oguryBidAdapter.js +1 -1
  132. package/dist/onetagBidAdapter.js +1 -1
  133. package/dist/ooloAnalyticsAdapter.js +1 -1
  134. package/dist/openwebBidAdapter.js +1 -1
  135. package/dist/openxBidAdapter.js +1 -1
  136. package/dist/optidigitalBidAdapter.js +1 -1
  137. package/dist/optoutBidAdapter.js +1 -1
  138. package/dist/orbidderBidAdapter.js +1 -1
  139. package/dist/outbrainBidAdapter.js +1 -1
  140. package/dist/paapi.js +1 -1
  141. package/dist/permutiveRtdProvider.js +1 -1
  142. package/dist/pixfutureBidAdapter.js +1 -1
  143. package/dist/playdigoBidAdapter.js +1 -1
  144. package/dist/prebidServerBidAdapter.js +1 -1
  145. package/dist/programmaticaBidAdapter.js +1 -1
  146. package/dist/publinkIdSystem.js +1 -1
  147. package/dist/publirBidAdapter.js +1 -1
  148. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  149. package/dist/pubmaticBidAdapter.js +1 -1
  150. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  151. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  152. package/dist/pxyzBidAdapter.js +1 -1
  153. package/dist/quantcastBidAdapter.js +1 -1
  154. package/dist/readpeakBidAdapter.js +1 -1
  155. package/dist/relaidoBidAdapter.js +1 -1
  156. package/dist/relevatehealthBidAdapter.js +1 -1
  157. package/dist/retailspotBidAdapter.js +1 -1
  158. package/dist/rhythmoneBidAdapter.js +1 -1
  159. package/dist/ringieraxelspringerBidAdapter.js +1 -1
  160. package/dist/riseBidAdapter.js +1 -1
  161. package/dist/riseUtils.js +1 -0
  162. package/dist/rubiconBidAdapter.js +1 -1
  163. package/dist/schainSerializer.js +1 -0
  164. package/dist/seedingAllianceBidAdapter.js +1 -1
  165. package/dist/seedtagBidAdapter.js +1 -1
  166. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  167. package/dist/sharethroughBidAdapter.js +1 -1
  168. package/dist/shinezBidAdapter.js +1 -1
  169. package/dist/sizeMapping.js +1 -1
  170. package/dist/sizeUtils.js +1 -1
  171. package/dist/smaatoBidAdapter.js +1 -1
  172. package/dist/smartadserverBidAdapter.js +1 -1
  173. package/dist/smarthubBidAdapter.js +1 -1
  174. package/dist/smartxBidAdapter.js +1 -1
  175. package/dist/smilewantedBidAdapter.js +1 -1
  176. package/dist/snigelBidAdapter.js +1 -1
  177. package/dist/sonobiBidAdapter.js +1 -1
  178. package/dist/sovrnBidAdapter.js +1 -1
  179. package/dist/sspBCBidAdapter.js +1 -1
  180. package/dist/stnBidAdapter.js +1 -1
  181. package/dist/stvBidAdapter.js +1 -1
  182. package/dist/sublimeBidAdapter.js +1 -1
  183. package/dist/symitriDapRtdProvider.js +1 -0
  184. package/dist/taboolaBidAdapter.js +1 -1
  185. package/dist/tappxBidAdapter.js +1 -1
  186. package/dist/targetVideoBidAdapter.js +1 -1
  187. package/dist/targetVideoUtils.js +1 -0
  188. package/dist/teadsBidAdapter.js +1 -1
  189. package/dist/telariaBidAdapter.js +1 -1
  190. package/dist/teqblazeUtils.js +1 -1
  191. package/dist/terceptAnalyticsAdapter.js +1 -1
  192. package/dist/themoneytizerBidAdapter.js +1 -1
  193. package/dist/trionBidAdapter.js +1 -1
  194. package/dist/tripleliftBidAdapter.js +1 -1
  195. package/dist/ttdBidAdapter.js +1 -1
  196. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  197. package/dist/uid2IdSystem.js +1 -1
  198. package/dist/uid2IdSystem_shared.js +1 -1
  199. package/dist/underdogmediaBidAdapter.js +1 -1
  200. package/dist/undertoneBidAdapter.js +1 -1
  201. package/dist/unrulyBidAdapter.js +1 -1
  202. package/dist/userAgentUtils.js +1 -0
  203. package/dist/utiqIdSystem.js +1 -1
  204. package/dist/vidazooUtils.js +1 -1
  205. package/dist/videobyteBidAdapter.js +1 -1
  206. package/dist/visxBidAdapter.js +1 -1
  207. package/dist/vuukleBidAdapter.js +1 -1
  208. package/dist/widespaceBidAdapter.js +1 -1
  209. package/dist/winrBidAdapter.js +1 -1
  210. package/dist/yahooAdsBidAdapter.js +1 -1
  211. package/dist/yandexIdSystem.js +1 -1
  212. package/dist/yieldmoBidAdapter.js +1 -1
  213. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  214. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  215. package/libraries/adkernelUtils/adkernelUtils.js +11 -0
  216. package/libraries/currencyUtils/floor.js +23 -0
  217. package/libraries/dfpUtils/dfpUtils.js +7 -0
  218. package/libraries/fpdUtils/deviceInfo.js +58 -0
  219. package/libraries/fpdUtils/pageInfo.js +73 -0
  220. package/libraries/gptUtils/gptUtils.js +23 -1
  221. package/libraries/riseUtils/index.js +330 -0
  222. package/libraries/schainSerializer/schainSerializer.js +24 -0
  223. package/libraries/sizeUtils/tranformSize.js +43 -0
  224. package/libraries/targetVideoUtils/bidderUtils.js +178 -0
  225. package/libraries/targetVideoUtils/constants.js +23 -0
  226. package/libraries/teqblazeUtils/bidderUtils.js +15 -11
  227. package/libraries/userAgentUtils/index.js +58 -0
  228. package/libraries/userAgentUtils/userAgentTypes.enums.js +22 -0
  229. package/modules/.submodules.json +1 -0
  230. package/modules/33acrossAnalyticsAdapter.js +2 -0
  231. package/modules/adagioAnalyticsAdapter.js +101 -84
  232. package/modules/adagioAnalyticsAdapter.md +4 -0
  233. package/modules/adagioBidAdapter.js +5 -17
  234. package/modules/adagioRtdProvider.js +18 -4
  235. package/modules/adkernelAdnBidAdapter.js +1 -12
  236. package/modules/adkernelBidAdapter.js +4 -13
  237. package/modules/adlooxAnalyticsAdapter.js +1 -0
  238. package/modules/admixerBidAdapter.js +10 -6
  239. package/modules/admixerBidAdapter.md +7 -10
  240. package/modules/adtrgtmeBidAdapter.js +1 -1
  241. package/modules/advRedAnalyticsAdapter.js +198 -0
  242. package/modules/advRedAnalyticsAdapter.md +30 -0
  243. package/modules/aidemBidAdapter.js +2 -0
  244. package/modules/akamaiDapRtdProvider.js +19 -798
  245. package/modules/anonymisedRtdProvider.js +5 -1
  246. package/modules/anonymisedRtdProvider.md +1 -1
  247. package/modules/apacdexBidAdapter.js +1 -1
  248. package/modules/appnexusBidAdapter.js +56 -2
  249. package/modules/automatadAnalyticsAdapter.js +2 -0
  250. package/modules/azerionedgeRtdProvider.js +13 -3
  251. package/modules/azerionedgeRtdProvider.md +0 -17
  252. package/modules/bridBidAdapter.js +47 -47
  253. package/modules/cleanioRtdProvider.js +1 -0
  254. package/modules/concertBidAdapter.js +1 -1
  255. package/modules/connatixBidAdapter.js +36 -8
  256. package/modules/connectIdSystem.js +6 -2
  257. package/modules/contxtfulRtdProvider.js +20 -2
  258. package/modules/contxtfulRtdProvider.md +1 -0
  259. package/modules/craftBidAdapter.js +1 -1
  260. package/modules/criteoBidAdapter.js +1 -1
  261. package/modules/cwireBidAdapter.js +5 -1
  262. package/modules/dailymotionBidAdapter.js +85 -65
  263. package/modules/debugging/debugging.js +3 -0
  264. package/modules/dfpAdServerVideo.js +15 -33
  265. package/modules/dfpAdpod.js +2 -6
  266. package/modules/dgkeywordRtdProvider.js +2 -0
  267. package/modules/discoveryBidAdapter.js +26 -210
  268. package/modules/dspxBidAdapter.js +176 -54
  269. package/modules/eightPodAnalyticsAdapter.js +28 -34
  270. package/modules/eightPodBidAdapter.js +113 -57
  271. package/modules/fintezaAnalyticsAdapter.js +9 -4
  272. package/modules/goldbachBidAdapter.js +1 -1
  273. package/modules/gptPreAuction.js +63 -4
  274. package/modules/growthCodeAnalyticsAdapter.js +1 -1
  275. package/modules/growthCodeRtdProvider.js +1 -1
  276. package/modules/gumgumBidAdapter.js +14 -10
  277. package/modules/improvedigitalBidAdapter.js +1 -1
  278. package/modules/insticatorBidAdapter.js +35 -31
  279. package/modules/intentIqAnalyticsAdapter.js +234 -0
  280. package/modules/intentIqAnalyticsAdapter.md +27 -0
  281. package/modules/intentIqIdSystem.md +0 -0
  282. package/modules/jwplayerBidAdapter.js +1 -1
  283. package/modules/jwplayerRtdProvider.js +26 -6
  284. package/modules/jwplayerVideoProvider.js +6 -0
  285. package/modules/kargoBidAdapter.js +11 -14
  286. package/modules/kimberliteBidAdapter.js +24 -7
  287. package/modules/kimberliteBidAdapter.md +30 -1
  288. package/modules/mediafuseBidAdapter.js +1 -1
  289. package/modules/mediagoBidAdapter.js +7 -176
  290. package/modules/medianetBidAdapter.js +101 -40
  291. package/modules/mgidBidAdapter.js +3 -1
  292. package/modules/minutemediaBidAdapter.js +21 -398
  293. package/modules/mobianRtdProvider.js +16 -2
  294. package/modules/nextMillenniumBidAdapter.js +1 -27
  295. package/modules/nexx360BidAdapter.js +3 -2
  296. package/modules/nobidBidAdapter.js +1 -1
  297. package/modules/openwebBidAdapter.js +18 -396
  298. package/modules/optoutBidAdapter.js +1 -1
  299. package/modules/paapi.js +48 -35
  300. package/modules/permutiveRtdProvider.js +72 -22
  301. package/modules/playdigoBidAdapter.js +4 -2
  302. package/modules/prebidServerBidAdapter/index.js +4 -2
  303. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -0
  304. package/modules/programmaticaBidAdapter.js +1 -1
  305. package/modules/publirBidAdapter.js +20 -273
  306. package/modules/pubmaticBidAdapter.js +12 -0
  307. package/modules/pubxaiAnalyticsAdapter.js +306 -164
  308. package/modules/relevatehealthBidAdapter.js +2 -1
  309. package/modules/resetdigitalBidAdapter.md +54 -45
  310. package/modules/richaudienceBidAdapter.js +1 -1
  311. package/modules/riseBidAdapter.js +19 -400
  312. package/modules/rtdModule/index.js +5 -3
  313. package/modules/shinezBidAdapter.js +17 -361
  314. package/modules/sirdataRtdProvider.js +2 -0
  315. package/modules/sizeMapping.js +2 -5
  316. package/modules/smaatoBidAdapter.js +18 -1
  317. package/modules/smarthubBidAdapter.js +45 -177
  318. package/modules/smilewantedBidAdapter.js +26 -22
  319. package/modules/snigelBidAdapter.js +1 -1
  320. package/modules/sonobiBidAdapter.js +5 -10
  321. package/modules/stnBidAdapter.js +22 -398
  322. package/modules/symitriDapRtdProvider.js +812 -0
  323. package/modules/symitriDapRtdProvider.md +49 -0
  324. package/modules/targetVideoBidAdapter.js +120 -152
  325. package/modules/targetVideoBidAdapter.md +20 -3
  326. package/modules/telariaBidAdapter.js +2 -32
  327. package/modules/uid2IdSystem_shared.js +51 -39
  328. package/modules/userId/eids.js +3 -0
  329. package/modules/utiqIdSystem.js +12 -10
  330. package/modules/validationFpdModule/index.js +22 -17
  331. package/modules/videojsVideoProvider.js +3 -0
  332. package/modules/visxBidAdapter.js +1 -1
  333. package/modules/winrBidAdapter.js +2 -27
  334. package/modules/yahooAdsBidAdapter.js +1 -1
  335. package/modules/yandexIdSystem.js +1 -1
  336. package/package.json +4 -4
  337. package/plugins/eslint/index.js +73 -45
  338. package/src/adloader.js +1 -0
  339. package/src/ajax.js +15 -0
  340. package/src/config.js +0 -4
  341. package/src/debugging.js +1 -0
  342. package/src/prebid.js +4 -0
  343. package/src/secureCreatives.js +1 -1
  344. package/src/storageManager.js +62 -73
  345. package/src/targeting.js +26 -20
  346. package/src/utils.js +9 -0
  347. package/test/pages/consent_mgt_gdpr.html +1 -1
  348. package/test/spec/ajax_spec.js +11 -0
  349. package/test/spec/creative/crossDomainCreative_spec.js +26 -9
  350. package/test/spec/fpd/gdpr_spec.js +1 -1
  351. package/test/spec/libraries/userAgentUtils_spec.js +109 -0
  352. package/test/spec/modules/adagioAnalyticsAdapter_spec.js +231 -141
  353. package/test/spec/modules/adagioBidAdapter_spec.js +32 -66
  354. package/test/spec/modules/adagioRtdProvider_spec.js +72 -0
  355. package/test/spec/modules/admixerBidAdapter_spec.js +21 -17
  356. package/test/spec/modules/advRedAnalyticsAdapter_spec.js +114 -0
  357. package/test/spec/modules/adxcgBidAdapter_spec.js +1 -1
  358. package/test/spec/modules/appnexusBidAdapter_spec.js +36 -0
  359. package/test/spec/modules/azerionedgeRtdProvider_spec.js +36 -21
  360. package/test/spec/modules/connatixBidAdapter_spec.js +55 -2
  361. package/test/spec/modules/connectIdSystem_spec.js +27 -28
  362. package/test/spec/modules/consentManagement_spec.js +1 -1
  363. package/test/spec/modules/contxtfulRtdProvider_spec.js +6 -0
  364. package/test/spec/modules/dailymotionBidAdapter_spec.js +497 -4
  365. package/test/spec/modules/discoveryBidAdapter_spec.js +9 -6
  366. package/test/spec/modules/dspxBidAdapter_spec.js +188 -7
  367. package/test/spec/modules/eightPodAnalyticsAdapter_spec.js +22 -13
  368. package/test/spec/modules/gptPreAuction_spec.js +143 -1
  369. package/test/spec/modules/gumgumBidAdapter_spec.js +17 -0
  370. package/test/spec/modules/insticatorBidAdapter_spec.js +8 -1
  371. package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +172 -0
  372. package/test/spec/modules/jwplayerRtdProvider_spec.js +61 -0
  373. package/test/spec/modules/kargoBidAdapter_spec.js +7 -8
  374. package/test/spec/modules/kimberliteBidAdapter_spec.js +137 -65
  375. package/test/spec/modules/mediagoBidAdapter_spec.js +34 -37
  376. package/test/spec/modules/medianetBidAdapter_spec.js +297 -16
  377. package/test/spec/modules/mgidBidAdapter_spec.js +15 -5
  378. package/test/spec/modules/mobianRtdProvider_spec.js +1 -3
  379. package/test/spec/modules/nexx360BidAdapter_spec.js +1 -1
  380. package/test/spec/modules/paapi_spec.js +177 -111
  381. package/test/spec/modules/permutiveRtdProvider_spec.js +42 -8
  382. package/test/spec/modules/prebidServerBidAdapter_spec.js +17 -3
  383. package/test/spec/modules/proxistoreBidAdapter_spec.js +1 -1
  384. package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
  385. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +970 -603
  386. package/test/spec/modules/pulsepointBidAdapter_spec.js +4 -4
  387. package/test/spec/modules/smaatoBidAdapter_spec.js +36 -1
  388. package/test/spec/modules/smarthubBidAdapter_spec.js +6 -4
  389. package/test/spec/modules/smilewantedBidAdapter_spec.js +57 -1
  390. package/test/spec/modules/symitriDapRtdProvider_spec.js +600 -0
  391. package/test/spec/modules/targetVideoBidAdapter_spec.js +112 -11
  392. package/test/spec/modules/yandexIdSystem_spec.js +6 -1
  393. package/test/spec/schainSerializer/schainSerializer_spec.js +138 -0
  394. package/test/spec/unit/core/storageManager_spec.js +68 -51
  395. package/test/spec/unit/pbjs_api_spec.js +11 -0
  396. package/test/spec/utils_spec.js +19 -0
  397. /package/src/utils/{gpdr.js → gdpr.js} +0 -0
@@ -1,204 +1,346 @@
1
- import { deepAccess, parseSizesInput, getWindowLocation, buildUrl } from '../src/utils.js';
2
- import { ajax } from '../src/ajax.js';
3
1
  import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
2
+ import {
3
+ getGptSlotInfoForAdUnitCode, getGptSlotForAdUnitCode
4
+ } from '../libraries/gptUtils/gptUtils.js';
5
+ import { getDeviceType, getBrowser, getOS } from '../libraries/userAgentUtils/index.js';
6
+ import { MODULE_TYPE_ANALYTICS } from '../src/activities/modules.js';
4
7
  import adapterManager from '../src/adapterManager.js';
8
+ import { sendBeacon } from '../src/ajax.js'
5
9
  import { EVENTS } from '../src/constants.js';
6
- import {getGlobal} from '../src/prebidGlobal.js';
7
- import {getGptSlotInfoForAdUnitCode} from '../libraries/gptUtils/gptUtils.js';
10
+ import { getGlobal } from '../src/prebidGlobal.js';
11
+ import { getStorageManager } from '../src/storageManager.js';
12
+ import {
13
+ deepAccess, parseSizesInput, getWindowLocation, buildUrl, cyrb53Hash
14
+ } from '../src/utils.js';
15
+
16
+ let initOptions;
8
17
 
9
18
  const emptyUrl = '';
10
19
  const analyticsType = 'endpoint';
11
- const pubxaiAnalyticsVersion = 'v1.2.0';
20
+ const adapterCode = 'pubxai';
21
+ const pubxaiAnalyticsVersion = 'v2.0.0';
12
22
  const defaultHost = 'api.pbxai.com';
13
23
  const auctionPath = '/analytics/auction';
14
24
  const winningBidPath = '/analytics/bidwon';
25
+ const storage = getStorageManager({ moduleType: MODULE_TYPE_ANALYTICS, moduleName: adapterCode })
15
26
 
16
- let initOptions;
17
- let auctionTimestamp;
18
- let auctionCache = [];
19
- let events = {
20
- bids: [],
21
- floorDetail: {},
22
- pageDetail: {},
23
- deviceDetail: {}
24
- };
25
-
26
- function getStorage() {
27
- return null;
28
- }
29
-
30
- var pubxaiAnalyticsAdapter = Object.assign(adapter(
27
+ /**
28
+ * The sendCache is a global cache object which tracks the pending sends
29
+ * back to pubx.ai. The data may be removed from this cache, post send.
30
+ */
31
+ export const sendCache = new Proxy(
32
+ {},
31
33
  {
32
- emptyUrl,
33
- analyticsType
34
- }), {
35
- track({ eventType, args }) {
36
- if (typeof args !== 'undefined') {
37
- if (eventType === EVENTS.BID_TIMEOUT) {
38
- args.forEach(item => { mapBidResponse(item, 'timeout'); });
39
- } else if (eventType === EVENTS.AUCTION_INIT) {
40
- events.auctionInit = args;
41
- events.floorDetail = {};
42
- events.bids = [];
43
- const floorData = deepAccess(args, 'bidderRequests.0.bids.0.floorData');
44
- if (typeof floorData !== 'undefined') {
45
- Object.assign(events.floorDetail, floorData);
46
- }
47
- auctionTimestamp = args.timestamp;
48
- } else if (eventType === EVENTS.BID_RESPONSE) {
49
- mapBidResponse(args, 'response');
50
- } else if (eventType === EVENTS.BID_WON) {
51
- send({
52
- winningBid: mapBidResponse(args, 'bidwon')
53
- }, 'bidwon');
34
+ get: (target, name) => {
35
+ if (!target.hasOwnProperty(name)) {
36
+ target[name] = [];
54
37
  }
55
- }
56
- if (eventType === EVENTS.AUCTION_END) {
57
- send(events, 'auctionEnd');
58
- }
38
+ return target[name];
39
+ },
59
40
  }
60
- });
41
+ );
61
42
 
62
- function mapBidResponse(bidResponse, status) {
63
- if (typeof bidResponse !== 'undefined') {
64
- let bid = {
65
- adUnitCode: bidResponse.adUnitCode,
66
- gptSlotCode: getGptSlotInfoForAdUnitCode(bidResponse.adUnitCode).gptSlot || null,
67
- auctionId: bidResponse.auctionId,
68
- bidderCode: bidResponse.bidder,
69
- cpm: bidResponse.cpm,
70
- creativeId: bidResponse.creativeId,
71
- currency: bidResponse.currency,
72
- floorData: bidResponse.floorData,
73
- mediaType: bidResponse.mediaType,
74
- netRevenue: bidResponse.netRevenue,
75
- requestTimestamp: bidResponse.requestTimestamp,
76
- responseTimestamp: bidResponse.responseTimestamp,
77
- status: bidResponse.status,
78
- statusMessage: bidResponse.statusMessage,
79
- timeToRespond: bidResponse.timeToRespond,
80
- transactionId: bidResponse.transactionId
81
- };
82
- if (status !== 'bidwon') {
83
- Object.assign(bid, {
84
- bidId: status === 'timeout' ? bidResponse.bidId : bidResponse.requestId,
85
- renderStatus: status === 'timeout' ? 3 : 2,
86
- sizes: parseSizesInput(bidResponse.size).toString(),
87
- });
88
- events.bids.push(bid);
89
- } else {
90
- Object.assign(bid, {
91
- bidId: bidResponse.requestId,
92
- floorProvider: events.floorDetail?.floorProvider || null,
93
- floorFetchStatus: events.floorDetail?.fetchStatus || null,
94
- floorLocation: events.floorDetail?.location || null,
95
- floorModelVersion: events.floorDetail?.modelVersion || null,
96
- floorSkipRate: events.floorDetail?.skipRate || 0,
97
- isFloorSkipped: events.floorDetail?.skipped || false,
98
- isWinningBid: true,
99
- placementId: bidResponse.params ? deepAccess(bidResponse, 'params.0.placementId') : null,
100
- renderedSize: bidResponse.size,
101
- renderStatus: 4
102
- });
103
- return bid;
104
- }
43
+ /**
44
+ * auctionCache is a global cache object which stores all auction histories
45
+ * for the session. When getting a key from the auction cache, any
46
+ * information already known about the auction or associated data (floor
47
+ * data configured by prebid, browser data, user data etc) is added to
48
+ * the cache automatically.
49
+ */
50
+ export const auctionCache = new Proxy(
51
+ {},
52
+ {
53
+ get: (target, name) => {
54
+ if (!target.hasOwnProperty(name)) {
55
+ target[name] = {
56
+ bids: [],
57
+ auctionDetail: {
58
+ refreshRank: Object.keys(target).length,
59
+ auctionId: name,
60
+ },
61
+ floorDetail: {},
62
+ pageDetail: {
63
+ host: getWindowLocation().host,
64
+ path: getWindowLocation().pathname,
65
+ search: getWindowLocation().search,
66
+ },
67
+ deviceDetail: {
68
+ platform: navigator.platform,
69
+ deviceType: getDeviceType(),
70
+ deviceOS: getOS(),
71
+ browser: getBrowser(),
72
+ },
73
+ userDetail: {
74
+ userIdTypes: Object.keys(getGlobal().getUserIds?.() || {}),
75
+ },
76
+ consentDetail: {
77
+ consentTypes: Object.keys(getGlobal().getConsentMetadata?.() || {}),
78
+ },
79
+ pmacDetail: JSON.parse(storage.getDataFromLocalStorage('pubx:pmac')) || {}, // {auction_1: {floor:0.23,maxBid:0.34,bidCount:3},auction_2:{floor:0.13,maxBid:0.14,bidCount:2}
80
+ initOptions: {
81
+ ...initOptions,
82
+ auctionId: name, // back-compat
83
+ },
84
+ sendAs: [],
85
+ };
86
+ }
87
+ return target[name];
88
+ },
105
89
  }
106
- }
90
+ );
107
91
 
108
- export function getDeviceType() {
109
- if ((/ipad|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase()))) {
110
- return 'tablet';
92
+ /**
93
+ * Fetch extra ad server data for a specific ad slot (bid)
94
+ * @param {object} bid an output from extractBid
95
+ * @returns {object} key value pairs from the adserver
96
+ */
97
+ const getAdServerDataForBid = (bid) => {
98
+ const gptSlot = getGptSlotForAdUnitCode(bid);
99
+ if (gptSlot) {
100
+ return Object.fromEntries(
101
+ gptSlot
102
+ .getTargetingKeys()
103
+ .filter(
104
+ (key) =>
105
+ key.startsWith('pubx-') ||
106
+ (key.startsWith('hb_') && (key.match(/_/g) || []).length === 1)
107
+ )
108
+ .map((key) => [key, gptSlot.getTargeting(key)])
109
+ );
111
110
  }
112
- if ((/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(navigator.userAgent.toLowerCase()))) {
113
- return 'mobile';
114
- }
115
- return 'desktop';
116
- }
111
+ return {}; // TODO: support more ad servers
112
+ };
117
113
 
118
- export function getBrowser() {
119
- if (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor)) return 'Chrome';
120
- else if (navigator.userAgent.match('CriOS')) return 'Chrome';
121
- else if (/Firefox/.test(navigator.userAgent)) return 'Firefox';
122
- else if (/Edg/.test(navigator.userAgent)) return 'Microsoft Edge';
123
- else if (/Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor)) return 'Safari';
124
- else if (/Trident/.test(navigator.userAgent) || /MSIE/.test(navigator.userAgent)) return 'Internet Explorer';
125
- else return 'Others';
126
- }
114
+ /**
115
+ * extracts and derives valuable data from a prebid bidder bidResponse object
116
+ * @param {object} bidResponse a prebid bidder bidResponse (see
117
+ * https://docs.prebid.org/dev-docs/publisher-api-reference/getBidResponses.html)
118
+ * @returns {object}
119
+ */
120
+ const extractBid = (bidResponse) => {
121
+ return {
122
+ adUnitCode: bidResponse.adUnitCode,
123
+ gptSlotCode:
124
+ getGptSlotInfoForAdUnitCode(bidResponse.adUnitCode).gptSlot || null,
125
+ auctionId: bidResponse.auctionId,
126
+ bidderCode: bidResponse.bidder,
127
+ cpm: bidResponse.cpm,
128
+ creativeId: bidResponse.creativeId,
129
+ dealId: bidResponse.dealId,
130
+ currency: bidResponse.currency,
131
+ floorData: bidResponse.floorData,
132
+ mediaType: bidResponse.mediaType,
133
+ netRevenue: bidResponse.netRevenue,
134
+ requestTimestamp: bidResponse.requestTimestamp,
135
+ responseTimestamp: bidResponse.responseTimestamp,
136
+ status: bidResponse.status,
137
+ sizes: parseSizesInput(bidResponse.size).toString(),
138
+ statusMessage: bidResponse.statusMessage,
139
+ timeToRespond: bidResponse.timeToRespond,
140
+ transactionId: bidResponse.transactionId,
141
+ bidId: bidResponse.bidId || bidResponse.requestId,
142
+ placementId: bidResponse.params
143
+ ? deepAccess(bidResponse, 'params.0.placementId')
144
+ : null,
145
+ source: bidResponse.source || 'null',
146
+ };
147
+ };
127
148
 
128
- export function getOS() {
129
- if (navigator.userAgent.indexOf('Android') != -1) return 'Android';
130
- if (navigator.userAgent.indexOf('like Mac') != -1) return 'iOS';
131
- if (navigator.userAgent.indexOf('Win') != -1) return 'Windows';
132
- if (navigator.userAgent.indexOf('Mac') != -1) return 'Macintosh';
133
- if (navigator.userAgent.indexOf('Linux') != -1) return 'Linux';
134
- if (navigator.appVersion.indexOf('X11') != -1) return 'Unix';
135
- return 'Others';
136
- }
149
+ /**
150
+ * Track the events emitted by prebid and handle each case. See https://docs.prebid.org/dev-docs/publisher-api-reference/getEvents.html for more info
151
+ * @param {object} event the prebid event emmitted
152
+ * @param {string} event.eventType the type of the event
153
+ * @param {object} event.args the arguments of the emitted event
154
+ */
155
+ const track = ({ eventType, args }) => {
156
+ switch (eventType) {
157
+ // handle invalid bids, and remove them from the adUnit cache
158
+ case EVENTS.BID_TIMEOUT:
159
+ args.map(extractBid).forEach((bid) => {
160
+ bid.renderStatus = 3;
161
+ auctionCache[bid.auctionId].bids.push(bid);
162
+ });
163
+ break;
164
+ // handle valid bid responses and record them as part of an auction
165
+ case EVENTS.BID_RESPONSE:
166
+ const bid = Object.assign(extractBid(args), { renderStatus: 2 });
167
+ auctionCache[bid.auctionId].bids.push(bid);
168
+ break;
169
+ // capture extra information from the auction, and if there were no bids
170
+ // (and so no chance of a win) send the auction
171
+ case EVENTS.AUCTION_END:
172
+ Object.assign(
173
+ auctionCache[args.auctionId].floorDetail,
174
+ args.adUnits
175
+ .map((i) => i?.bids.length && i.bids[0]?.floorData)
176
+ .find((i) => i) || {}
177
+ );
178
+ auctionCache[args.auctionId].deviceDetail.cdep = args.bidderRequests
179
+ .map((bidRequest) => bidRequest.ortb2?.device?.ext?.cdep)
180
+ .find((i) => i);
181
+ Object.assign(auctionCache[args.auctionId].auctionDetail, {
182
+ adUnitCodes: args.adUnits.map((i) => i.code),
183
+ timestamp: args.timestamp,
184
+ });
185
+ if (
186
+ auctionCache[args.auctionId].bids.every((bid) => bid.renderStatus === 3)
187
+ ) {
188
+ prepareSend(args.auctionId);
189
+ }
190
+ break;
191
+ // send the prebid winning bid back to pubx
192
+ case EVENTS.BID_WON:
193
+ const winningBid = extractBid(args);
194
+ const floorDetail = auctionCache[winningBid.auctionId].floorDetail;
195
+ Object.assign(winningBid, {
196
+ floorProvider: floorDetail?.floorProvider || null,
197
+ floorFetchStatus: floorDetail?.fetchStatus || null,
198
+ floorLocation: floorDetail?.location || null,
199
+ floorModelVersion: floorDetail?.modelVersion || null,
200
+ floorSkipRate: floorDetail?.skipRate || 0,
201
+ isFloorSkipped: floorDetail?.skipped || false,
202
+ isWinningBid: true,
203
+ renderedSize: args.size,
204
+ renderStatus: 4,
205
+ });
206
+ winningBid.adServerData = getAdServerDataForBid(winningBid);
207
+ auctionCache[winningBid.auctionId].winningBid = winningBid;
208
+ prepareSend(winningBid.auctionId);
209
+ break;
210
+ // do nothing
211
+ default:
212
+ break;
213
+ }
214
+ };
137
215
 
138
- // add sampling rate
139
- pubxaiAnalyticsAdapter.shouldFireEventRequest = function (samplingRate = 1) {
140
- return (Math.floor((Math.random() * samplingRate + 1)) === parseInt(samplingRate));
216
+ /**
217
+ * If true, send data back to pubxai
218
+ * @param {string} auctionId
219
+ * @param {number} samplingRate
220
+ * @returns {boolean}
221
+ */
222
+ const shouldFireEventRequest = (auctionId, samplingRate = 1) => {
223
+ return parseInt(cyrb53Hash(auctionId)) % samplingRate === 0;
141
224
  };
142
225
 
143
- function send(data, status) {
144
- if (pubxaiAnalyticsAdapter.shouldFireEventRequest(initOptions.samplingRate)) {
145
- let location = getWindowLocation();
146
- const storage = getStorage();
147
- data.initOptions = initOptions;
148
- data.pageDetail = {};
149
- Object.assign(data.pageDetail, {
150
- host: location.host,
151
- path: location.pathname,
152
- search: location.search
153
- });
154
- if (typeof data !== 'undefined' && typeof data.auctionInit !== 'undefined') {
155
- data.pageDetail.adUnits = data.auctionInit.adUnitCodes;
156
- data.initOptions.auctionId = data.auctionInit.auctionId;
157
- delete data.auctionInit;
158
-
159
- data.pmcDetail = {};
160
- Object.assign(data.pmcDetail, {
161
- bidDensity: storage ? storage.getItem('pbx:dpbid') : null,
162
- maxBid: storage ? storage.getItem('pbx:mxbid') : null,
163
- auctionId: storage ? storage.getItem('pbx:aucid') : null,
164
- });
226
+ /**
227
+ * prepare the payload for sending auction data back to pubx.ai
228
+ * @param {string} auctionId the auction to send
229
+ */
230
+ const prepareSend = (auctionId) => {
231
+ const auctionData = Object.assign({}, auctionCache[auctionId]);
232
+ if (!shouldFireEventRequest(auctionId, initOptions.samplingRate)) {
233
+ return;
234
+ }
235
+ [
236
+ {
237
+ path: winningBidPath,
238
+ requiredKeys: [
239
+ 'winningBid',
240
+ 'pageDetail',
241
+ 'deviceDetail',
242
+ 'floorDetail',
243
+ 'auctionDetail',
244
+ 'userDetail',
245
+ 'consentDetail',
246
+ 'pmacDetail',
247
+ 'initOptions',
248
+ ],
249
+ eventType: 'win',
250
+ },
251
+ {
252
+ path: auctionPath,
253
+ requiredKeys: [
254
+ 'bids',
255
+ 'pageDetail',
256
+ 'deviceDetail',
257
+ 'floorDetail',
258
+ 'auctionDetail',
259
+ 'userDetail',
260
+ 'consentDetail',
261
+ 'pmacDetail',
262
+ 'initOptions',
263
+ ],
264
+ eventType: 'auction',
265
+ },
266
+ ].forEach(({ path, requiredKeys, eventType }) => {
267
+ const data = Object.fromEntries(
268
+ requiredKeys.map((key) => [key, auctionData[key]])
269
+ );
270
+ if (
271
+ auctionCache[auctionId].sendAs.includes(eventType) ||
272
+ !requiredKeys.every((key) => !!auctionData[key])
273
+ ) {
274
+ return;
165
275
  }
166
- data.deviceDetail = {};
167
- Object.assign(data.deviceDetail, {
168
- platform: navigator.platform,
169
- deviceType: getDeviceType(),
170
- deviceOS: getOS(),
171
- browser: getBrowser()
172
- });
173
-
174
- let pubxaiAnalyticsRequestUrl = buildUrl({
276
+ const pubxaiAnalyticsRequestUrl = buildUrl({
175
277
  protocol: 'https',
176
- hostname: (initOptions && initOptions.hostName) || defaultHost,
177
- pathname: status == 'bidwon' ? winningBidPath : auctionPath,
278
+ hostname:
279
+ (auctionData.initOptions && auctionData.initOptions.hostName) ||
280
+ defaultHost,
281
+ pathname: path,
178
282
  search: {
179
- auctionTimestamp: auctionTimestamp,
283
+ auctionTimestamp: auctionData.auctionDetail.timestamp,
180
284
  pubxaiAnalyticsVersion: pubxaiAnalyticsVersion,
181
- prebidVersion: getGlobal().version
285
+ prebidVersion: '$prebid.version$',
286
+ },
287
+ });
288
+ sendCache[pubxaiAnalyticsRequestUrl].push(data);
289
+ auctionCache[auctionId].sendAs.push(eventType);
290
+ });
291
+ };
292
+
293
+ const send = () => {
294
+ const toBlob = (d) => new Blob([JSON.stringify(d)], { type: 'text/json' });
295
+
296
+ Object.entries(sendCache).forEach(([requestUrl, events]) => {
297
+ let payloadStart = 0;
298
+
299
+ events.forEach((event, index, arr) => {
300
+ const payload = arr.slice(payloadStart, index + 2);
301
+ const payloadTooLarge = toBlob(payload).size > 65536;
302
+
303
+ if (payloadTooLarge || index + 1 === arr.length) {
304
+ sendBeacon(
305
+ requestUrl,
306
+ toBlob(payloadTooLarge ? payload.slice(0, -1) : payload)
307
+ );
308
+ payloadStart = index;
182
309
  }
183
310
  });
184
- if (status == 'bidwon') {
185
- ajax(pubxaiAnalyticsRequestUrl, undefined, JSON.stringify(data), { method: 'POST', contentType: 'text/json' });
186
- } else if (status == 'auctionEnd' && auctionCache.indexOf(data.initOptions.auctionId) === -1) {
187
- ajax(pubxaiAnalyticsRequestUrl, undefined, JSON.stringify(data), { method: 'POST', contentType: 'text/json' });
188
- auctionCache.push(data.initOptions.auctionId);
311
+
312
+ events.splice(0);
313
+ });
314
+ };
315
+
316
+ // register event listener to send logs when user leaves page
317
+ if (document.visibilityState) {
318
+ document.addEventListener('visibilitychange', () => {
319
+ if (document.visibilityState === 'hidden') {
320
+ send();
189
321
  }
190
- }
322
+ });
191
323
  }
192
324
 
193
- pubxaiAnalyticsAdapter.originEnableAnalytics = pubxaiAnalyticsAdapter.enableAnalytics;
194
- pubxaiAnalyticsAdapter.enableAnalytics = function (config) {
325
+ // declare the analytics adapter
326
+ var pubxaiAnalyticsAdapter = Object.assign(
327
+ adapter({
328
+ emptyUrl,
329
+ analyticsType,
330
+ }),
331
+ { track }
332
+ );
333
+
334
+ pubxaiAnalyticsAdapter.originEnableAnalytics =
335
+ pubxaiAnalyticsAdapter.enableAnalytics;
336
+ pubxaiAnalyticsAdapter.enableAnalytics = (config) => {
195
337
  initOptions = config.options;
196
338
  pubxaiAnalyticsAdapter.originEnableAnalytics(config);
197
339
  };
198
340
 
199
341
  adapterManager.registerAnalyticsAdapter({
200
342
  adapter: pubxaiAnalyticsAdapter,
201
- code: 'pubxai'
343
+ code: adapterCode,
202
344
  });
203
345
 
204
346
  export default pubxaiAnalyticsAdapter;
@@ -142,7 +142,8 @@ function buildUser(bid) {
142
142
  if (bid && bid.params) {
143
143
  return {
144
144
  id: bid.params.user_id && typeof bid.params.user_id == 'string' ? bid.params.user_id : '',
145
- buyeruid: localStorage.getItem('adx_profile_guid') ? localStorage.getItem('adx_profile_guid') : '',
145
+ // TODO: commented out because of rule violations
146
+ buyeruid: '', // localStorage.getItem('adx_profile_guid') ? localStorage.getItem('adx_profile_guid') : '',
146
147
  keywords: bid.params.keywords && typeof bid.params.keywords == 'string' ? bid.params.keywords : '',
147
148
  customdata: bid.params.customdata && typeof bid.params.customdata == 'string' ? bid.params.customdata : ''
148
149
  };
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  Module Name: ResetDigital Bidder Adapter
5
5
  Module Type: Bidder Adapter
6
- Maintainer: bruce@resetdigital.co
6
+ Maintainer: BidderSupport@resetdigital.co
7
7
  ```
8
8
 
9
9
  # Description
@@ -15,49 +15,58 @@ Video is supported but requires a publisher supplied renderer at this time.
15
15
 
16
16
  ## Web
17
17
  ```
18
- var adUnits = [
19
- {
20
- code: 'your-div',
21
- mediaTypes: {
22
- banner: {
23
- sizes: [[300,250]]
24
- },
25
-
26
- },
27
- bids: [
28
- {
29
- bidder: "resetdigital",
30
- params: {
31
- pubId: "your-pub-id",
32
- site_id: "your-site-id",
33
- forceBid: true,
34
- }
35
- }
36
- ]
37
- }
38
- ];
39
-
40
-
41
- var videoAdUnits = [
42
- {
43
- code: 'your-div',
44
- mediaTypes: {
45
- video: {
46
- playerSize: [640, 480]
47
- },
48
-
49
- },
50
- bids: [
51
- {
52
- bidder: "resetdigital",
53
- params: {
54
- pubId: "your-pub-id",
55
- site_id: "your-site-id",
56
- forceBid: true,
57
- }
58
- }
59
- ]
60
- }
61
- ];
18
+ // Define the ad units for banner ads
19
+ var adUnits = [
20
+ {
21
+ code: 'your-div', // Replace with the actual ad unit code
22
+ mediaTypes: {
23
+ banner: {
24
+ sizes: [[300, 250]] // Define the sizes for banner ads
25
+ }
26
+ },
27
+ bids: [
28
+ {
29
+ bidder: "resetdigital",
30
+ params: {
31
+ pubId: "your-pub-id", // (required) Replace with your publisher ID
32
+ site_id: "your-site-id", // Replace with your site ID
33
+ endpoint: 'https://ads.resetsrv.com', // (optional) Endpoint URL for the ad server
34
+ forceBid: true, // Optional parameter to force the bid
35
+ zoneId: { // (optional) Zone ID parameters
36
+ placementId: "<id>", // Optional ID used for reports
37
+ deals: "<deal ids>", // Optional string of deal IDs, comma-separated
38
+ test: 1 // Set to 1 to force the bidder to respond with a creative
39
+ }
40
+ }
41
+ }
42
+ ]
43
+ }
44
+ ];
62
45
 
46
+ // Define the ad units for video ads
47
+ var videoAdUnits = [
48
+ {
49
+ code: 'your-div', // Replace with the actual video ad unit code
50
+ mediaTypes: {
51
+ video: {
52
+ playerSize: [640, 480] // Define the player size for video ads
53
+ }
54
+ },
55
+ bids: [
56
+ {
57
+ bidder: "resetdigital",
58
+ params: {
59
+ pubId: "your-pub-id", // (required) Replace with your publisher ID
60
+ site_id: "your-site-id", // Replace with your site ID
61
+ forceBid: true, // Optional parameter to force the bid
62
+ zoneId: { // (optional) Zone ID parameters
63
+ placementId: "<id>", // Optional ID used for reports
64
+ deals: "<deal ids>", // Optional string of deal IDs, comma-separated
65
+ test: 1 // Set to 1 to force the bidder to respond with a creative
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ }
71
+ ];
63
72
  ```
@@ -151,7 +151,7 @@ export const spec = {
151
151
  *
152
152
  * @param {syncOptions} Publisher prebid configuration
153
153
  * @param {serverResponses} Response from the server
154
- * @param {gdprConsent} GPDR consent object
154
+ * @param {gdprConsent} GDPR consent object
155
155
  * @returns {Array}
156
156
  */
157
157
  getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent, gppConsent) {