prebid.js 7.51.0 → 7.53.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 (277) hide show
  1. package/dist/1plusXRtdProvider.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/adkernelBidAdapter.js +1 -1
  8. package/dist/adqueryBidAdapter.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adriverIdSystem.js +1 -1
  11. package/dist/adtrgtmeBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.js +1 -1
  13. package/dist/adyoulikeBidAdapter.js +1 -1
  14. package/dist/airgridRtdProvider.js +1 -1
  15. package/dist/ajaBidAdapter.js +1 -1
  16. package/dist/allowActivities.js +1 -0
  17. package/dist/amxBidAdapter.js +1 -1
  18. package/dist/amxIdSystem.js +1 -1
  19. package/dist/appierAnalyticsAdapter.js +1 -1
  20. package/dist/appnexusBidAdapter.js +1 -1
  21. package/dist/asoBidAdapter.js +1 -1
  22. package/dist/axonixBidAdapter.js +1 -1
  23. package/dist/beopBidAdapter.js +1 -1
  24. package/dist/bidglassBidAdapter.js +1 -1
  25. package/dist/big-richmediaBidAdapter.js +1 -1
  26. package/dist/bridgewellBidAdapter.js +1 -1
  27. package/dist/brightMountainMediaBidAdapter.js +1 -1
  28. package/dist/carodaBidAdapter.js +1 -1
  29. package/dist/chtnwBidAdapter.js +1 -1
  30. package/dist/conceptxBidAdapter.js +1 -0
  31. package/dist/concertBidAdapter.js +1 -1
  32. package/dist/connectIdSystem.js +1 -1
  33. package/dist/connectadBidAdapter.js +1 -1
  34. package/dist/consumableBidAdapter.js +1 -1
  35. package/dist/conversantAnalyticsAdapter.js +1 -1
  36. package/dist/conversantBidAdapter.js +1 -1
  37. package/dist/craftBidAdapter.js +1 -1
  38. package/dist/criteoBidAdapter.js +1 -1
  39. package/dist/cwireBidAdapter.js +1 -1
  40. package/dist/dependencies.json +6 -0
  41. package/dist/dspxBidAdapter.js +1 -1
  42. package/dist/eplanningBidAdapter.js +1 -1
  43. package/dist/eskimiBidAdapter.js +1 -1
  44. package/dist/euidIdSystem.js +1 -0
  45. package/dist/feedadBidAdapter.js +1 -1
  46. package/dist/finativeBidAdapter.js +1 -1
  47. package/dist/freepassIdSystem.js +1 -0
  48. package/dist/freewheel-sspBidAdapter.js +1 -1
  49. package/dist/gdprEnforcement.js +1 -1
  50. package/dist/glimpseBidAdapter.js +1 -1
  51. package/dist/gmosspBidAdapter.js +1 -1
  52. package/dist/goldbachBidAdapter.js +1 -1
  53. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  54. package/dist/greenbidsRtdProvider.js +1 -1
  55. package/dist/gridBidAdapter.js +1 -1
  56. package/dist/growthCodeRtdProvider.js +1 -0
  57. package/dist/gumgumBidAdapter.js +1 -1
  58. package/dist/h12mediaBidAdapter.js +1 -1
  59. package/dist/id5IdSystem.js +1 -1
  60. package/dist/improvedigitalBidAdapter.js +1 -1
  61. package/dist/inmarBidAdapter.js +1 -1
  62. package/dist/insticatorBidAdapter.js +1 -1
  63. package/dist/ixBidAdapter.js +1 -1
  64. package/dist/justpremiumBidAdapter.js +1 -1
  65. package/dist/kargoBidAdapter.js +1 -1
  66. package/dist/konduitAnalyticsAdapter.js +1 -1
  67. package/dist/kueezBidAdapter.js +1 -1
  68. package/dist/kueezRtbBidAdapter.js +1 -1
  69. package/dist/kulturemediaBidAdapter.js +1 -1
  70. package/dist/lassoBidAdapter.js +1 -1
  71. package/dist/lifestreetBidAdapter.js +1 -1
  72. package/dist/limelightDigitalBidAdapter.js +1 -1
  73. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  74. package/dist/logicadBidAdapter.js +1 -1
  75. package/dist/loglyliftBidAdapter.js +1 -1
  76. package/dist/magniteAnalyticsAdapter.js +1 -1
  77. package/dist/malltvAnalyticsAdapter.js +1 -1
  78. package/dist/marsmediaBidAdapter.js +1 -1
  79. package/dist/mediafuseBidAdapter.js +1 -1
  80. package/dist/mediasquareBidAdapter.js +1 -1
  81. package/dist/mgidBidAdapter.js +1 -1
  82. package/dist/minutemediaBidAdapter.js +1 -1
  83. package/dist/minutemediaplusBidAdapter.js +1 -1
  84. package/dist/nexx360BidAdapter.js +1 -1
  85. package/dist/not-for-prod/prebid.js +154 -146
  86. package/dist/objectGuard.js +1 -0
  87. package/dist/oguryBidAdapter.js +1 -1
  88. package/dist/onetagBidAdapter.js +1 -1
  89. package/dist/ooloAnalyticsAdapter.js +1 -1
  90. package/dist/optidigitalBidAdapter.js +1 -1
  91. package/dist/outbrainBidAdapter.js +1 -1
  92. package/dist/oxxionAnalyticsAdapter.js +1 -0
  93. package/dist/pairIdSystem.js +1 -1
  94. package/dist/parrableIdSystem.js +1 -1
  95. package/dist/pixfutureBidAdapter.js +1 -1
  96. package/dist/prebid-core.js +1 -1
  97. package/dist/proxistoreBidAdapter.js +1 -1
  98. package/dist/publinkIdSystem.js +1 -1
  99. package/dist/pubmaticBidAdapter.js +1 -1
  100. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  101. package/dist/pxyzBidAdapter.js +1 -1
  102. package/dist/quantcastBidAdapter.js +1 -1
  103. package/dist/readpeakBidAdapter.js +1 -1
  104. package/dist/relaidoBidAdapter.js +1 -1
  105. package/dist/retailspotBidAdapter.js +1 -1
  106. package/dist/rhythmoneBidAdapter.js +1 -1
  107. package/dist/richaudienceBidAdapter.js +1 -1
  108. package/dist/riseBidAdapter.js +1 -1
  109. package/dist/rtdModule.js +1 -1
  110. package/dist/rubiconAnalyticsAdapter.js +1 -1
  111. package/dist/rubiconBidAdapter.js +1 -1
  112. package/dist/schain.js +1 -1
  113. package/dist/seedingAllianceBidAdapter.js +1 -1
  114. package/dist/seedtagBidAdapter.js +1 -1
  115. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  116. package/dist/sharethroughBidAdapter.js +1 -1
  117. package/dist/shinezBidAdapter.js +1 -1
  118. package/dist/sirdataRtdProvider.js +1 -1
  119. package/dist/smaatoBidAdapter.js +1 -1
  120. package/dist/smartadserverBidAdapter.js +1 -1
  121. package/dist/smartxBidAdapter.js +1 -1
  122. package/dist/smilewantedBidAdapter.js +1 -1
  123. package/dist/sonobiBidAdapter.js +1 -1
  124. package/dist/sovrnAnalyticsAdapter.js +1 -1
  125. package/dist/sovrnBidAdapter.js +1 -1
  126. package/dist/sspBCBidAdapter.js +1 -1
  127. package/dist/stroeerCoreBidAdapter.js +1 -1
  128. package/dist/stvBidAdapter.js +1 -1
  129. package/dist/sublimeBidAdapter.js +1 -1
  130. package/dist/synacormediaBidAdapter.js +1 -1
  131. package/dist/targetVideoBidAdapter.js +1 -1
  132. package/dist/teadsBidAdapter.js +1 -1
  133. package/dist/trionBidAdapter.js +1 -1
  134. package/dist/tripleliftBidAdapter.js +1 -1
  135. package/dist/ttdBidAdapter.js +1 -1
  136. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  137. package/dist/uid2IdSystem.js +1 -1
  138. package/dist/uid2IdSystem_shared.js +1 -0
  139. package/dist/underdogmediaBidAdapter.js +1 -1
  140. package/dist/undertoneBidAdapter.js +1 -1
  141. package/dist/userId.js +1 -1
  142. package/dist/vidazooBidAdapter.js +1 -1
  143. package/dist/videobyteBidAdapter.js +1 -1
  144. package/dist/viouslyBidAdapter.js +1 -1
  145. package/dist/visxBidAdapter.js +1 -1
  146. package/dist/vuukleBidAdapter.js +1 -1
  147. package/dist/weboramaRtdProvider.js +1 -1
  148. package/dist/widespaceBidAdapter.js +1 -1
  149. package/dist/winrBidAdapter.js +1 -1
  150. package/dist/yahoosspBidAdapter.js +1 -1
  151. package/dist/yieldlabBidAdapter.js +1 -1
  152. package/dist/yieldmoBidAdapter.js +1 -1
  153. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  154. package/dist/zeta_global_sspBidAdapter.js +1 -1
  155. package/integrationExamples/gpt/growthcode.html +20 -9
  156. package/integrationExamples/gpt/userId_example.html +20 -6
  157. package/libraries/objectGuard/objectGuard.js +108 -0
  158. package/libraries/objectGuard/ortbGuard.js +88 -0
  159. package/modules/.submodules.json +3 -1
  160. package/modules/1plusXRtdProvider.js +31 -60
  161. package/modules/adagioBidAdapter.js +86 -24
  162. package/modules/adgenerationBidAdapter.js +14 -5
  163. package/modules/adkernelBidAdapter.js +2 -2
  164. package/modules/adriverIdSystem.js +1 -1
  165. package/modules/airgridRtdProvider.js +11 -12
  166. package/modules/allowActivities.js +74 -0
  167. package/modules/asoBidAdapter.js +2 -1
  168. package/modules/beopBidAdapter.js +6 -0
  169. package/modules/conceptxBidAdapter.js +70 -0
  170. package/modules/conceptxBidAdapter.md +36 -0
  171. package/modules/connectIdSystem.js +89 -13
  172. package/modules/connectIdSystem.md +4 -7
  173. package/modules/criteoBidAdapter.js +18 -2
  174. package/modules/eskimiBidAdapter.js +171 -41
  175. package/modules/eskimiBidAdapter.md +35 -16
  176. package/modules/euidIdSystem.js +121 -0
  177. package/modules/euidIdSystem.md +131 -0
  178. package/modules/freepassIdSystem.js +61 -0
  179. package/modules/freepassIdSystem.md +47 -0
  180. package/modules/gdprEnforcement.js +98 -169
  181. package/modules/greenbidsAnalyticsAdapter.js +1 -1
  182. package/modules/growthCodeRtdProvider.js +131 -0
  183. package/modules/growthCodeRtdProvider.md +55 -0
  184. package/modules/id5IdSystem.js +3 -5
  185. package/modules/ixBidAdapter.js +17 -3
  186. package/modules/limelightDigitalBidAdapter.js +1 -1
  187. package/modules/logicadBidAdapter.js +14 -1
  188. package/modules/mediasquareBidAdapter.js +13 -5
  189. package/modules/nexx360BidAdapter.js +1 -0
  190. package/modules/oxxionAnalyticsAdapter.js +212 -0
  191. package/modules/oxxionAnalyticsAdapter.md +33 -0
  192. package/modules/pairIdSystem.js +16 -11
  193. package/modules/proxistoreBidAdapter.js +11 -14
  194. package/modules/richaudienceBidAdapter.js +10 -1
  195. package/modules/riseBidAdapter.js +1 -1
  196. package/modules/rtdModule/index.js +12 -1
  197. package/modules/schain.js +2 -2
  198. package/modules/sharethroughBidAdapter.js +2 -2
  199. package/modules/sirdataRtdProvider.js +73 -146
  200. package/modules/smartadserverBidAdapter.js +5 -0
  201. package/modules/sovrnBidAdapter.js +4 -1
  202. package/modules/stroeerCoreBidAdapter.js +55 -6
  203. package/modules/stvBidAdapter.js +34 -1
  204. package/modules/uid2IdSystem.js +27 -210
  205. package/modules/uid2IdSystem.md +104 -23
  206. package/modules/uid2IdSystem_shared.js +232 -0
  207. package/modules/undertoneBidAdapter.js +9 -1
  208. package/modules/userId/eids.js +8 -0
  209. package/modules/userId/index.js +69 -41
  210. package/modules/userId/userId.md +2 -1
  211. package/modules/viouslyBidAdapter.js +2 -2
  212. package/modules/weboramaRtdProvider.js +25 -95
  213. package/modules/weboramaRtdProvider.md +4 -4
  214. package/modules/yahoosspBidAdapter.js +45 -3
  215. package/modules/yahoosspBidAdapter.md +1 -1
  216. package/modules/yieldlabBidAdapter.js +23 -14
  217. package/modules/zeta_global_sspBidAdapter.js +28 -22
  218. package/package.json +1 -1
  219. package/src/activities/activities.js +47 -0
  220. package/src/activities/activityParams.js +8 -0
  221. package/src/activities/modules.js +1 -1
  222. package/src/activities/params.js +59 -0
  223. package/src/activities/redactor.js +157 -0
  224. package/src/activities/rules.js +95 -0
  225. package/src/adapterManager.js +45 -8
  226. package/src/adloader.js +1 -0
  227. package/src/fpd/rootDomain.js +1 -1
  228. package/src/prebid.js +1 -1
  229. package/src/storageManager.js +57 -44
  230. package/src/userSync.js +35 -18
  231. package/test/spec/activities/allowActivites_spec.js +138 -0
  232. package/test/spec/activities/objectGuard_spec.js +144 -0
  233. package/test/spec/activities/ortbGuard_spec.js +140 -0
  234. package/test/spec/activities/params_spec.js +25 -0
  235. package/test/spec/activities/redactor_spec.js +296 -0
  236. package/test/spec/activities/rules_spec.js +135 -0
  237. package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
  238. package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
  239. package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -12
  240. package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
  241. package/test/spec/modules/beopBidAdapter_spec.js +24 -0
  242. package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
  243. package/test/spec/modules/connectIdSystem_spec.js +291 -23
  244. package/test/spec/modules/criteoBidAdapter_spec.js +85 -1
  245. package/test/spec/modules/eids_spec.js +15 -0
  246. package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
  247. package/test/spec/modules/euidIdSystem_spec.js +130 -0
  248. package/test/spec/modules/freepassIdSystem_spec.js +186 -0
  249. package/test/spec/modules/gdprEnforcement_spec.js +127 -414
  250. package/test/spec/modules/growthCodeRtdProvider_spec.js +127 -0
  251. package/test/spec/modules/id5IdSystem_spec.js +10 -3
  252. package/test/spec/modules/ixBidAdapter_spec.js +32 -1
  253. package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
  254. package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
  255. package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +324 -0
  256. package/test/spec/modules/pairIdSystem_spec.js +16 -3
  257. package/test/spec/modules/realTimeDataModule_spec.js +1 -1
  258. package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
  259. package/test/spec/modules/schain_spec.js +9 -0
  260. package/test/spec/modules/sharethroughBidAdapter_spec.js +1 -1
  261. package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
  262. package/test/spec/modules/smartadserverBidAdapter_spec.js +42 -0
  263. package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
  264. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
  265. package/test/spec/modules/stvBidAdapter_spec.js +13 -1
  266. package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
  267. package/test/spec/modules/uid2IdSystem_spec.js +131 -86
  268. package/test/spec/modules/undertoneBidAdapter_spec.js +57 -1
  269. package/test/spec/modules/userId_spec.js +96 -33
  270. package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
  271. package/test/spec/modules/yahoosspBidAdapter_spec.js +103 -51
  272. package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
  273. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +204 -4
  274. package/test/spec/unit/core/adapterManager_spec.js +181 -1
  275. package/test/spec/unit/core/storageManager_spec.js +76 -68
  276. package/test/spec/unit/pbjs_api_spec.js +15 -25
  277. package/test/spec/userSync_spec.js +45 -16
@@ -689,19 +689,8 @@ class WeboramaRtdProvider {
689
689
  /** @type {string} */
690
690
  const bidder = bidderAliasRegistry[bid.bidder] || bid.bidder;
691
691
 
692
- switch (bidder) {
693
- case 'appnexus':
694
- this.#handleAppnexusBid(bid, profile);
695
- break;
696
- case 'pubmatic':
697
- this.#handlePubmaticBid(bid, profile);
698
- break;
699
- case 'smartadserver':
700
- this.#handleSmartadserverBid(bid, profile);
701
- break;
702
- case 'rubicon':
703
- this.#handleRubiconBid(bid, profile, metadata);
704
- break;
692
+ if (bidder == 'appnexus') {
693
+ this.#handleAppnexusBid(reqBidsConfigObj, bid, profile);
705
694
  }
706
695
  }
707
696
 
@@ -719,92 +708,19 @@ class WeboramaRtdProvider {
719
708
  /** handle appnexus/xandr bid
720
709
  * @method
721
710
  * @private
711
+ * @param {Object} reqBidsConfigObj
712
+ * @param {Object} reqBidsConfigObj.ortb2Fragments
713
+ * @param {Object} reqBidsConfigObj.ortb2Fragments.bidder
722
714
  * @param {Object} bid
723
- * @param {Object} bid.params
724
- * @param {Object} bid.params.keyword
715
+ * @param {Object} bid.parameters
725
716
  * @param {Profile} profile
726
717
  * @returns {void}
727
718
  */
728
719
  // eslint-disable-next-line no-dupe-class-members
729
- #handleAppnexusBid(bid, profile) {
720
+ #handleAppnexusBid(reqBidsConfigObj, bid, profile) {
730
721
  const base = 'params.keywords';
731
722
  this.#assignProfileToObject(bid, base, profile);
732
- }
733
-
734
- /** handle pubmatic bid
735
- * @method
736
- * @private
737
- * @param {Object} bid
738
- * @param {Object} bid.params
739
- * @param {string} bid.params.dctr
740
- * @param {Profile} profile
741
- * @returns {void}
742
- */
743
- // eslint-disable-next-line no-dupe-class-members
744
- #handlePubmaticBid(bid, profile) {
745
- const sep = '|';
746
- const subsep = ',';
747
-
748
- bid.params ||= {};
749
-
750
- const data = bid.params.dctr || '';
751
- const target = new Set(data.split(sep).filter((x) => x.length > 0));
752
-
753
- Object.entries(profile).forEach(([key, values]) => {
754
- const value = values.join(subsep);
755
- const keyword = `${key}=${value}`;
756
- target.add(keyword);
757
- });
758
-
759
- bid.params.dctr = Array.from(target).join(sep);
760
- }
761
-
762
- /** handle smartadserver bid
763
- * @method
764
- * @private
765
- * @param {Object} bid
766
- * @param {Object} bid.params
767
- * @param {string} bid.params.target
768
- * @param {Profile} profile
769
- * @returns {void}
770
- */
771
- // eslint-disable-next-line no-dupe-class-members
772
- #handleSmartadserverBid(bid, profile) {
773
- const sep = ';';
774
-
775
- bid.params ||= {};
776
-
777
- const data = bid.params.target || '';
778
- const target = new Set(data.split(sep).filter((x) => x.length > 0));
779
-
780
- Object.entries(profile).forEach(([key, values]) => {
781
- values.forEach(value => {
782
- const keyword = `${key}=${value}`;
783
- target.add(keyword);
784
- })
785
- });
786
-
787
- bid.params.target = Array.from(target).join(sep);
788
- }
789
-
790
- /** handle rubicon bid
791
- * @method
792
- * @private
793
- * @param {Object} bid
794
- * @param {string} bid.bidder
795
- * @param {Profile} profile
796
- * @param {dataCallbackMetadata} metadata
797
- * @returns {void}
798
- */
799
- // eslint-disable-next-line no-dupe-class-members
800
- #handleRubiconBid(bid, profile, metadata) {
801
- if (isBoolean(metadata.user)) {
802
- const section = metadata.user ? 'visitor' : 'inventory';
803
- const base = `params.${section}`;
804
- this.#assignProfileToObject(bid, base, profile);
805
- } else {
806
- logMessage(`SKIP bidder '${bid.bidder}', data from '${metadata.source}' is not defined as user or site-centric`);
807
- }
723
+ // this.#setBidderOrtb2(reqBidsConfigObj.ortb2Fragments?.bidder, bid.bidder, base, profile);
808
724
  }
809
725
 
810
726
  /** handle generic bid via ortb2 arbitrary data
@@ -823,14 +739,28 @@ class WeboramaRtdProvider {
823
739
  if (isBoolean(metadata.user)) {
824
740
  logMessage(`bidder '${bidder}' is not directly supported, trying set data via bidder ortb2 fpd`);
825
741
  const section = metadata.user ? 'user' : 'site';
826
- const base = `${bidder}.${section}.ext.data`;
742
+ const path = `${section}.ext.data`;
827
743
 
828
- this.#assignProfileToObject(reqBidsConfigObj.ortb2Fragments?.bidder, base, profile);
744
+ this.#setBidderOrtb2(reqBidsConfigObj.ortb2Fragments?.bidder, bidder, path, profile)
829
745
  } else {
830
746
  logMessage(`SKIP unsupported bidder '${bidder}', data from '${metadata.source}' is not defined as user or site-centric`);
831
747
  }
832
748
  }
833
-
749
+ /**
750
+ * set bidder ortb2 data
751
+ * @method
752
+ * @private
753
+ * @param {Object} bidderOrtb2Fragments
754
+ * @param {string} bidder
755
+ * @param {string} path
756
+ * @param {Profile} profile
757
+ * @returns {void}
758
+ */
759
+ // eslint-disable-next-line no-dupe-class-members
760
+ #setBidderOrtb2(bidderOrtb2Fragments, bidder, path, profile) {
761
+ const base = `${bidder}.${path}`;
762
+ this.#assignProfileToObject(bidderOrtb2Fragments, base, profile)
763
+ }
834
764
  /**
835
765
  * assign profile to object
836
766
  * @method
@@ -575,12 +575,9 @@ pbjs.que.push(function () {
575
575
 
576
576
  ### Supported Bidders
577
577
 
578
- We currently support the following bidder adapters:
578
+ We currently support the following bidder adapters with dedicated code:
579
579
 
580
- * SmartADServer SSP
581
- * PubMatic SSP
582
580
  * AppNexus SSP
583
- * Rubicon SSP
584
581
 
585
582
  We also set the bidder (and global, if no specific bidders are set on `sendToBidders`) ortb2 `site.ext.data` and `user.ext.data` sections (as arbitrary data). The following bidders may support it, to be sure, check the `First Party Data Support` on the feature list for the particular bidder from [here](https://docs.prebid.org/dev-docs/bidders).
586
583
 
@@ -605,8 +602,11 @@ We also set the bidder (and global, if no specific bidders are set on `sendToBid
605
602
  * Opt Out Advertising
606
603
  * Ozone Project
607
604
  * Proxistore
605
+ * PubMatic SSP
608
606
  * Rise
607
+ * Rubicon SSP
609
608
  * Smaato
609
+ * Smart ADServer SSP
610
610
  * Sonobi
611
611
  * TheMediaGrid
612
612
  * TripleLift
@@ -101,6 +101,37 @@ function extractUserSyncUrls(syncOptions, pixels) {
101
101
  return userSyncObjects;
102
102
  }
103
103
 
104
+ /**
105
+ * @param {string} url
106
+ * @param {object} consentData
107
+ * @param {object} consentData.gpp
108
+ * @param {string} consentData.gpp.gppConsent
109
+ * @param {array} consentData.gpp.applicableSections
110
+ * @param {object} consentData.gdpr
111
+ * @param {object} consentData.gdpr.consentString
112
+ * @param {object} consentData.gdpr.gdprApplies
113
+ * @param {string} consentData.uspConsent
114
+ */
115
+ function updateConsentQueryParams(url, consentData) {
116
+ const parameterMap = {
117
+ 'gdpr_consent': consentData.gdpr.consentString,
118
+ 'gdpr': consentData.gdpr.gdprApplies ? '1' : '0',
119
+ 'us_privacy': consentData.uspConsent,
120
+ 'gpp': consentData.gpp.gppString,
121
+ 'gpp_sid': consentData.gpp.applicableSections ? consentData.gpp.applicableSections.join(',') : ''
122
+ }
123
+
124
+ const existingUrl = new URL(url);
125
+ const params = existingUrl.searchParams;
126
+
127
+ for (const [key, value] of Object.entries(parameterMap)) {
128
+ params.set(key, value);
129
+ }
130
+
131
+ existingUrl.search = params.toString();
132
+ return existingUrl.toString();
133
+ };
134
+
104
135
  function getSupportedEids(bid) {
105
136
  if (isArray(deepAccess(bid, 'userIdAsEids'))) {
106
137
  return bid.userIdAsEids.filter(eid => {
@@ -244,7 +275,9 @@ function generateOpenRtbObject(bidderRequest, bid) {
244
275
  regs: {
245
276
  ext: {
246
277
  'us_privacy': bidderRequest.uspConsent ? bidderRequest.uspConsent : '',
247
- gdpr: bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? 1 : 0
278
+ gdpr: bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? 1 : 0,
279
+ gpp: bidderRequest.gppConsent.gppString,
280
+ gpp_sid: bidderRequest.gppConsent.applicableSections
248
281
  }
249
282
  },
250
283
  source: {
@@ -518,6 +551,7 @@ function createRenderer(bidderRequest, bidResponse) {
518
551
  }
519
552
  return renderer;
520
553
  }
554
+
521
555
  /* Utility functions */
522
556
 
523
557
  export const spec = {
@@ -634,11 +668,19 @@ export const spec = {
634
668
  return response;
635
669
  },
636
670
 
637
- getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
671
+ getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) {
638
672
  const bidResponse = !isEmpty(serverResponses) && serverResponses[0].body;
639
673
 
640
674
  if (bidResponse && bidResponse.ext && bidResponse.ext.pixels) {
641
- return extractUserSyncUrls(syncOptions, bidResponse.ext.pixels);
675
+ const userSyncObjects = extractUserSyncUrls(syncOptions, bidResponse.ext.pixels);
676
+ userSyncObjects.forEach(userSyncObject => {
677
+ userSyncObject.url = updateConsentQueryParams(userSyncObject.url, {
678
+ gpp: gppConsent,
679
+ gdpr: gdprConsent,
680
+ uspConsent: uspConsent
681
+ });
682
+ });
683
+ return userSyncObjects;
642
684
  }
643
685
 
644
686
  return [];
@@ -827,6 +827,6 @@ const adUnits = [{
827
827
  This adapter does not support passing legacy overrides via 'bidder.params.ext' since most of the data should be passed using prebid modules (First Party Data, Schain, Price Floors etc.).
828
828
  If you do not know how to pass a custom parameter that you previously used, please contact us using the information provided above.
829
829
 
830
- Thanks you,
830
+ Thank you,
831
831
  Yahoo SSP
832
832
 
@@ -12,6 +12,8 @@ const CURRENCY_CODE = 'EUR';
12
12
  const OUTSTREAMPLAYER_URL = 'https://ad.adition.com/dynamic.ad?a=o193092&ma_loadEvent=ma-start-event';
13
13
  const GVLID = 70;
14
14
  const DIMENSION_SIGN = 'x';
15
+ const IMG_TYPE_ICON = 1;
16
+ const IMG_TYPE_MAIN = 3;
15
17
 
16
18
  export const spec = {
17
19
  code: BIDDER_CODE,
@@ -183,24 +185,33 @@ export const spec = {
183
185
  }
184
186
 
185
187
  if (isNative(bidRequest, adType)) {
186
- // there may be publishers still rely on it
188
+ const { native } = matchedBid;
189
+ const { assets } = native;
187
190
  bidResponse.adUrl = `${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}${pvId}`;
188
191
  bidResponse.mediaType = NATIVE;
189
- const nativeImageAssetObj = find(matchedBid.native.assets, asset => isMainImage(asset));
192
+ const nativeIconAssetObj = find(assets, isImageAssetOfType(IMG_TYPE_ICON));
193
+ const nativeImageAssetObj = find(assets, isImageAssetOfType(IMG_TYPE_MAIN));
190
194
  const nativeImageAsset = nativeImageAssetObj ? nativeImageAssetObj.img : { url: '', w: 0, h: 0 };
191
- const nativeTitleAsset = find(matchedBid.native.assets, asset => hasValidProperty(asset, 'title'));
192
- const nativeBodyAsset = find(matchedBid.native.assets, asset => hasValidProperty(asset, 'data'));
195
+ const nativeTitleAsset = find(assets, asset => hasValidProperty(asset, 'title'));
196
+ const nativeBodyAsset = find(assets, asset => hasValidProperty(asset, 'data'));
193
197
  bidResponse.native = {
194
198
  title: nativeTitleAsset ? nativeTitleAsset.title.text : '',
195
199
  body: nativeBodyAsset ? nativeBodyAsset.data.value : '',
200
+ ...nativeIconAssetObj?.img && {
201
+ icon: {
202
+ url: nativeIconAssetObj.img.url,
203
+ width: nativeIconAssetObj.img.w,
204
+ height: nativeIconAssetObj.img.h,
205
+ },
206
+ },
196
207
  image: {
197
208
  url: nativeImageAsset.url,
198
209
  width: nativeImageAsset.w,
199
210
  height: nativeImageAsset.h,
200
211
  },
201
- clickUrl: matchedBid.native.link.url,
202
- impressionTrackers: matchedBid.native.imptrackers,
203
- assets: matchedBid.native.assets,
212
+ clickUrl: native.link.url,
213
+ impressionTrackers: native.imptrackers,
214
+ assets: assets,
204
215
  };
205
216
  }
206
217
 
@@ -517,14 +528,12 @@ function hasValidProperty(obj, propName) {
517
528
  }
518
529
 
519
530
  /**
520
- * Checks if an asset object is a main image.
521
- * A main image is defined as an image asset whose type value is 3.
522
- *
523
- * @param {Object} asset - The asset object to check.
524
- * @returns {boolean} Returns true if the object has a property img.type with a value of 3, otherwise false.
531
+ * Returns a filtering function for image assets based on type.
532
+ * @param {number} type - The desired asset type to filter for i.e. IMG_TYPE_ICON = 1, IMG_TYPE_MAIN = 3
533
+ * @returns {function} - A filtering function that accepts an asset and checks if its img.type matches the desired type.
525
534
  */
526
- function isMainImage(asset) {
527
- return asset?.img?.type === 3
535
+ function isImageAssetOfType(type) {
536
+ return asset => asset?.img?.type === type;
528
537
  }
529
538
 
530
539
  registerBidder(spec);
@@ -11,11 +11,9 @@ const TIMEOUT_URL = 'https://ssp.disqus.com/timeout/prebid';
11
11
  const USER_SYNC_URL_IFRAME = 'https://ssp.disqus.com/sync?type=iframe';
12
12
  const USER_SYNC_URL_IMAGE = 'https://ssp.disqus.com/sync?type=image';
13
13
  const DEFAULT_CUR = 'USD';
14
- const TTL = 200;
14
+ const TTL = 300;
15
15
  const NET_REV = true;
16
16
 
17
- const VIDEO_REGEX = new RegExp(/VAST\s+version/);
18
-
19
17
  const DATA_TYPES = {
20
18
  'NUMBER': 'number',
21
19
  'STRING': 'string',
@@ -36,6 +34,7 @@ const VIDEO_CUSTOM_PARAMS = {
36
34
  'battr': DATA_TYPES.ARRAY,
37
35
  'linearity': DATA_TYPES.NUMBER,
38
36
  'placement': DATA_TYPES.NUMBER,
37
+ 'plcmt': DATA_TYPES.NUMBER,
39
38
  'minbitrate': DATA_TYPES.NUMBER,
40
39
  'maxbitrate': DATA_TYPES.NUMBER,
41
40
  'skip': DATA_TYPES.NUMBER
@@ -200,7 +199,10 @@ export const spec = {
200
199
  advertiserDomains: zetaBid.adomain
201
200
  };
202
201
  }
203
- provideMediaType(zetaBid, bid);
202
+ provideMediaType(zetaBid, bid, bidRequest.data);
203
+ if (bid.mediaType === VIDEO) {
204
+ bid.vastXml = bid.ad;
205
+ }
204
206
  bidResponses.push(bid);
205
207
  })
206
208
  })
@@ -263,10 +265,24 @@ function buildBanner(request) {
263
265
  request.mediaTypes.banner.sizes) {
264
266
  sizes = request.mediaTypes.banner.sizes;
265
267
  }
266
- return {
267
- w: sizes[0][0],
268
- h: sizes[0][1]
269
- };
268
+ if (sizes.length > 1) {
269
+ const format = sizes.map(s => {
270
+ return {
271
+ w: s[0],
272
+ h: s[1]
273
+ }
274
+ });
275
+ return {
276
+ w: sizes[0][0],
277
+ h: sizes[0][1],
278
+ format: format
279
+ }
280
+ } else {
281
+ return {
282
+ w: sizes[0][0],
283
+ h: sizes[0][1]
284
+ }
285
+ }
270
286
  }
271
287
 
272
288
  function buildVideo(request) {
@@ -318,21 +334,11 @@ function provideEids(request, payload) {
318
334
  }
319
335
  }
320
336
 
321
- function provideMediaType(zetaBid, bid) {
322
- if (zetaBid.ext && zetaBid.ext.bidtype) {
323
- if (zetaBid.ext.bidtype === VIDEO) {
324
- bid.mediaType = VIDEO;
325
- bid.vastXml = bid.ad;
326
- } else {
327
- bid.mediaType = BANNER;
328
- }
337
+ function provideMediaType(zetaBid, bid, bidRequest) {
338
+ if (zetaBid.ext && zetaBid.ext.prebid && zetaBid.ext.prebid.type) {
339
+ bid.mediaType = zetaBid.ext.prebid.type === VIDEO ? VIDEO : BANNER;
329
340
  } else {
330
- if (VIDEO_REGEX.test(bid.ad)) {
331
- bid.mediaType = VIDEO;
332
- bid.vastXml = bid.ad;
333
- } else {
334
- bid.mediaType = BANNER;
335
- }
341
+ bid.mediaType = bidRequest.imp[0].video ? VIDEO : BANNER;
336
342
  }
337
343
  }
338
344
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "7.51.0",
3
+ "version": "7.53.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Activity (that are relevant for privacy) definitions
3
+ *
4
+ * ref. https://docs.google.com/document/d/1dRxFUFmhh2jGanzGZvfkK_6jtHPpHXWD7Qsi6KEugeE
5
+ * & https://github.com/prebid/Prebid.js/issues/9546
6
+ */
7
+
8
+ /**
9
+ * accessDevice: some component wants to read or write to localStorage or cookies.
10
+ */
11
+ export const ACTIVITY_ACCESS_DEVICE = 'accessDevice';
12
+ /**
13
+ * syncUser: A bid adapter wants to run a user sync.
14
+ */
15
+ export const ACTIVITY_SYNC_USER = 'syncUser';
16
+ /**
17
+ * enrichUfpd: some component wants to add user first-party data to bid requests.
18
+ */
19
+ export const ACTIVITY_ENRICH_UFPD = 'enrichUfpd';
20
+ /**
21
+ * enrichEids: some component wants to add user IDs to bid requests.
22
+ */
23
+ export const ACTIVITY_ENRICH_EIDS = 'enrichEids';
24
+ /**
25
+ * fetchBid: a bidder wants to bid.
26
+ */
27
+ export const ACTIVITY_FETCH_BIDS = 'fetchBids';
28
+
29
+ /**
30
+ * reportAnalytics: some component wants to phone home with analytics data.
31
+ */
32
+ export const ACTIVITY_REPORT_ANALYTICS = 'reportAnalytics';
33
+
34
+ /**
35
+ * some component wants access to (and send along) user IDs
36
+ */
37
+ export const ACTIVITY_TRANSMIT_EIDS = 'transmitEids'
38
+
39
+ /**
40
+ * transmitUfpd: some component wants access to (and send along) user FPD
41
+ */
42
+ export const ACTIVITY_TRANSMIT_UFPD = 'transmitUfpd';
43
+
44
+ /**
45
+ * transmitPreciseGeo: some component wants access to (and send along) geolocation info
46
+ */
47
+ export const ACTIVITY_TRANSMIT_PRECISE_GEO = 'transmitPreciseGeo';
@@ -0,0 +1,8 @@
1
+ import adapterManager from '../adapterManager.js';
2
+ import {activityParamsBuilder} from './params.js';
3
+
4
+ /**
5
+ * Utility function for building common activity parameters - broken out to its own
6
+ * file to avoid circular imports.
7
+ */
8
+ export const activityParams = activityParamsBuilder((alias) => adapterManager.resolveAlias(alias));
@@ -1,4 +1,4 @@
1
- export const MODULE_TYPE_CORE = 'core';
1
+ export const MODULE_TYPE_PREBID = 'prebid';
2
2
  export const MODULE_TYPE_BIDDER = 'bidder';
3
3
  export const MODULE_TYPE_UID = 'userId';
4
4
  export const MODULE_TYPE_RTD = 'rtd';
@@ -0,0 +1,59 @@
1
+ import {MODULE_TYPE_BIDDER} from './modules.js';
2
+
3
+ /**
4
+ * Component ID - who is trying to perform the activity?
5
+ * Relevant for all activities.
6
+ */
7
+ export const ACTIVITY_PARAM_COMPONENT = 'component';
8
+ export const ACTIVITY_PARAM_COMPONENT_TYPE = ACTIVITY_PARAM_COMPONENT + 'Type';
9
+ export const ACTIVITY_PARAM_COMPONENT_NAME = ACTIVITY_PARAM_COMPONENT + 'Name';
10
+
11
+ /**
12
+ * Code of the bid adapter that `componentName` is an alias of.
13
+ * May be the same as the component name.
14
+ *
15
+ * relevant for all activities, but only when componentType is 'bidder'.
16
+ */
17
+ export const ACTIVITY_PARAM_ADAPTER_CODE = 'adapterCode';
18
+
19
+ /**
20
+ * Storage type - either 'html5' or 'cookie'.
21
+ * Relevant for: accessDevice
22
+ */
23
+ export const ACTIVITY_PARAM_STORAGE_TYPE = 'storageType';
24
+
25
+ /**
26
+ * s2sConfig[].configName, used to identify a particular s2s instance
27
+ * relevant for: fetchBids, but only when component is 'prebid.pbsBidAdapter'
28
+ */
29
+ export const ACTIVITY_PARAM_S2S_NAME = 'configName';
30
+ /**
31
+ * user sync type - 'iframe' or 'pixel'
32
+ * relevant for: syncUser
33
+ */
34
+ export const ACTIVITY_PARAM_SYNC_TYPE = 'syncType'
35
+ /**
36
+ * user sync URL
37
+ * relevant for: syncUser
38
+ */
39
+ export const ACTIVITY_PARAM_SYNC_URL = 'syncUrl';
40
+ /**
41
+ * @private
42
+ * configuration options for analytics adapter - the argument passed to `enableAnalytics`.
43
+ * relevant for: reportAnalytics
44
+ */
45
+ export const ACTIVITY_PARAM_ANL_CONFIG = '_config';
46
+
47
+ export function activityParamsBuilder(resolveAlias) {
48
+ return function activityParams(moduleType, moduleName, params) {
49
+ const defaults = {
50
+ [ACTIVITY_PARAM_COMPONENT_TYPE]: moduleType,
51
+ [ACTIVITY_PARAM_COMPONENT_NAME]: moduleName,
52
+ [ACTIVITY_PARAM_COMPONENT]: `${moduleType}.${moduleName}`
53
+ };
54
+ if (moduleType === MODULE_TYPE_BIDDER) {
55
+ defaults[ACTIVITY_PARAM_ADAPTER_CODE] = resolveAlias(moduleName);
56
+ }
57
+ return Object.assign(defaults, params);
58
+ }
59
+ }