prebid.js 9.46.0 → 9.48.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 (325) hide show
  1. package/.github/codeql/queries/jsonRequestContentType.ql +18 -0
  2. package/AGENTS.md +42 -0
  3. package/CLAUDE.md +1 -0
  4. package/babelConfig.js +1 -1
  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/adagioUtils.js +1 -1
  12. package/dist/addefendBidAdapter.js +1 -1
  13. package/dist/adgenerationBidAdapter.js +1 -1
  14. package/dist/adlooxRtdProvider.js +1 -1
  15. package/dist/adqueryBidAdapter.js +1 -1
  16. package/dist/adrelevantisBidAdapter.js +1 -1
  17. package/dist/adstirBidAdapter.js +1 -1
  18. package/dist/adtrgtmeBidAdapter.js +1 -1
  19. package/dist/advangUtils.js +1 -1
  20. package/dist/adverxoBidAdapter.js +1 -1
  21. package/dist/adxcgAnalyticsAdapter.js +1 -1
  22. package/dist/adxcgBidAdapter.js +1 -1
  23. package/dist/adyoulikeBidAdapter.js +1 -1
  24. package/dist/agmaAnalyticsAdapter.js +1 -1
  25. package/dist/ajaBidAdapter.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/beopBidAdapter.js +1 -1
  34. package/dist/bidglassBidAdapter.js +1 -1
  35. package/dist/big-richmediaBidAdapter.js +1 -1
  36. package/dist/bitmediaBidAdapter.js +1 -1
  37. package/dist/blueBidAdapter.js +1 -1
  38. package/dist/blueUtils.js +1 -0
  39. package/dist/bmsBidAdapter.js +1 -1
  40. package/dist/bridBidAdapter.js +1 -1
  41. package/dist/bridgeuppBidAdapter.js +1 -1
  42. package/dist/bridgewellBidAdapter.js +1 -1
  43. package/dist/brightMountainMediaBidAdapter.js +1 -1
  44. package/dist/browsiUtils.js +1 -1
  45. package/dist/carodaBidAdapter.js +1 -1
  46. package/dist/chtnwBidAdapter.js +1 -1
  47. package/dist/chunk-core.js +1 -1
  48. package/dist/concertBidAdapter.js +1 -1
  49. package/dist/connectadBidAdapter.js +1 -1
  50. package/dist/consumableBidAdapter.js +1 -1
  51. package/dist/contxtfulBidAdapter.js +1 -1
  52. package/dist/conversantAnalyticsAdapter.js +1 -1
  53. package/dist/conversantBidAdapter.js +1 -1
  54. package/dist/craftBidAdapter.js +1 -1
  55. package/dist/criteoBidAdapter.js +1 -1
  56. package/dist/cwireBidAdapter.js +1 -1
  57. package/dist/czechAdIdSystem.js +1 -1
  58. package/dist/dailymotionBidAdapter.js +1 -1
  59. package/dist/debugging-standalone.js +1 -1
  60. package/dist/dependencies.json +16 -2
  61. package/dist/dspxBidAdapter.js +1 -1
  62. package/dist/dxkultureBidAdapter.js +1 -1
  63. package/dist/dynamicAdBoostRtdProvider.js +1 -1
  64. package/dist/eplanningBidAdapter.js +1 -1
  65. package/dist/eskimiBidAdapter.js +1 -1
  66. package/dist/euidIdSystem.js +1 -1
  67. package/dist/exadsBidAdapter.js +1 -1
  68. package/dist/excoBidAdapter.js +1 -1
  69. package/dist/feedadBidAdapter.js +1 -1
  70. package/dist/finativeBidAdapter.js +1 -1
  71. package/dist/freewheel-sspBidAdapter.js +1 -1
  72. package/dist/gmosspBidAdapter.js +1 -1
  73. package/dist/gptUtils.js +1 -1
  74. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  75. package/dist/greenbidsBidAdapter.js +1 -1
  76. package/dist/greenbidsRtdProvider.js +1 -1
  77. package/dist/gridBidAdapter.js +1 -1
  78. package/dist/gumgumBidAdapter.js +1 -1
  79. package/dist/h12mediaBidAdapter.js +1 -1
  80. package/dist/hypelabBidAdapter.js +1 -1
  81. package/dist/id5AnalyticsAdapter.js +1 -1
  82. package/dist/id5IdSystem.js +1 -1
  83. package/dist/imdsBidAdapter.js +1 -1
  84. package/dist/improvedigitalBidAdapter.js +1 -1
  85. package/dist/inmobiBidAdapter.js +1 -1
  86. package/dist/insticatorBidAdapter.js +1 -1
  87. package/dist/intentIqAnalyticsAdapter.js +1 -1
  88. package/dist/ixBidAdapter.js +1 -1
  89. package/dist/jixieBidAdapter.js +1 -1
  90. package/dist/justpremiumBidAdapter.js +1 -1
  91. package/dist/kargoBidAdapter.js +1 -1
  92. package/dist/kimberliteBidAdapter.js +1 -1
  93. package/dist/konduitAnalyticsAdapter.js +1 -1
  94. package/dist/kueezBidAdapter.js +1 -1
  95. package/dist/lassoBidAdapter.js +1 -1
  96. package/dist/lifestreetBidAdapter.js +1 -1
  97. package/dist/liveIntentId.js +1 -1
  98. package/dist/logicadBidAdapter.js +1 -1
  99. package/dist/loglyliftBidAdapter.js +1 -1
  100. package/dist/luceadBidAdapter.js +1 -1
  101. package/dist/luponmediaBidAdapter.js +1 -1
  102. package/dist/mabidderBidAdapter.js +1 -1
  103. package/dist/madsenseBidAdapter.js +1 -1
  104. package/dist/magniteAnalyticsAdapter.js +1 -1
  105. package/dist/malltvAnalyticsAdapter.js +1 -1
  106. package/dist/marsmediaBidAdapter.js +1 -1
  107. package/dist/mediafuseBidAdapter.js +1 -1
  108. package/dist/medianetBidAdapter.js +1 -1
  109. package/dist/medianetUtils.js +1 -1
  110. package/dist/mediasquareBidAdapter.js +1 -1
  111. package/dist/mgidBidAdapter.js +1 -1
  112. package/dist/missenaBidAdapter.js +1 -1
  113. package/dist/mobilefuseBidAdapter.js +1 -1
  114. package/dist/nativeryBidAdapter.js +1 -0
  115. package/dist/nextMillenniumBidAdapter.js +1 -1
  116. package/dist/nexx360Utils.js +1 -1
  117. package/dist/nobidAnalyticsAdapter.js +1 -1
  118. package/dist/nobidBidAdapter.js +1 -1
  119. package/dist/nodalsAiRtdProvider.js +1 -1
  120. package/dist/not-for-prod/prebid.js +187 -184
  121. package/dist/oguryBidAdapter.js +1 -1
  122. package/dist/onetagBidAdapter.js +1 -1
  123. package/dist/ooloAnalyticsAdapter.js +1 -1
  124. package/dist/openxBidAdapter.js +1 -1
  125. package/dist/optidigitalBidAdapter.js +1 -1
  126. package/dist/orbidderBidAdapter.js +1 -1
  127. package/dist/outbrainBidAdapter.js +1 -1
  128. package/dist/pinkLionBidAdapter.js +1 -0
  129. package/dist/pixfutureBidAdapter.js +1 -1
  130. package/dist/prebidServerBidAdapter.js +1 -1
  131. package/dist/priceFloors.js +1 -1
  132. package/dist/publinkIdSystem.js +1 -1
  133. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  134. package/dist/pubmaticBidAdapter.js +1 -1
  135. package/dist/pubmaticRtdProvider.js +1 -1
  136. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  137. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  138. package/dist/pubxaiRtdProvider.js +1 -1
  139. package/dist/pxyzBidAdapter.js +1 -1
  140. package/dist/quantcastBidAdapter.js +1 -1
  141. package/dist/readpeakBidAdapter.js +1 -1
  142. package/dist/relaidoBidAdapter.js +1 -1
  143. package/dist/retailspotBidAdapter.js +1 -1
  144. package/dist/rhythmoneBidAdapter.js +1 -1
  145. package/dist/riseUtils.js +1 -1
  146. package/dist/rtbhouseBidAdapter.js +1 -1
  147. package/dist/rubiconBidAdapter.js +1 -1
  148. package/dist/seedingAllianceBidAdapter.js +1 -1
  149. package/dist/seedtagBidAdapter.js +1 -1
  150. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  151. package/dist/sharethroughBidAdapter.js +1 -1
  152. package/dist/showheroes-bsBidAdapter.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/stroeerCoreBidAdapter.js +1 -1
  163. package/dist/stvBidAdapter.js +1 -1
  164. package/dist/sublimeBidAdapter.js +1 -1
  165. package/dist/taboolaBidAdapter.js +1 -1
  166. package/dist/tappxBidAdapter.js +1 -1
  167. package/dist/targetVideoBidAdapter.js +1 -1
  168. package/dist/teadsBidAdapter.js +1 -1
  169. package/dist/terceptAnalyticsAdapter.js +1 -1
  170. package/dist/themoneytizerBidAdapter.js +1 -1
  171. package/dist/trionBidAdapter.js +1 -1
  172. package/dist/tripleliftBidAdapter.js +1 -1
  173. package/dist/ttdBidAdapter.js +1 -1
  174. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  175. package/dist/uid2IdSystem.js +1 -1
  176. package/dist/underdogmediaBidAdapter.js +1 -1
  177. package/dist/undertoneBidAdapter.js +1 -1
  178. package/dist/unifiedIdSystem.js +1 -1
  179. package/dist/unrulyBidAdapter.js +1 -1
  180. package/dist/userId.js +1 -1
  181. package/dist/vidazooUtils.js +1 -1
  182. package/dist/videobyteBidAdapter.js +1 -1
  183. package/dist/visxBidAdapter.js +1 -1
  184. package/dist/vuukleBidAdapter.js +1 -1
  185. package/dist/weboramaRtdProvider.js +1 -1
  186. package/dist/widespaceBidAdapter.js +1 -1
  187. package/dist/winrBidAdapter.js +1 -1
  188. package/dist/xeUtils.js +1 -1
  189. package/dist/yahooAdsBidAdapter.js +1 -1
  190. package/dist/yandexBidAdapter.js +1 -1
  191. package/dist/yieldmoBidAdapter.js +1 -1
  192. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  193. package/eslint.config.js +1 -3
  194. package/gulpHelpers.js +3 -6
  195. package/gulpfile.js +25 -24
  196. package/karma.conf.maker.js +1 -3
  197. package/libraries/advangUtils/index.js +3 -4
  198. package/libraries/blueUtils/bidderUtils.js +113 -0
  199. package/libraries/browsiUtils/browsiUtils.js +1 -2
  200. package/libraries/gptUtils/gptUtils.js +1 -2
  201. package/libraries/liveIntentId/shared.js +4 -0
  202. package/libraries/xeUtils/bidderUtils.js +3 -4
  203. package/modules/adagioBidAdapter.js +1 -2
  204. package/modules/addefendBidAdapter.md +1 -1
  205. package/modules/adtrgtmeBidAdapter.js +6 -8
  206. package/modules/aduptechBidAdapter.md +1 -1
  207. package/modules/adverxoBidAdapter.js +3 -3
  208. package/modules/blueBidAdapter.js +24 -104
  209. package/modules/bmsBidAdapter.js +25 -105
  210. package/modules/concertBidAdapter.md +1 -1
  211. package/modules/contxtfulBidAdapter.js +56 -10
  212. package/modules/conversantBidAdapter.js +0 -58
  213. package/modules/cwireBidAdapter.js +8 -0
  214. package/modules/czechAdIdSystem.js +13 -3
  215. package/modules/dynamicAdBoostRtdProvider.js +16 -33
  216. package/modules/dynamicAdBoostRtdProvider.md +1 -6
  217. package/modules/ixBidAdapter.js +2 -3
  218. package/modules/luponmediaBidAdapter.js +117 -522
  219. package/modules/luponmediaBidAdapter.md +2 -3
  220. package/modules/mediasquareBidAdapter.js +14 -20
  221. package/modules/microadBidAdapter.js +0 -1
  222. package/modules/nativeryBidAdapter.js +135 -0
  223. package/modules/nativeryBidAdapter.md +95 -0
  224. package/modules/nativoBidAdapter.js +3 -3
  225. package/modules/onetagBidAdapter.js +0 -1
  226. package/modules/pinkLionBidAdapter.js +17 -0
  227. package/modules/pinkLionBidAdapter.md +79 -0
  228. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
  229. package/modules/priceFloors.js +2 -2
  230. package/modules/pubmaticBidAdapter.js +4 -1
  231. package/modules/qortexRtdProvider.md +1 -1
  232. package/modules/reconciliationRtdProvider.md +4 -4
  233. package/modules/rtbhouseBidAdapter.js +4 -83
  234. package/modules/rubiconBidAdapter.js +1 -1
  235. package/modules/sspBCBidAdapter.js +1 -1
  236. package/modules/stroeerCoreBidAdapter.js +3 -3
  237. package/modules/stvBidAdapter.js +19 -14
  238. package/modules/topicsFpdModule.md +1 -1
  239. package/modules/unifiedIdSystem.js +8 -1
  240. package/modules/userId/eids.js +15 -0
  241. package/modules/videoModule/index.js +0 -1
  242. package/modules/videoModule/videoImpressionVerifier.js +0 -1
  243. package/modules/yieldlabBidAdapter.js +1 -2
  244. package/modules/yieldmoBidAdapter.js +1 -2
  245. package/package.json +13 -20
  246. package/src/Renderer.js +1 -2
  247. package/src/adapterManager.js +14 -4
  248. package/src/auction.js +2 -3
  249. package/src/config.js +1 -2
  250. package/src/cpmBucketManager.js +1 -2
  251. package/src/secureCreatives.js +2 -3
  252. package/src/targeting.js +1 -2
  253. package/test/fake-server/README.md +3 -3
  254. package/test/helpers/index_adapter_utils.js +2 -2
  255. package/test/helpers/testing-utils.js +1 -1
  256. package/test/spec/auctionmanager_spec.js +2 -3
  257. package/test/spec/fpd/enrichment_spec.js +1 -1
  258. package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
  259. package/test/spec/modules/adfBidAdapter_spec.js +1 -1
  260. package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
  261. package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
  262. package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
  263. package/test/spec/modules/afpBidAdapter_spec.js +0 -1
  264. package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
  265. package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
  266. package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
  267. package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
  268. package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
  269. package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
  270. package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
  271. package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
  272. package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
  273. package/test/spec/modules/iasRtdProvider_spec.js +2 -2
  274. package/test/spec/modules/id5IdSystem_spec.js +1 -1
  275. package/test/spec/modules/idxIdSystem_spec.js +1 -2
  276. package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
  277. package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
  278. package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
  279. package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
  280. package/test/spec/modules/lmpIdSystem_spec.js +1 -2
  281. package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
  282. package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
  283. package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
  284. package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
  285. package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
  286. package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
  287. package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
  288. package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
  289. package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
  290. package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
  291. package/test/spec/modules/omsBidAdapter_spec.js +1 -1
  292. package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
  293. package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
  294. package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
  295. package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
  296. package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
  297. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
  298. package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
  299. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
  300. package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
  301. package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
  302. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
  303. package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
  304. package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
  305. package/test/spec/modules/sizeMappingV2_spec.js +1 -1
  306. package/test/spec/modules/sizeMapping_spec.js +2 -3
  307. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
  308. package/test/spec/modules/stvBidAdapter_spec.js +108 -40
  309. package/test/spec/modules/topLevelPaapi_spec.js +1 -1
  310. package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
  311. package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
  312. package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
  313. package/test/spec/modules/userId_spec.js +1 -1
  314. package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
  315. package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
  316. package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
  317. package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
  318. package/test/spec/unit/core/adapterManager_spec.js +29 -17
  319. package/test/spec/unit/core/targeting_spec.js +1 -1
  320. package/test/spec/unit/pbjs_api_spec.js +4 -5
  321. package/test/spec/utils_spec.js +20 -12
  322. package/test/test_deps.js +1 -1
  323. package/nightwatch.browserstack.json +0 -46
  324. package/nightwatch.conf.js +0 -36
  325. package/nightwatch.json +0 -40
@@ -0,0 +1,113 @@
1
+ import { isFn, isPlainObject, deepSetValue, replaceAuctionPrice, triggerPixel } from '../../src/utils.js';
2
+
3
+ export function getBidFloor(bid, mediaType, defaultCurrency) {
4
+ if (isFn(bid.getFloor)) {
5
+ let floor = bid.getFloor({
6
+ currency: defaultCurrency,
7
+ mediaType: mediaType,
8
+ size: '*',
9
+ });
10
+ if (
11
+ isPlainObject(floor) &&
12
+ !isNaN(floor.floor) &&
13
+ floor.currency === defaultCurrency
14
+ ) {
15
+ return floor.floor;
16
+ }
17
+ }
18
+ return null;
19
+ }
20
+
21
+ export function buildOrtbRequest(bidRequests, bidderRequest, context, gvlid, ortbConverterInstance) {
22
+ const ortbRequest = ortbConverterInstance.toORTB({ bidRequests, bidderRequest, context });
23
+ ortbRequest.ext = ortbRequest.ext || {};
24
+ deepSetValue(ortbRequest, 'ext.gvlid', gvlid);
25
+ return ortbRequest;
26
+ }
27
+
28
+ export function ortbConverterRequest(buildRequest, imps, bidderRequest, context) {
29
+ let request = buildRequest(imps, bidderRequest, context);
30
+ deepSetValue(request, 'site.publisher.id', context.publisherId);
31
+ return request;
32
+ }
33
+
34
+ export function ortbConverterImp(buildImp, bidRequest, context) {
35
+ let imp = buildImp(bidRequest, context);
36
+ // context.mediaTypes is expected to be set by the adapter calling this function
37
+ const floor = getBidFloor(bidRequest, context.mediaTypes.banner, context.mediaTypes.defaultCurrency);
38
+ imp.tagid = bidRequest.params.placementId;
39
+
40
+ if (floor) {
41
+ imp.bidfloor = floor;
42
+ imp.bidfloorcur = context.mediaTypes.defaultCurrency;
43
+ }
44
+
45
+ return imp;
46
+ }
47
+
48
+ export function buildBidObjectBase(bid, serverResponseBody, bidderCode, defaultCurrency) {
49
+ return {
50
+ ad: replaceAuctionPrice(bid.adm, bid.price),
51
+ adapterCode: bidderCode,
52
+ cpm: bid.price,
53
+ currency: serverResponseBody.cur || defaultCurrency,
54
+ deferBilling: false,
55
+ deferRendering: false,
56
+ width: bid.w,
57
+ height: bid.h,
58
+ mediaType: bid.ext?.mediaType || 'banner',
59
+ netRevenue: true,
60
+ originalCpm: bid.price,
61
+ originalCurrency: serverResponseBody.cur || defaultCurrency,
62
+ requestId: bid.impid,
63
+ seatBidId: bid.id
64
+ };
65
+ }
66
+
67
+ export function commonOnBidWonHandler(bid, processUrl = (url, bidData) => url) {
68
+ const { burl, nurl } = bid || {};
69
+
70
+ if (nurl) {
71
+ triggerPixel(processUrl(nurl, bid));
72
+ }
73
+
74
+ if (burl) {
75
+ triggerPixel(processUrl(burl, bid));
76
+ }
77
+ }
78
+
79
+ export function commonIsBidRequestValid(bid) {
80
+ return !!bid.params.placementId && !!bid.params.publisherId;
81
+ }
82
+
83
+ export function createOrtbConverter(ortbConverterFunc, bannerMediaType, defaultCurrencyConst, impFunc, requestFunc) {
84
+ return ortbConverterFunc({
85
+ context: {
86
+ netRevenue: true,
87
+ ttl: 100,
88
+ mediaTypes: {
89
+ banner: bannerMediaType,
90
+ defaultCurrency: defaultCurrencyConst
91
+ }
92
+ },
93
+ imp: impFunc,
94
+ request: requestFunc,
95
+ });
96
+ }
97
+
98
+ export function getPublisherIdFromBids(validBidRequests) {
99
+ return validBidRequests.find(
100
+ (bidRequest) => bidRequest.params?.publisherId
101
+ )?.params.publisherId;
102
+ }
103
+
104
+ export function packageOrtbRequest(ortbRequest, endpointUrl, dataProcessor, requestOptions) {
105
+ return [
106
+ {
107
+ method: 'POST',
108
+ url: endpointUrl,
109
+ data: dataProcessor(ortbRequest),
110
+ options: requestOptions,
111
+ }
112
+ ];
113
+ }
@@ -1,6 +1,5 @@
1
1
  import { isGptPubadsDefined, logError } from '../../src/utils.js';
2
2
  import { setKeyValue as setGptKeyValue } from '../../libraries/gptUtils/gptUtils.js';
3
- import { find } from '../../src/polyfill.js';
4
3
 
5
4
  /** @type {string} */
6
5
  const VIEWABILITY_KEYNAME = 'browsiViewability';
@@ -89,7 +88,7 @@ export function getSlotByCode(code) {
89
88
  if (!slots || !slots.length) {
90
89
  return null;
91
90
  }
92
- return find(slots, s => s.getSlotElementId() === code || s.getAdUnitPath() === code) || null;
91
+ return slots.find(s => s.getSlotElementId() === code || s.getAdUnitPath() === code) || null;
93
92
  }
94
93
 
95
94
  function getLocalStorageData(storage) {
@@ -1,5 +1,4 @@
1
1
  import { CLIENT_SECTIONS } from '../../src/fpd/oneClient.js';
2
- import {find} from '../../src/polyfill.js';
3
2
  import {compareCodeAndSlot, deepAccess, isGptPubadsDefined, uniques} from '../../src/utils.js';
4
3
 
5
4
  /**
@@ -30,7 +29,7 @@ export function getGptSlotForAdUnitCode(adUnitCode) {
30
29
  let matchingSlot;
31
30
  if (isGptPubadsDefined()) {
32
31
  // find the first matching gpt slot on the page
33
- matchingSlot = find(window.googletag.pubads().getSlots(), isSlotMatchingAdUnitCode(adUnitCode));
32
+ matchingSlot = window.googletag.pubads().getSlots().find(isSlotMatchingAdUnitCode(adUnitCode));
34
33
  }
35
34
  return matchingSlot;
36
35
  }
@@ -160,6 +160,10 @@ export function setUpTreatment(config) {
160
160
 
161
161
  export const eids = {
162
162
  ...UID1_EIDS,
163
+ tdid: {
164
+ ...UID1_EIDS.tdid,
165
+ matcher: LI_PROVIDER_DOMAIN
166
+ },
163
167
  ...UID2_EIDS,
164
168
  'lipb': {
165
169
  getValue: function(data) {
@@ -1,6 +1,5 @@
1
1
  import {deepAccess, getBidIdParameter, isFn, logError, isArray, parseSizesInput, isPlainObject} from '../../src/utils.js';
2
2
  import {getAdUnitSizes} from '../sizeUtils/sizeUtils.js';
3
- import {findIndex} from '../../src/polyfill.js';
4
3
 
5
4
  export function getBidFloor(bid, currency = 'USD') {
6
5
  if (!isFn(bid.getFloor)) {
@@ -114,9 +113,9 @@ export function interpretResponse(serverResponse, {bidderRequest}) {
114
113
  }
115
114
 
116
115
  serverResponse.body.data.forEach(serverBid => {
117
- const bidIndex = findIndex(bidderRequest.bids, (bidRequest) => {
118
- return bidRequest.bidId === serverBid.requestId;
119
- });
116
+ const bidIndex = Array.isArray(bidderRequest.bids)
117
+ ? bidderRequest.bids.findIndex(bidRequest => bidRequest.bidId === serverBid.requestId)
118
+ : undefined;
120
119
 
121
120
  if (bidIndex !== -1) {
122
121
  const bid = {
@@ -21,7 +21,6 @@ import { Renderer } from '../src/Renderer.js';
21
21
  import { _ADAGIO } from '../libraries/adagioUtils/adagioUtils.js';
22
22
  import { config } from '../src/config.js';
23
23
  import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
24
- import { find } from '../src/polyfill.js';
25
24
  import { getGptSlotInfoForAdUnitCode } from '../libraries/gptUtils/gptUtils.js';
26
25
  import { registerBidder } from '../src/adapters/bidderFactory.js';
27
26
  import { userSync } from '../src/userSync.js';
@@ -757,7 +756,7 @@ export const spec = {
757
756
  }
758
757
  if (response.bids) {
759
758
  response.bids.forEach(bidObj => {
760
- const bidReq = (find(bidRequest.data.adUnits, bid => bid.bidId === bidObj.requestId));
759
+ const bidReq = bidRequest.data.adUnits.find(bid => bid.bidId === bidObj.requestId);
761
760
 
762
761
  if (bidReq) {
763
762
  // bidObj.meta is the `bidResponse.meta` object according to https://docs.prebid.org/dev-docs/bidder-adaptor.html#interpreting-the-response
@@ -15,7 +15,7 @@ Module that connects to AdDefend as a demand source.
15
15
  | ------------- | ------------- | ----- | ----- |
16
16
  | pageId | id assigned to the website in the AdDefend system. (ask AdDefend support) | no | - |
17
17
  | placementId | id of the placement in the AdDefend system. (ask AdDefend support) | no | - |
18
- | trafficTypes | comma seperated list of the following traffic types:<br/>ADBLOCK - user has a activated adblocker<br/>PM - user has firefox private mode activated<br/>NC - user has not given consent<br/>NONE - user traffic is none of the above, this usually means this is a "normal" user.<br/>| yes | ADBLOCK |
18
+ | trafficTypes | comma separated list of the following traffic types:<br/>ADBLOCK - user has an activated adblocker<br/>PM - user has firefox private mode activated<br/>NC - user has not given consent<br/>NONE - user traffic is none of the above, this usually means this is a "normal" user.<br/>| yes | ADBLOCK |
19
19
 
20
20
 
21
21
  # Test Parameters
@@ -13,7 +13,7 @@ import { config } from '../src/config.js';
13
13
  import { hasPurpose1Consent } from '../src/utils/gdpr.js';
14
14
 
15
15
  const BIDDER_CODE = 'adtrgtme';
16
- const BIDDER_VERSION = '1.0.6';
16
+ const BIDDER_VERSION = '1.0.7';
17
17
  const BIDDER_URL = 'https://z.cdn.adtarget.market/ssp?prebid&s=';
18
18
  const PREBIDJS_VERSION = '$prebid.version$';
19
19
  const DEFAULT_TTL = 300;
@@ -76,31 +76,29 @@ function createORTB(bR, bid) {
76
76
  ip,
77
77
  },
78
78
  regs: {
79
- ext: {
80
- us_privacy: usPrivacy,
81
- gdpr,
82
- },
79
+ gdpr,
80
+ us_privacy: usPrivacy,
83
81
  },
84
82
  source: {
85
83
  ext: {
86
84
  hb: 1,
87
85
  bidderver: BIDDER_VERSION,
88
86
  prebidjsver: PREBIDJS_VERSION,
89
- ...(bid?.schain && { schain: bid.schain }),
90
87
  },
91
88
  fd: 1,
92
89
  },
93
90
  user: {
94
91
  ...user,
92
+ consent: consentString,
95
93
  ext: {
96
- consent: consentString,
97
94
  ...(user?.ext || {}),
98
95
  },
99
96
  },
100
97
  };
101
98
 
102
99
  if (bid?.schain) {
103
- oR.source.ext.schain.nodes[0].rid = oR.id;
100
+ oR.source.schain = bid.schain;
101
+ oR.source.schain.nodes[0].rid = oR.id;
104
102
  }
105
103
 
106
104
  return oR;
@@ -16,7 +16,7 @@ Connects to AdUp Technology demand sources to fetch bids.
16
16
  - Bidder code: `aduptech`
17
17
  - Supported media types: `banner`, `native`
18
18
 
19
- ## Paramters
19
+ ## Parameters
20
20
  | Name | Scope | Description | Example |
21
21
  | :--- | :---- | :---------- | :------ |
22
22
  | `publisher` | required | Unique publisher identifier | `'prebid'` |
@@ -181,7 +181,7 @@ const adverxoUtils = {
181
181
  bidRequests.forEach(bidRequest => {
182
182
  const adUnit = {
183
183
  host: bidRequest.params.host,
184
- id: bidRequest.params.adUnitId,
184
+ id: Number(bidRequest.params.adUnitId),
185
185
  auth: bidRequest.params.auth,
186
186
  };
187
187
 
@@ -229,8 +229,8 @@ export const spec = {
229
229
  return false;
230
230
  }
231
231
 
232
- if (!bid.params.adUnitId || typeof bid.params.adUnitId !== 'number') {
233
- utils.logWarn('Adverxo Bid Adapter: adUnitId bid param is required and must be a number');
232
+ if (!bid.params.adUnitId || isNaN(Number(bid.params.adUnitId)) || bid.params.adUnitId <= 0) {
233
+ utils.logWarn('Adverxo Bid Adapter: adUnitId bid param is required and must be a positive number');
234
234
  return false;
235
235
  }
236
236
 
@@ -2,13 +2,20 @@ import { ortbConverter } from '../libraries/ortbConverter/converter.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER } from '../src/mediaTypes.js';
4
4
  import { getStorageManager } from '../src/storageManager.js';
5
+ import {
6
+ buildOrtbRequest,
7
+ ortbConverterRequest,
8
+ ortbConverterImp,
9
+ buildBidObjectBase,
10
+ commonOnBidWonHandler,
11
+ commonIsBidRequestValid,
12
+ createOrtbConverter,
13
+ getPublisherIdFromBids,
14
+ packageOrtbRequest
15
+ } from '../libraries/blueUtils/bidderUtils.js';
5
16
  import {
6
17
  replaceAuctionPrice,
7
- isFn,
8
- isPlainObject,
9
- deepSetValue,
10
- isEmpty,
11
- triggerPixel,
18
+ isEmpty
12
19
  } from '../src/utils.js';
13
20
  const BIDDER_CODE = 'blue';
14
21
  const ENDPOINT_URL = 'https://bidder-us-east-1.getblue.io/engine/?src=prebid';
@@ -17,51 +24,7 @@ const DEFAULT_CURRENCY = 'USD';
17
24
 
18
25
  export const storage = getStorageManager({ bidderCode: BIDDER_CODE });
19
26
 
20
- function getBidFloor(bid) {
21
- if (isFn(bid.getFloor)) {
22
- let floor = bid.getFloor({
23
- currency: DEFAULT_CURRENCY,
24
- mediaType: BANNER,
25
- size: '*',
26
- });
27
- if (
28
- isPlainObject(floor) &&
29
- !isNaN(floor.floor) &&
30
- floor.currency === DEFAULT_CURRENCY
31
- ) {
32
- return floor.floor;
33
- }
34
- }
35
- return null;
36
- }
37
-
38
- const converter = ortbConverter({
39
- context: {
40
- netRevenue: true, // Default netRevenue setting
41
- ttl: 100, // Default time-to-live for bid responses
42
- },
43
- imp,
44
- request,
45
- });
46
-
47
- function request(buildRequest, imps, bidderRequest, context) {
48
- let request = buildRequest(imps, bidderRequest, context);
49
- deepSetValue(request, 'site.publisher.id', context.publisherId);
50
- return request;
51
- }
52
-
53
- function imp(buildImp, bidRequest, context) {
54
- let imp = buildImp(bidRequest, context);
55
- const floor = getBidFloor(bidRequest);
56
- imp.tagid = bidRequest.params.placementId;
57
-
58
- if (floor) {
59
- imp.bidfloor = floor;
60
- imp.bidfloorcur = DEFAULT_CURRENCY;
61
- }
62
-
63
- return imp;
64
- }
27
+ const converter = createOrtbConverter(ortbConverter, BANNER, DEFAULT_CURRENCY, ortbConverterImp, ortbConverterRequest);
65
28
 
66
29
  export const spec = {
67
30
  code: BIDDER_CODE,
@@ -69,38 +32,19 @@ export const spec = {
69
32
  supportedMediaTypes: [BANNER],
70
33
 
71
34
  // Validate bid request
72
- isBidRequestValid: function (bid) {
73
- return !!bid.params.placementId && !!bid.params.publisherId;
74
- },
35
+ isBidRequestValid: commonIsBidRequestValid,
75
36
 
76
37
  // Build OpenRTB requests using `ortbConverter`
77
38
  buildRequests: function (validBidRequests, bidderRequest) {
78
39
  const context = {
79
- publisherId: validBidRequests.find(
80
- (bidRequest) => bidRequest.params?.publisherId
81
- )?.params.publisherId,
40
+ publisherId: getPublisherIdFromBids(validBidRequests),
82
41
  };
42
+ const ortbRequestData = buildOrtbRequest(validBidRequests, bidderRequest, context, GVLID, converter);
83
43
 
84
- const ortbRequest = converter.toORTB({
85
- bidRequests: validBidRequests,
86
- bidderRequest,
87
- context,
88
- });
89
-
90
- // Add extensions to the request
91
- ortbRequest.ext = ortbRequest.ext || {};
92
- deepSetValue(ortbRequest, 'ext.gvlid', GVLID);
44
+ const blueDataProcessor = (data) => data;
45
+ const blueOptions = { contentType: 'application/json' };
93
46
 
94
- return [
95
- {
96
- method: 'POST',
97
- url: ENDPOINT_URL,
98
- data: ortbRequest,
99
- options: {
100
- contentType: 'application/json',
101
- },
102
- },
103
- ];
47
+ return packageOrtbRequest(ortbRequestData, ENDPOINT_URL, blueDataProcessor, blueOptions);
104
48
  },
105
49
 
106
50
  interpretResponse: (serverResponse) => {
@@ -109,41 +53,17 @@ export const spec = {
109
53
  let bids = [];
110
54
  serverResponse.body.seatbid.forEach((response) => {
111
55
  response.bid.forEach((bid) => {
112
- const mediaType = bid.ext?.mediaType || 'banner';
113
- bids.push({
114
- ad: replaceAuctionPrice(bid.adm, bid.price),
115
- adapterCode: BIDDER_CODE,
116
- cpm: bid.price,
117
- creativeId: bid.ext.blue.adId,
118
- creative_id: bid.ext.blue.adId,
119
- currency: serverResponse.body.cur || 'USD',
120
- deferBilling: false,
121
- deferRendering: false,
122
- width: bid.w,
123
- height: bid.h,
124
- mediaType,
125
- netRevenue: true,
126
- originalCpm: bid.price,
127
- originalCurrency: serverResponse.body.cur || 'USD',
128
- requestId: bid.impid,
129
- seatBidId: bid.id,
130
- ttl: 1200,
131
- });
56
+ const baseBid = buildBidObjectBase(bid, serverResponse.body, BIDDER_CODE, DEFAULT_CURRENCY);
57
+ const blueSpecific = { creativeId: bid.ext.blue.adId, creative_id: bid.ext.blue.adId, ttl: 1200 };
58
+ bids.push({ ...baseBid, ...blueSpecific });
132
59
  });
133
60
  });
134
61
  return bids;
135
62
  },
136
63
 
137
64
  onBidWon: function (bid) {
138
- const { burl, nurl } = bid || {};
139
-
140
- if (nurl) {
141
- triggerPixel(replaceAuctionPrice(nurl, bid.originalCpm || bid.cpm));
142
- }
143
-
144
- if (burl) {
145
- triggerPixel(replaceAuctionPrice(burl, bid.originalCpm || bid.cpm));
146
- }
65
+ // replaceAuctionPrice is available in this scope due to the import from ../src/utils.js
66
+ commonOnBidWonHandler(bid, (url, bidData) => replaceAuctionPrice(url, bidData.originalCpm || bidData.cpm));
147
67
  },
148
68
  };
149
69
 
@@ -3,12 +3,18 @@ import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER } from '../src/mediaTypes.js';
4
4
  import { getStorageManager } from '../src/storageManager.js';
5
5
  import {
6
- replaceAuctionPrice,
7
- isFn,
8
- isPlainObject,
9
- deepSetValue,
10
- isEmpty,
11
- triggerPixel,
6
+ buildOrtbRequest,
7
+ ortbConverterRequest,
8
+ ortbConverterImp,
9
+ buildBidObjectBase,
10
+ commonOnBidWonHandler,
11
+ commonIsBidRequestValid,
12
+ createOrtbConverter,
13
+ getPublisherIdFromBids,
14
+ packageOrtbRequest
15
+ } from '../libraries/blueUtils/bidderUtils.js';
16
+ import {
17
+ isEmpty
12
18
  } from '../src/utils.js';
13
19
  const BIDDER_CODE = 'bms';
14
20
  const ENDPOINT_URL =
@@ -19,53 +25,7 @@ const DEFAULT_BID_TTL = 1200;
19
25
 
20
26
  export const storage = getStorageManager({ bidderCode: BIDDER_CODE });
21
27
 
22
- function getBidFloor(bid) {
23
- if (isFn(bid.getFloor)) {
24
- let floor = bid.getFloor({
25
- currency: DEFAULT_CURRENCY,
26
- mediaType: BANNER,
27
- size: '*',
28
- });
29
- if (
30
- isPlainObject(floor) &&
31
- !isNaN(floor.floor) &&
32
- floor.currency === DEFAULT_CURRENCY
33
- ) {
34
- return floor.floor;
35
- }
36
- }
37
- return null;
38
- }
39
-
40
- const converter = ortbConverter({
41
- context: {
42
- netRevenue: true, // Default net revenue configuration
43
- ttl: 100, // Default time-to-live for bid responses
44
- },
45
- imp,
46
- request,
47
- });
48
-
49
- function request(buildRequest, imps, bidderRequest, context) {
50
- let request = buildRequest(imps, bidderRequest, context);
51
-
52
- // Add publisher ID
53
- deepSetValue(request, 'site.publisher.id', context.publisherId);
54
- return request;
55
- }
56
-
57
- function imp(buildImp, bidRequest, context) {
58
- let imp = buildImp(bidRequest, context);
59
- const floor = getBidFloor(bidRequest);
60
- imp.tagid = bidRequest.params.placementId;
61
-
62
- if (floor) {
63
- imp.bidfloor = floor;
64
- imp.bidfloorcur = DEFAULT_CURRENCY;
65
- }
66
-
67
- return imp;
68
- }
28
+ const converter = createOrtbConverter(ortbConverter, BANNER, DEFAULT_CURRENCY, ortbConverterImp, ortbConverterRequest);
69
29
 
70
30
  export const spec = {
71
31
  code: BIDDER_CODE,
@@ -73,39 +33,19 @@ export const spec = {
73
33
  supportedMediaTypes: [BANNER],
74
34
 
75
35
  // Validate bid request
76
- isBidRequestValid: function (bid) {
77
- return !!bid.params.placementId && !!bid.params.publisherId;
78
- },
36
+ isBidRequestValid: commonIsBidRequestValid,
79
37
 
80
38
  // Build OpenRTB requests using `ortbConverter`
81
39
  buildRequests: function (validBidRequests, bidderRequest) {
82
40
  const context = {
83
- publisherId: validBidRequests.find(
84
- (bidRequest) => bidRequest.params?.publisherId
85
- )?.params.publisherId,
41
+ publisherId: getPublisherIdFromBids(validBidRequests),
86
42
  };
43
+ const ortbRequestData = buildOrtbRequest(validBidRequests, bidderRequest, context, GVLID, converter);
87
44
 
88
- const ortbRequest = converter.toORTB({
89
- bidRequests: validBidRequests,
90
- bidderRequest,
91
- context,
92
- });
93
-
94
- // Add extensions to the request
95
- ortbRequest.ext = ortbRequest.ext || {};
96
- deepSetValue(ortbRequest, 'ext.gvlid', GVLID);
45
+ const bmsDataProcessor = (data) => JSON.stringify(data);
46
+ const bmsOptions = { contentType: 'text/plain', withCredentials: true };
97
47
 
98
- return [
99
- {
100
- method: 'POST',
101
- url: ENDPOINT_URL,
102
- data: JSON.stringify(ortbRequest),
103
- options: {
104
- contentType: 'text/plain',
105
- withCredentials: true,
106
- },
107
- },
108
- ];
48
+ return packageOrtbRequest(ortbRequestData, ENDPOINT_URL, bmsDataProcessor, bmsOptions);
109
49
  },
110
50
 
111
51
  interpretResponse: (serverResponse) => {
@@ -114,46 +54,26 @@ export const spec = {
114
54
  let bids = [];
115
55
  serverResponse.body.seatbid.forEach((response) => {
116
56
  response.bid.forEach((bid) => {
117
- const mediaType = bid.ext?.mediaType || 'banner';
118
- bids.push({
119
- ad: replaceAuctionPrice(bid.adm, bid.price),
120
- adapterCode: BIDDER_CODE,
121
- cpm: bid.price,
57
+ const baseBid = buildBidObjectBase(bid, serverResponse.body, BIDDER_CODE, DEFAULT_CURRENCY);
58
+ const bmsSpecific = {
122
59
  creativeId: bid.ext.bms.adId,
123
- currency: serverResponse.body.cur || 'USD',
124
- deferBilling: false,
125
- deferRendering: false,
126
- width: bid.w,
127
- height: bid.h,
128
- mediaType,
129
- netRevenue: true,
130
- originalCpm: bid.price,
131
- originalCurrency: serverResponse.body.cur || 'USD',
132
- requestId: bid.impid,
133
- seatBidId: bid.id,
134
60
  ttl: typeof bid.exp === 'number' ? bid.exp : DEFAULT_BID_TTL,
135
61
  nurl: bid.nurl || null,
136
62
  burl: bid.burl || null,
137
63
  meta: {
138
64
  advertiserDomains: bid.adomain || [],
139
- networkId: bid.ext?.networkId || 1105,
65
+ networkId: bid.ext?.networkId || GVLID,
140
66
  networkName: bid.ext?.networkName || 'BMS',
141
67
  }
142
- });
68
+ };
69
+ bids.push({ ...baseBid, ...bmsSpecific });
143
70
  });
144
71
  });
145
72
  return bids;
146
73
  },
147
74
 
148
75
  onBidWon: function (bid) {
149
- const { burl, nurl } = bid || {};
150
- if (nurl) {
151
- triggerPixel(nurl);
152
- }
153
-
154
- if (burl) {
155
- triggerPixel(burl);
156
- }
76
+ commonOnBidWonHandler(bid);
157
77
  },
158
78
  };
159
79
 
@@ -10,7 +10,7 @@ Maintainer: support@concert.io
10
10
 
11
11
  Module that connects to Concert demand sources
12
12
 
13
- # Test Paramters
13
+ # Test Parameters
14
14
  ```
15
15
  var adUnits = [
16
16
  {