prebid.js 7.25.0 → 7.27.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 (353) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adWMGAnalyticsAdapter.js +1 -1
  4. package/dist/adagioAnalyticsAdapter.js +1 -1
  5. package/dist/adagioBidAdapter.js +1 -1
  6. package/dist/adbookpspBidAdapter.js +1 -1
  7. package/dist/adgenerationBidAdapter.js +1 -1
  8. package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
  9. package/dist/adlooxAdServerVideo.js +1 -1
  10. package/dist/adlooxAnalyticsAdapter.js +1 -1
  11. package/dist/adlooxRtdProvider.js +1 -1
  12. package/dist/admaticBidAdapter.js +1 -1
  13. package/dist/admixerBidAdapter.js +1 -1
  14. package/dist/adomikAnalyticsAdapter.js +1 -1
  15. package/dist/adrelevantisBidAdapter.js +1 -1
  16. package/dist/adtrgtmeBidAdapter.js +1 -1
  17. package/dist/adxcgAnalyticsAdapter.js +1 -1
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adxpremiumAnalyticsAdapter.js +1 -1
  20. package/dist/aidemBidAdapter.js +1 -0
  21. package/dist/ajaBidAdapter.js +1 -1
  22. package/dist/amxBidAdapter.js +1 -1
  23. package/dist/amxIdSystem.js +1 -1
  24. package/dist/analyticsAdapter.js +1 -1
  25. package/dist/appierAnalyticsAdapter.js +1 -1
  26. package/dist/appnexusBidAdapter.js +1 -1
  27. package/dist/asoBidAdapter.js +1 -1
  28. package/dist/atsAnalyticsAdapter.js +1 -1
  29. package/dist/axonixBidAdapter.js +1 -1
  30. package/dist/beopBidAdapter.js +1 -1
  31. package/dist/bidViewability.js +1 -1
  32. package/dist/bidglassBidAdapter.js +1 -1
  33. package/dist/bidwatchAnalyticsAdapter.js +1 -1
  34. package/dist/big-richmediaBidAdapter.js +1 -1
  35. package/dist/bridgewellBidAdapter.js +1 -1
  36. package/dist/brightMountainMediaBidAdapter.js +1 -1
  37. package/dist/browsiRtdProvider.js +1 -1
  38. package/dist/bucksenseBidAdapter.js +1 -1
  39. package/dist/byDataAnalyticsAdapter.js +1 -1
  40. package/dist/captifyRtdProvider.js +1 -0
  41. package/dist/carodaBidAdapter.js +1 -1
  42. package/dist/chtnwBidAdapter.js +1 -1
  43. package/dist/concertAnalyticsAdapter.js +1 -1
  44. package/dist/concertBidAdapter.js +1 -1
  45. package/dist/connectadBidAdapter.js +1 -1
  46. package/dist/consentManagement.js +1 -1
  47. package/dist/consentManagementUsp.js +1 -1
  48. package/dist/consumableBidAdapter.js +1 -1
  49. package/dist/conversantAnalyticsAdapter.js +1 -1
  50. package/dist/conversantBidAdapter.js +1 -1
  51. package/dist/craftBidAdapter.js +1 -1
  52. package/dist/criteoBidAdapter.js +1 -1
  53. package/dist/datablocksAnalyticsAdapter.js +1 -1
  54. package/dist/dependencies.json +6 -0
  55. package/dist/dfpAdServerVideo.js +1 -1
  56. package/dist/discoveryBidAdapter.js +1 -1
  57. package/dist/dspxBidAdapter.js +1 -1
  58. package/dist/eplanningAnalyticsAdapter.js +1 -1
  59. package/dist/eplanningBidAdapter.js +1 -1
  60. package/dist/finativeBidAdapter.js +1 -1
  61. package/dist/fintezaAnalyticsAdapter.js +1 -1
  62. package/dist/fluctBidAdapter.js +1 -1
  63. package/dist/ftrackIdSystem.js +1 -1
  64. package/dist/gdprEnforcement.js +1 -1
  65. package/dist/genericAnalyticsAdapter.js +1 -0
  66. package/dist/geoedgeRtdProvider.js +1 -1
  67. package/dist/glimpseBidAdapter.js +1 -1
  68. package/dist/glomexBidAdapter.js +1 -1
  69. package/dist/gmosspBidAdapter.js +1 -1
  70. package/dist/goldbachBidAdapter.js +1 -1
  71. package/dist/googleAnalyticsAdapter.js +1 -1
  72. package/dist/gravitoIdSystem.js +1 -1
  73. package/dist/gridBidAdapter.js +1 -1
  74. package/dist/gridNMBidAdapter.js +1 -1
  75. package/dist/growthCodeAnalyticsAdapter.js +1 -0
  76. package/dist/gumgumBidAdapter.js +1 -1
  77. package/dist/h12mediaBidAdapter.js +1 -1
  78. package/dist/hadronAnalyticsAdapter.js +1 -1
  79. package/dist/id5AnalyticsAdapter.js +1 -1
  80. package/dist/id5IdSystem.js +1 -1
  81. package/dist/impactifyBidAdapter.js +1 -1
  82. package/dist/improvedigitalBidAdapter.js +1 -1
  83. package/dist/inmarBidAdapter.js +1 -1
  84. package/dist/insticatorBidAdapter.js +1 -1
  85. package/dist/invisiblyAnalyticsAdapter.js +1 -1
  86. package/dist/ixBidAdapter.js +1 -1
  87. package/dist/justpremiumBidAdapter.js +1 -1
  88. package/dist/jwplayerRtdProvider.js +1 -1
  89. package/dist/kargoAnalyticsAdapter.js +1 -1
  90. package/dist/kinessoIdSystem.js +1 -1
  91. package/dist/konduitAnalyticsAdapter.js +1 -1
  92. package/dist/kueezBidAdapter.js +1 -1
  93. package/dist/kueezRtbBidAdapter.js +1 -1
  94. package/dist/lassoBidAdapter.js +1 -1
  95. package/dist/lifestreetBidAdapter.js +1 -1
  96. package/dist/limelightDigitalBidAdapter.js +1 -1
  97. package/dist/liveIntentAnalyticsAdapter.js +1 -1
  98. package/dist/liveIntentIdSystem.js +1 -1
  99. package/dist/livewrappedAnalyticsAdapter.js +1 -1
  100. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  101. package/dist/logicadBidAdapter.js +1 -1
  102. package/dist/loglyliftBidAdapter.js +1 -1
  103. package/dist/lotamePanoramaIdSystem.js +1 -1
  104. package/dist/magniteAnalyticsAdapter.js +1 -1
  105. package/dist/malltvAnalyticsAdapter.js +1 -1
  106. package/dist/marsmediaAnalyticsAdapter.js +1 -1
  107. package/dist/marsmediaBidAdapter.js +1 -1
  108. package/dist/mediafuseBidAdapter.js +1 -1
  109. package/dist/medianetAnalyticsAdapter.js +1 -1
  110. package/dist/mediasquareBidAdapter.js +1 -1
  111. package/dist/mgidBidAdapter.js +1 -1
  112. package/dist/minutemediaBidAdapter.js +1 -1
  113. package/dist/nextMillenniumBidAdapter.js +1 -1
  114. package/dist/nexx360BidAdapter.js +1 -1
  115. package/dist/not-for-prod/prebid.js +240 -202
  116. package/dist/oguryBidAdapter.js +1 -1
  117. package/dist/onetagBidAdapter.js +1 -1
  118. package/dist/ooloAnalyticsAdapter.js +1 -1
  119. package/dist/openxAnalyticsAdapter.js +1 -1
  120. package/dist/optimonAnalyticsAdapter.js +1 -1
  121. package/dist/outbrainBidAdapter.js +1 -1
  122. package/dist/parrableIdSystem.js +1 -1
  123. package/dist/pbsExtensions.js +1 -1
  124. package/dist/pianoDmpAnalyticsAdapter.js +1 -1
  125. package/dist/pixfutureBidAdapter.js +1 -1
  126. package/dist/prebid-core.js +1 -1
  127. package/dist/prebidServerBidAdapter.js +1 -1
  128. package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
  129. package/dist/pubCommonId.js +1 -1
  130. package/dist/pubProvidedIdSystem.js +1 -1
  131. package/dist/publinkIdSystem.js +1 -1
  132. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  133. package/dist/pubmaticBidAdapter.js +1 -1
  134. package/dist/pubperfAnalyticsAdapter.js +1 -1
  135. package/dist/pubstackAnalyticsAdapter.js +1 -1
  136. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  137. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  138. package/dist/pulsepointAnalyticsAdapter.js +1 -1
  139. package/dist/pxyzBidAdapter.js +1 -1
  140. package/dist/quantcastBidAdapter.js +1 -1
  141. package/dist/quantcastIdSystem.js +1 -1
  142. package/dist/rasBidAdapter.js +1 -1
  143. package/dist/readpeakBidAdapter.js +1 -1
  144. package/dist/realvuAnalyticsAdapter.js +1 -1
  145. package/dist/redtramBidAdapter.js +1 -0
  146. package/dist/relaidoBidAdapter.js +1 -1
  147. package/dist/relevantAnalyticsAdapter.js +1 -1
  148. package/dist/rhythmoneBidAdapter.js +1 -1
  149. package/dist/riseBidAdapter.js +1 -1
  150. package/dist/rivrAnalyticsAdapter.js +1 -1
  151. package/dist/roxotAnalyticsAdapter.js +1 -1
  152. package/dist/rtbhouseBidAdapter.js +1 -1
  153. package/dist/rtdModule.js +1 -1
  154. package/dist/rubiconAnalyticsAdapter.js +1 -1
  155. package/dist/rubiconBidAdapter.js +1 -1
  156. package/dist/s2sTesting.js +1 -1
  157. package/dist/scaleableAnalyticsAdapter.js +1 -1
  158. package/dist/schain.js +1 -1
  159. package/dist/seedingAllianceBidAdapter.js +1 -1
  160. package/dist/seedtagBidAdapter.js +1 -1
  161. package/dist/sharedIdSystem.js +1 -1
  162. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  163. package/dist/sharethroughBidAdapter.js +1 -1
  164. package/dist/shinezBidAdapter.js +1 -1
  165. package/dist/sigmoidAnalyticsAdapter.js +1 -1
  166. package/dist/smaatoBidAdapter.js +1 -1
  167. package/dist/smartadserverBidAdapter.js +1 -1
  168. package/dist/smartxBidAdapter.js +1 -1
  169. package/dist/smartytechBidAdapter.js +1 -0
  170. package/dist/smilewantedBidAdapter.js +1 -1
  171. package/dist/sonobiAnalyticsAdapter.js +1 -1
  172. package/dist/sonobiBidAdapter.js +1 -1
  173. package/dist/sovrnAnalyticsAdapter.js +1 -1
  174. package/dist/sovrnBidAdapter.js +1 -1
  175. package/dist/sspBCBidAdapter.js +1 -1
  176. package/dist/staqAnalyticsAdapter.js +1 -1
  177. package/dist/sublimeBidAdapter.js +1 -1
  178. package/dist/synacormediaBidAdapter.js +1 -1
  179. package/dist/taboolaBidAdapter.js +1 -1
  180. package/dist/tapadIdSystem.js +1 -1
  181. package/dist/tappxBidAdapter.js +1 -1
  182. package/dist/targetVideoBidAdapter.js +1 -1
  183. package/dist/teadsBidAdapter.js +1 -1
  184. package/dist/teadsIdSystem.js +1 -1
  185. package/dist/terceptAnalyticsAdapter.js +1 -1
  186. package/dist/trionBidAdapter.js +1 -1
  187. package/dist/tripleliftBidAdapter.js +1 -1
  188. package/dist/ttdBidAdapter.js +1 -1
  189. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  190. package/dist/underdogmediaBidAdapter.js +1 -1
  191. package/dist/undertoneBidAdapter.js +1 -1
  192. package/dist/userId.js +1 -1
  193. package/dist/vidazooBidAdapter.js +1 -1
  194. package/dist/videobyteBidAdapter.js +1 -1
  195. package/dist/viqeoBidAdapter.js +1 -0
  196. package/dist/visxBidAdapter.js +1 -1
  197. package/dist/vuukleBidAdapter.js +1 -1
  198. package/dist/weboramaRtdProvider.js +1 -1
  199. package/dist/widespaceBidAdapter.js +1 -1
  200. package/dist/winrBidAdapter.js +1 -1
  201. package/dist/yahoosspBidAdapter.js +1 -1
  202. package/dist/yandexBidAdapter.js +1 -1
  203. package/dist/yieldlabBidAdapter.js +1 -1
  204. package/dist/yieldliftBidAdapter.js +1 -1
  205. package/dist/yieldmoBidAdapter.js +1 -1
  206. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  207. package/dist/yuktamediaAnalyticsAdapter.js +1 -1
  208. package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
  209. package/dist/zeta_global_sspBidAdapter.js +1 -1
  210. package/dist/zeusPrimeRtdProvider.js +31 -0
  211. package/integrationExamples/gpt/captifyRtdProvider_example.html +167 -0
  212. package/integrationExamples/gpt/growthcode.html +134 -0
  213. package/libraries/analyticsAdapter/AnalyticsAdapter.js +95 -102
  214. package/modules/.submodules.json +3 -1
  215. package/modules/admaticBidAdapter.js +116 -58
  216. package/modules/admaticBidAdapter.md +2 -2
  217. package/modules/admixerBidAdapter.js +1 -1
  218. package/modules/aidemBidAdapter.js +492 -0
  219. package/modules/aidemBidAdapter.md +187 -0
  220. package/modules/beopBidAdapter.js +17 -2
  221. package/modules/browsiRtdProvider.js +6 -4
  222. package/modules/bucksenseBidAdapter.js +1 -1
  223. package/modules/captifyRtdProvider.js +146 -0
  224. package/modules/captifyRtdProvider.md +68 -0
  225. package/modules/criteoBidAdapter.js +3 -3
  226. package/modules/discoveryBidAdapter.js +38 -17
  227. package/modules/discoveryBidAdapter.md +7 -6
  228. package/modules/eplanningBidAdapter.js +2 -6
  229. package/modules/fluctBidAdapter.js +5 -0
  230. package/modules/gdprEnforcement.js +26 -24
  231. package/modules/genericAnalyticsAdapter.js +157 -0
  232. package/modules/geoedgeRtdProvider.js +22 -0
  233. package/modules/glomexBidAdapter.js +2 -0
  234. package/modules/gravitoIdSystem.js +3 -4
  235. package/modules/gridBidAdapter.js +441 -23
  236. package/modules/gridNMBidAdapter.js +1 -1
  237. package/modules/growthCodeAnalyticsAdapter.js +176 -0
  238. package/modules/growthCodeAnalyticsAdapter.md +41 -0
  239. package/modules/impactifyBidAdapter.js +19 -1
  240. package/modules/jwplayerRtdProvider.js +1 -2
  241. package/modules/limelightDigitalBidAdapter.js +1 -1
  242. package/modules/minutemediaBidAdapter.md +3 -3
  243. package/modules/nextMillenniumBidAdapter.js +19 -23
  244. package/modules/nexx360BidAdapter.js +264 -138
  245. package/modules/pubCommonId.js +2 -1
  246. package/modules/pubProvidedIdSystem.js +2 -0
  247. package/modules/rasBidAdapter.js +8 -3
  248. package/modules/rasBidAdapter.md +16 -15
  249. package/modules/redtramBidAdapter.js +155 -0
  250. package/modules/redtramBidAdapter.md +33 -0
  251. package/modules/riseBidAdapter.js +15 -0
  252. package/modules/riseBidAdapter.md +3 -3
  253. package/modules/rtbhouseBidAdapter.js +90 -29
  254. package/modules/rubiconBidAdapter.js +2 -1
  255. package/modules/seedtagBidAdapter.js +67 -56
  256. package/modules/seedtagBidAdapter.md +60 -0
  257. package/modules/sharedIdSystem.js +3 -1
  258. package/modules/smartadserverBidAdapter.js +6 -2
  259. package/modules/smartxBidAdapter.js +11 -8
  260. package/modules/smartytechBidAdapter.js +78 -0
  261. package/modules/smartytechBidAdapter.md +44 -0
  262. package/modules/smnBidAdapter.md +52 -0
  263. package/modules/taboolaBidAdapter.js +3 -3
  264. package/modules/taboolaBidAdapter.md +0 -2
  265. package/modules/tappxBidAdapter.js +21 -6
  266. package/modules/tripleliftBidAdapter.js +1 -1
  267. package/modules/ttdBidAdapter.js +8 -3
  268. package/modules/userId/index.js +1 -1
  269. package/modules/vidazooBidAdapter.js +26 -3
  270. package/modules/viqeoBidAdapter.js +180 -0
  271. package/modules/viqeoBidAdapter.md +56 -0
  272. package/modules/yandexBidAdapter.js +85 -19
  273. package/modules/yandexBidAdapter.md +7 -7
  274. package/modules/yieldlabBidAdapter.js +29 -12
  275. package/modules/yieldliftBidAdapter.js +3 -3
  276. package/modules/yieldoneBidAdapter.js +60 -8
  277. package/modules/yieldoneBidAdapter.md +109 -9
  278. package/modules/zeta_global_sspBidAdapter.js +4 -0
  279. package/modules/zeusPrimeRtdProvider.js +357 -0
  280. package/modules/zeusPrimeRtdProvider.md +60 -0
  281. package/package.json +1 -1
  282. package/src/adloader.js +0 -1
  283. package/src/auction.js +19 -3
  284. package/src/consentHandler.js +8 -0
  285. package/src/events.js +4 -0
  286. package/src/native.js +31 -20
  287. package/src/refererDetection.js +6 -1
  288. package/src/storageManager.js +6 -3
  289. package/test/helpers/analytics.js +34 -0
  290. package/test/mocks/analyticsStub.js +3 -1
  291. package/test/spec/AnalyticsAdapter_spec.js +119 -116
  292. package/test/spec/auctionmanager_spec.js +86 -0
  293. package/test/spec/modules/adWMGAnalyticsAdapter_spec.js +10 -8
  294. package/test/spec/modules/adagioAnalyticsAdapter_spec.js +18 -25
  295. package/test/spec/modules/admaticBidAdapter_spec.js +262 -3
  296. package/test/spec/modules/aidemBidAdapter_spec.js +664 -0
  297. package/test/spec/modules/beopBidAdapter_spec.js +52 -0
  298. package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +0 -2
  299. package/test/spec/modules/browsiRtdProvider_spec.js +2 -1
  300. package/test/spec/modules/captifyRtdProvider_spec.js +253 -0
  301. package/test/spec/modules/concertAnalyticsAdapter_spec.js +2 -4
  302. package/test/spec/modules/discoveryBidAdapter_spec.js +9 -8
  303. package/test/spec/modules/enrichmentFpdModule_spec.js +3 -2
  304. package/test/spec/modules/eplanningAnalyticsAdapter_spec.js +0 -3
  305. package/test/spec/modules/eplanningBidAdapter_spec.js +4 -4
  306. package/test/spec/modules/fluctBidAdapter_spec.js +37 -1
  307. package/test/spec/modules/fpdModule_spec.js +1 -1
  308. package/test/spec/modules/gdprEnforcement_spec.js +115 -68
  309. package/test/spec/modules/genericAnalyticsAdapter_spec.js +284 -0
  310. package/test/spec/modules/geoedgeRtdProvider_spec.js +15 -0
  311. package/test/spec/modules/glomexBidAdapter_spec.js +4 -0
  312. package/test/spec/modules/gravitoIdSystem_spec.js +1 -1
  313. package/test/spec/modules/gridBidAdapter_spec.js +289 -1
  314. package/test/spec/modules/growthCodeAnalyticsAdapter_spec.js +70 -0
  315. package/test/spec/modules/impactifyBidAdapter_spec.js +13 -0
  316. package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +17 -27
  317. package/test/spec/modules/jwplayerRtdProvider_spec.js +3 -3
  318. package/test/spec/modules/konduitAnalyticsAdapter_spec.js +0 -2
  319. package/test/spec/modules/liveIntentAnalyticsAdapter_spec.js +3 -6
  320. package/test/spec/modules/medianetAnalyticsAdapter_spec.js +7 -1
  321. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +4 -3
  322. package/test/spec/modules/nexx360BidAdapter_spec.js +441 -221
  323. package/test/spec/modules/optimonAnalyticsAdapter_spec.js +3 -11
  324. package/test/spec/modules/pianoDmpAnalyticsAdapter_spec.js +4 -11
  325. package/test/spec/modules/prebidmanagerAnalyticsAdapter_spec.js +3 -12
  326. package/test/spec/modules/pubperfAnalyticsAdapter_spec.js +6 -19
  327. package/test/spec/modules/pubstackAnalyticsAdapter_spec.js +3 -17
  328. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +13 -19
  329. package/test/spec/modules/rasBidAdapter_spec.js +5 -1
  330. package/test/spec/modules/redtramBidAdapter_spec.js +256 -0
  331. package/test/spec/modules/riseBidAdapter_spec.js +24 -0
  332. package/test/spec/modules/rtbhouseBidAdapter_spec.js +79 -0
  333. package/test/spec/modules/seedtagBidAdapter_spec.js +65 -92
  334. package/test/spec/modules/sigmoidAnalyticsAdapter_spec.js +4 -8
  335. package/test/spec/modules/smartadserverBidAdapter_spec.js +80 -0
  336. package/test/spec/modules/smartxBidAdapter_spec.js +32 -0
  337. package/test/spec/modules/smartytechBidAdapter_spec.js +162 -0
  338. package/test/spec/modules/sovrnAnalyticsAdapter_spec.js +6 -18
  339. package/test/spec/modules/taboolaBidAdapter_spec.js +0 -77
  340. package/test/spec/modules/tripleliftBidAdapter_spec.js +3 -10
  341. package/test/spec/modules/ttdBidAdapter_spec.js +27 -0
  342. package/test/spec/modules/vidazooBidAdapter_spec.js +39 -24
  343. package/test/spec/modules/viqeoBidAdapter_spec.js +124 -0
  344. package/test/spec/modules/yandexBidAdapter_spec.js +22 -13
  345. package/test/spec/modules/yieldlabBidAdapter_spec.js +174 -20
  346. package/test/spec/modules/yieldliftBidAdapter_spec.js +1 -1
  347. package/test/spec/modules/yieldoneAnalyticsAdapter_spec.js +5 -2
  348. package/test/spec/modules/yieldoneBidAdapter_spec.js +30 -6
  349. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +16 -1
  350. package/test/spec/modules/zeusPrimeRtdProvider_spec.js +410 -0
  351. package/test/spec/native_spec.js +68 -56
  352. package/test/spec/refererDetection_spec.js +45 -7
  353. package/test/spec/unit/core/storageManager_spec.js +2 -1
@@ -1,4 +1,4 @@
1
- import { deepAccess, isArray, logWarn, triggerPixel, buildUrl, logInfo, getValue, getBidIdParameter } from '../src/utils.js';
1
+ import { deepAccess, isArray, isStr, logWarn, triggerPixel, buildUrl, logInfo, getValue, getBidIdParameter } from '../src/utils.js';
2
2
  import { getRefererInfo } from '../src/refererDetection.js';
3
3
  import { registerBidder } from '../src/adapters/bidderFactory.js';
4
4
  import { config } from '../src/config.js';
@@ -40,6 +40,19 @@ export const spec = {
40
40
  const pageUrl = getPageUrl(bidderRequest.refererInfo, window);
41
41
  const gdpr = bidderRequest.gdprConsent;
42
42
  const firstSlot = slots[0];
43
+ const kwdsFromRequest = firstSlot.kwds;
44
+ let keywords = [];
45
+ if (kwdsFromRequest) {
46
+ if (isArray(kwdsFromRequest)) {
47
+ keywords = kwdsFromRequest;
48
+ } else if (isStr(kwdsFromRequest)) {
49
+ if (kwdsFromRequest.indexOf(',') != -1) {
50
+ keywords = kwdsFromRequest.split(',').map((e) => { return e.trim() });
51
+ } else {
52
+ keywords.push(kwdsFromRequest);
53
+ }
54
+ }
55
+ }
43
56
  const payloadObject = {
44
57
  at: new Date().toString(),
45
58
  nid: firstSlot.nid,
@@ -47,12 +60,13 @@ export const spec = {
47
60
  pid: firstSlot.pid,
48
61
  url: pageUrl,
49
62
  lang: (window.navigator.language || window.navigator.languages[0]),
50
- kwds: bidderRequest.ortb2?.site?.keywords || [],
63
+ kwds: keywords,
51
64
  dbg: false,
52
65
  slts: slots,
53
66
  is_amp: deepAccess(bidderRequest, 'referrerInfo.isAmp'),
54
67
  tc_string: (gdpr && gdpr.gdprApplies) ? gdpr.consentString : null,
55
68
  };
69
+
56
70
  const payloadString = JSON.stringify(payloadObject);
57
71
  return {
58
72
  method: 'POST',
@@ -129,6 +143,7 @@ function beOpRequestSlotsMaker(bid) {
129
143
  sizes: isArray(bannerSizes) ? bannerSizes : bid.sizes,
130
144
  flr: floor,
131
145
  pid: getValue(bid.params, 'accountId'),
146
+ kwds: getValue(bid.params, 'keywords'),
132
147
  nid: getValue(bid.params, 'networkId'),
133
148
  nptnid: getValue(bid.params, 'networkPartnerId'),
134
149
  bid: getBidIdParameter('bidId', bid),
@@ -59,10 +59,12 @@ export function addBrowsiTag(data) {
59
59
 
60
60
  export function sendPageviewEvent(eventType) {
61
61
  if (eventType === 'PAGEVIEW') {
62
- events.emit(CONSTANTS.EVENTS.BILLABLE_EVENT, {
63
- vendor: 'browsi',
64
- type: 'pageview',
65
- billingId: generateUUID()
62
+ window.addEventListener('browsi_pageview', () => {
63
+ events.emit(CONSTANTS.EVENTS.BILLABLE_EVENT, {
64
+ vendor: 'browsi',
65
+ type: 'pageview',
66
+ billingId: generateUUID()
67
+ })
66
68
  })
67
69
  }
68
70
  }
@@ -4,7 +4,7 @@ import { BANNER } from '../src/mediaTypes.js';
4
4
 
5
5
  const WHO = 'BKSHBID-005';
6
6
  const BIDDER_CODE = 'bucksense';
7
- const URL = 'https://prebid.bksn.se/prebidjs/';
7
+ const URL = 'https://directo.prebidserving.com/prebidjs/';
8
8
 
9
9
  export const spec = {
10
10
  code: BIDDER_CODE,
@@ -0,0 +1,146 @@
1
+ /**
2
+ * This module adds Captify real time data provider module
3
+ * The {@link module:modules/realTimeData} module is required
4
+ * The module will fetch segments (page-centric) from Captify live-classification server
5
+ * @module modules/captifyRtdProvider
6
+ * @requires module:modules/realTimeData
7
+ */
8
+ import { submodule } from '../src/hook.js';
9
+ import { getRefererInfo } from '../src/refererDetection.js';
10
+ import { ajax } from '../src/ajax.js';
11
+ import { config } from '../src/config.js';
12
+ import {deepAccess, isArray, isEmptyStr, isNumber, logError} from '../src/utils.js';
13
+ import {getGlobal} from '../src/prebidGlobal.js';
14
+
15
+ const MODULE_NAME = 'realTimeData';
16
+ const SUBMODULE_NAME = 'CaptifyRTDModule';
17
+ const DEFAULT_LC_URL = 'https://live-classification.cpx.to/prebid-segments';
18
+
19
+ const STATUS = {
20
+ SUCCESS: 200,
21
+ ACCEPTED: 202,
22
+ };
23
+
24
+ /**
25
+ * Set `appnexusAuctionKeywords` that appnexus bidder will read and send in request to Xandr
26
+ * @param {Array<number>} segments captify segments for Appnexus(Xandr) system, in form of [id1, id2, id3]
27
+ * where id1, id2, id3 - actual Xandr segment ids with keywords enabled
28
+ */
29
+ export function setAppnexusSegments(segments) {
30
+ config.setConfig({
31
+ appnexusAuctionKeywords: {
32
+ 'captify_segments': segments,
33
+ },
34
+ })
35
+ }
36
+
37
+ /**
38
+ * Function returns only bidders that contained both, in moduleConfig and at least one adUnit.
39
+ * @param {Array<string>} bidders Contains list of bidders, to set targeting for
40
+ * @param {Object} data Response of live-classification service
41
+ */
42
+ export function addSegmentData(bidders, data) {
43
+ for (const bidder of bidders) {
44
+ if (bidder === 'appnexus') { setAppnexusSegments(data['xandr']) }
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Function returns only bidders that contained in both, moduleConfig and at least one adUnit.
50
+ * @param {Object} moduleConfig Config object passed to the module
51
+ * @param {Object} reqBidsConfigObj Config object for the bidders; each adapter has its own entry
52
+ */
53
+ export function getMatchingBidders(moduleConfig, reqBidsConfigObj) {
54
+ const biddersFromConf = deepAccess(moduleConfig, 'params.bidders');
55
+
56
+ const adUnitBidders = reqBidsConfigObj.adUnits
57
+ .flatMap(({bids}) => bids.map(({bidder}) => bidder))
58
+ .filter((e, i, a) => a.indexOf(e) === i);
59
+
60
+ if (!isArray(adUnitBidders) || !adUnitBidders.length) {
61
+ logError(SUBMODULE_NAME, 'Missing parameter bidders in bidRequestConfig');
62
+ return [];
63
+ }
64
+
65
+ return biddersFromConf.filter(bidder => adUnitBidders.includes(bidder));
66
+ }
67
+
68
+ /**
69
+ * Main function that sets Captify targeting for various bidders
70
+ * @param {Object} moduleConfig Config object passed to the module
71
+ * @param {Function} onDone callback function that executed when everything is done
72
+ * @param {Object} reqBidsConfigObj Config object for the bidders; each adapter has its own entry
73
+ * @param {Object} gcv contains data related to user consent, if applies
74
+ */
75
+ export function setCaptifyTargeting(reqBidsConfigObj, onDone, moduleConfig, gcv) {
76
+ const pbjsVer = getGlobal();
77
+ const ref = getRefererInfo().referer;
78
+ const url = document.URL;
79
+ const pubId = moduleConfig.params.pubId;
80
+ const bidders = getMatchingBidders(moduleConfig, reqBidsConfigObj)
81
+ const requestBody = {
82
+ pubId,
83
+ ref,
84
+ url,
85
+ pbjsVer,
86
+ gcv
87
+ };
88
+ let requestUrl = moduleConfig.params.url;
89
+ if (!requestUrl || isEmptyStr(requestUrl)) {
90
+ requestUrl = DEFAULT_LC_URL;
91
+ }
92
+
93
+ if (!bidders.length) {
94
+ logError(SUBMODULE_NAME, 'There are no matched bidders to work with');
95
+ return;
96
+ }
97
+
98
+ ajax(requestUrl, {
99
+ success: function (response, req) {
100
+ if (req.status === STATUS.SUCCESS) {
101
+ try {
102
+ const data = JSON.parse(response);
103
+ if (data) {
104
+ addSegmentData(bidders, data);
105
+ }
106
+ } catch (e) {
107
+ logError(SUBMODULE_NAME, 'Unable to parse live-classification data' + e);
108
+ }
109
+ }
110
+ onDone();
111
+ },
112
+ error: function () {
113
+ onDone();
114
+ logError(SUBMODULE_NAME, 'Unable to get live-classification data');
115
+ }
116
+ },
117
+ JSON.stringify(requestBody),
118
+ {
119
+ contentType: 'application/json',
120
+ method: 'POST',
121
+ });
122
+ }
123
+
124
+ export function init(moduleConfig, userConsent) {
125
+ // Validate bidders
126
+ const biddersFromConf = deepAccess(moduleConfig, 'params.bidders');
127
+ if (!isArray(biddersFromConf) || !biddersFromConf.length) {
128
+ logError(SUBMODULE_NAME, 'Missing parameter bidders in moduleConfig');
129
+ return false
130
+ }
131
+ const publisherId = deepAccess(moduleConfig, 'params.pubId');
132
+ // Publisher Id
133
+ if (!isNumber(publisherId)) {
134
+ logError(SUBMODULE_NAME, 'Missing parameter pubId in moduleConfig');
135
+ return false
136
+ }
137
+ return true
138
+ }
139
+
140
+ export const captifySubmodule = {
141
+ name: SUBMODULE_NAME,
142
+ init: init,
143
+ setCaptifyTargeting
144
+ };
145
+
146
+ submodule(MODULE_NAME, captifySubmodule);
@@ -0,0 +1,68 @@
1
+ # Captify Real-Time Data Submodule
2
+
3
+ # Overview
4
+
5
+ Module Name: Captify Rtd Provider
6
+ Module Type: Rtd Provider
7
+ Layout: integrationExamples/gpt/captifyRtdProvider_example.html
8
+ Maintainer: prebid@captify.tech
9
+
10
+ # Description
11
+
12
+ Captify uses publisher first-party on-site search data to power machine learning algorithms to create a suite of
13
+ contextual based targeting solutions that activate in a cookieless environment.
14
+
15
+ The RTD submodule allows bid requests to be classified by our live-classification service on the first ad call,
16
+ maximising value for publishers by increasing scale for advertisers.
17
+
18
+ Segments will be attached to bid request objects sent to different SSPs in order to optimize targeting.
19
+
20
+ Contact prebid@captify.tech for information.
21
+
22
+ ### Publisher Usage
23
+
24
+ Compile the Captify RTD module into your Prebid build:
25
+
26
+ `npm ci && gulp build --modules=rtdModule,appnexusBidAdapter,captifyRtdProvider`
27
+
28
+ Add the Captify RTD provider to your Prebid config.
29
+
30
+ ```javascript
31
+ pbjs.setConfig({
32
+ realTimeData: {
33
+ auctionDelay: 1000,
34
+ dataProviders: [
35
+ {
36
+ name: "CaptifyRTDModule",
37
+ waitForIt: true,
38
+ params: {
39
+ pubId: 123456,
40
+ bidders: ['appnexus'],
41
+ }
42
+ }
43
+ ]
44
+ }
45
+ });
46
+ ```
47
+
48
+ ### Parameter Description
49
+ This module is configured as part of the `realTimeData.dataProviders` object.
50
+
51
+ | Name |Type | Description |Mandatory | Notes |
52
+ | :------------- | :------------ | :------------------------------------------------------------------ |:---------|:------------ |
53
+ | name | String | Real time data module name | yes | Always 'CaptifyRTDModule' |
54
+ | waitForIt | Boolean | Should be `true` if there's an `auctionDelay` defined (recommended) | no | Default `false` |
55
+ | params | Object | | | |
56
+ | params.pubId | Integer | Partner ID, required to get results and provided by Captify | yes | Use 123456 for tests and speak to your Captify account manager to receive your pubId |
57
+ | params.bidders | Array<String> | List of bidders for which you would like data to be set | yes | Currently only 'appnexus' supported |
58
+ | params.url | String | Captify live-classification service url | no | Defaults to `https://live-classification.cpx.to/prebid-segments`
59
+
60
+ ### Testing
61
+
62
+ To view an example of available segments returned by Captify:
63
+
64
+ `gulp serve --modules=rtdModule,captifyRtdProvider,appnexusBidAdapter`
65
+
66
+ and then point your browser at:
67
+
68
+ `http://localhost:9999/integrationExamples/gpt/captifyRtdProvider_example.html?pbjs_debug=true`
@@ -672,18 +672,18 @@ function enrichSlotWithFloors(slot, bidRequest) {
672
672
  if (bidRequest.mediaTypes?.banner) {
673
673
  slotFloors.banner = {};
674
674
  const bannerSizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes'))
675
- bannerSizes.forEach(bannerSize => slotFloors.banner[parseSize(bannerSize).toString()] = getFloor({ size: bannerSize, mediaType: BANNER }));
675
+ bannerSizes.forEach(bannerSize => slotFloors.banner[parseSize(bannerSize).toString()] = getFloor.call(bidRequest, { size: bannerSize, mediaType: BANNER }));
676
676
  }
677
677
 
678
678
  if (bidRequest.mediaTypes?.video) {
679
679
  slotFloors.video = {};
680
680
  const videoSizes = parseSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'))
681
- videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = getFloor({ size: videoSize, mediaType: VIDEO }));
681
+ videoSizes.forEach(videoSize => slotFloors.video[parseSize(videoSize).toString()] = getFloor.call(bidRequest, { size: videoSize, mediaType: VIDEO }));
682
682
  }
683
683
 
684
684
  if (bidRequest.mediaTypes?.native) {
685
685
  slotFloors.native = {};
686
- slotFloors.native['*'] = getFloor({ size: '*', mediaType: NATIVE });
686
+ slotFloors.native['*'] = getFloor.call(bidRequest, { size: '*', mediaType: NATIVE });
687
687
  }
688
688
 
689
689
  if (Object.keys(slotFloors).length > 0) {
@@ -12,7 +12,8 @@ let itemMaps = {};
12
12
  const MEDIATYPE = [BANNER, NATIVE];
13
13
 
14
14
  /* ----- _ss_pp_id:start ------ */
15
- const COOKIE_KEY_MGUID = '_ss_pp_id';
15
+ const COOKIE_KEY_SSPPID = '_ss_pp_id';
16
+ const COOKIE_KEY_MGUID = '__mguid_';
16
17
 
17
18
  const NATIVERET = {
18
19
  id: 'id',
@@ -58,14 +59,20 @@ const NATIVERET = {
58
59
  * @return {string}
59
60
  */
60
61
  const getUserID = () => {
61
- const i = storage.getCookie(COOKIE_KEY_MGUID);
62
+ let idd = storage.getCookie(COOKIE_KEY_SSPPID);
63
+ let idm = storage.getCookie(COOKIE_KEY_MGUID);
62
64
 
63
- if (i === null) {
65
+ if (idd && !idm) {
66
+ idm = idd
67
+ } else if (idm && !idd) {
68
+ idd = idm
69
+ } else if (!idd && !idm) {
64
70
  const uuid = utils.generateUUID();
65
71
  storage.setCookie(COOKIE_KEY_MGUID, uuid);
72
+ storage.setCookie(COOKIE_KEY_SSPPID, uuid);
66
73
  return uuid;
67
74
  }
68
- return i;
75
+ return idd;
69
76
  };
70
77
 
71
78
  /* ----- _ss_pp_id:end ------ */
@@ -80,7 +87,6 @@ function getKv(obj, ...keys) {
80
87
  let o = obj;
81
88
 
82
89
  for (let key of keys) {
83
- // console.log(key, o);
84
90
  if (o && o[key]) {
85
91
  o = o[key];
86
92
  } else {
@@ -222,7 +228,7 @@ function getItems(validBidRequests, bidderRequest) {
222
228
  let id = '' + (i + 1);
223
229
 
224
230
  if (mediaTypes.native) {
225
- ret = {...NATIVERET, ...{id, bidFloor}}
231
+ ret = { ...NATIVERET, ...{ id, bidFloor } }
226
232
  }
227
233
  // banner
228
234
  if (mediaTypes.banner) {
@@ -249,6 +255,7 @@ function getItems(validBidRequests, bidderRequest) {
249
255
  pos: 1,
250
256
  },
251
257
  ext: {},
258
+ tagid: globals['tagid'],
252
259
  };
253
260
  }
254
261
  itemMaps[id] = {
@@ -273,14 +280,19 @@ function getParam(validBidRequests, bidderRequest) {
273
280
  let auctionId = getKv(bidderRequest, 'auctionId');
274
281
  let items = getItems(validBidRequests, bidderRequest);
275
282
 
276
- const location = utils.deepAccess(bidderRequest, 'refererInfo.referer');
277
-
278
283
  const timeout = bidderRequest.timeout || 2000;
279
284
 
285
+ const domain = utils.deepAccess(bidderRequest, 'refererInfo.domain') || document.domain;
286
+ const location = utils.deepAccess(bidderRequest, 'refererInfo.referer');
287
+ const page = utils.deepAccess(bidderRequest, 'refererInfo.page');
288
+ const referer = utils.deepAccess(bidderRequest, 'refererInfo.ref');
289
+
280
290
  if (items && items.length) {
281
291
  let c = {
282
292
  id: 'pp_hbjs_' + auctionId,
283
293
  at: 1,
294
+ bcat: globals['bcat'],
295
+ badv: globals['adv'],
284
296
  cur: ['USD'],
285
297
  device: {
286
298
  connectiontype: 0,
@@ -295,16 +307,16 @@ function getParam(validBidRequests, bidderRequest) {
295
307
  },
296
308
  tmax: timeout,
297
309
  site: {
298
- name: globals['media'],
299
- domain: globals['media'],
300
- page: location,
301
- ref: location,
310
+ name: domain,
311
+ domain: domain,
312
+ page: page || location,
313
+ ref: referer,
302
314
  mobile: isMobile,
303
315
  cat: [], // todo
304
316
  publisher: {
317
+ id: globals['publisher']
305
318
  // todo
306
- id: globals['media'],
307
- name: globals['media'],
319
+ // name: xxx
308
320
  },
309
321
  },
310
322
  imp: items,
@@ -329,10 +341,19 @@ export const spec = {
329
341
  if (bid.params.token) {
330
342
  globals['token'] = bid.params.token;
331
343
  }
332
- if (bid.params.media) {
333
- globals['media'] = bid.params.media;
344
+ if (bid.params.publisher) {
345
+ globals['publisher'] = bid.params.publisher;
346
+ }
347
+ if (bid.params.tagid) {
348
+ globals['tagid'] = bid.params.tagid;
349
+ }
350
+ if (bid.params.bcat) {
351
+ globals['bcat'] = Array.isArray(bid.params.bcat) ? bid.params.bcat : [];
352
+ }
353
+ if (bid.params.badv) {
354
+ globals['badv'] = Array.isArray(bid.params.badv) ? bid.params.badv : [];
334
355
  }
335
- return !!(bid.params.token && bid.params.media);
356
+ return !!(bid.params.token && bid.params.publisher && bid.params.tagid);
336
357
  },
337
358
 
338
359
  /**
@@ -1,15 +1,15 @@
1
1
  # Overview
2
2
 
3
3
  ```
4
- Module Name: DiscoveryDSP Bid Adapter
4
+ Module Name: discovery Bid Adapter
5
5
  Module Type: Bidder Adapter
6
6
  ```
7
7
 
8
8
  # Description
9
9
 
10
- Module that connects to popIn's demand sources
10
+ Module that connects to popIn's demand sources.
11
11
 
12
- The DiscoveryDSP Bidding adapter requires setup before beginning. Please contact us at <media-support@popin.cc>
12
+ The discovery Bidding adapter requires setup before beginning. Please contact us at <media-support@popin.cc>
13
13
 
14
14
  # Test Parameters
15
15
  ```
@@ -32,7 +32,8 @@ The DiscoveryDSP Bidding adapter requires setup before beginning. Please contact
32
32
  bidder: "discovery",
33
33
  params: {
34
34
  token: "a1b067897e4ae093d1f94261e0ddc6c9",
35
- media: 'test_media' // your media host
35
+ tagid: 'test_tagid',
36
+ publisher: 'test_publisher'
36
37
  },
37
38
  },
38
39
  ],
@@ -45,13 +46,13 @@ The DiscoveryDSP Bidding adapter requires setup before beginning. Please contact
45
46
  sizes: [[300, 250]],
46
47
  },
47
48
  },
48
- // Replace this object to test a new adapter!
49
49
  bids: [
50
50
  {
51
51
  bidder: "discovery",
52
52
  params: {
53
53
  token: "d0f4902b616cc5c38cbe0a08676d0ed9",
54
- media: 'test_media' // your media host
54
+ tagid: 'test_tagid',
55
+ publisher: 'test_publisher'
55
56
  },
56
57
  },
57
58
  ],
@@ -128,9 +128,9 @@ export const spec = {
128
128
  advertiserDomains: ad.adom
129
129
  };
130
130
  }
131
- if (isVastResponse(ad)) {
131
+ if (request && request.data && request.data.vv) {
132
132
  bidResponse.vastXml = ad.adm;
133
- bidResponse.mediaTypes = VIDEO;
133
+ bidResponse.mediaType = VIDEO;
134
134
  } else {
135
135
  bidResponse.ad = ad.adm;
136
136
  }
@@ -504,8 +504,4 @@ function registerAuction(storageID) {
504
504
  return true;
505
505
  }
506
506
 
507
- function isVastResponse(bid) {
508
- return bid.adm.match(/^(<VAST)|(<VideoAdServingTemplate)/gmi);
509
- }
510
-
511
507
  registerBidder(spec);
@@ -62,6 +62,11 @@ export const spec = {
62
62
  });
63
63
 
64
64
  data.params = request.params;
65
+
66
+ if (request.schain) {
67
+ data.schain = request.schain;
68
+ }
69
+
65
70
  const searchParams = new URLSearchParams({
66
71
  dfpUnitCode: request.params.dfpUnitCode,
67
72
  tagId: request.params.tagId,
@@ -2,7 +2,7 @@
2
2
  * This module gives publishers extra set of features to enforce individual purposes of TCF v2
3
3
  */
4
4
 
5
- import {deepAccess, hasDeviceAccess, isArray, logWarn} from '../src/utils.js';
5
+ import {deepAccess, hasDeviceAccess, isArray, logError, logWarn} from '../src/utils.js';
6
6
  import {config} from '../src/config.js';
7
7
  import adapterManager, {gdprDataHandler} from '../src/adapterManager.js';
8
8
  import {find, includes} from '../src/polyfill.js';
@@ -11,13 +11,7 @@ import {getHook} from '../src/hook.js';
11
11
  import {validateStorageEnforcement} from '../src/storageManager.js';
12
12
  import * as events from '../src/events.js';
13
13
  import CONSTANTS from '../src/constants.json';
14
-
15
- // modules for which vendor consent is not needed (see https://github.com/prebid/Prebid.js/issues/8161)
16
- const VENDORLESS_MODULES = new Set([
17
- 'sharedId',
18
- 'pubCommonId',
19
- 'pubProvidedId',
20
- ]);
14
+ import {VENDORLESS_GVLID} from '../src/consentHandler.js';
21
15
 
22
16
  export const STRICT_STORAGE_ENFORCEMENT = 'strictStorageEnforcement';
23
17
 
@@ -71,7 +65,7 @@ export const internal = {
71
65
  * @param {{string|Object}} - module
72
66
  * @return {number} - GVL ID
73
67
  */
74
- export function getGvlid(module) {
68
+ export function getGvlid(module, ...args) {
75
69
  let gvlid = null;
76
70
  if (module) {
77
71
  // Check user defined GVL Mapping in pbjs.setConfig()
@@ -86,7 +80,7 @@ export function getGvlid(module) {
86
80
  return gvlid;
87
81
  }
88
82
 
89
- gvlid = internal.getGvlidForBidAdapter(moduleCode) || internal.getGvlidForUserIdModule(module) || internal.getGvlidForAnalyticsAdapter(moduleCode);
83
+ gvlid = internal.getGvlidForBidAdapter(moduleCode) || internal.getGvlidForUserIdModule(module) || internal.getGvlidForAnalyticsAdapter(moduleCode, ...args);
90
84
  }
91
85
  return gvlid;
92
86
  }
@@ -120,10 +114,19 @@ function getGvlidForUserIdModule(userIdModule) {
120
114
  /**
121
115
  * Returns GVL ID for an analytics adapter. If an analytics adapter does not have an associated GVL ID, it returns 'null'.
122
116
  * @param {string} code - 'provider' property on the analytics adapter config
117
+ * @param {{}} config - analytics configuration object
123
118
  * @return {number} GVL ID
124
119
  */
125
- function getGvlidForAnalyticsAdapter(code) {
126
- return adapterManager.getAnalyticsAdapter(code) && (adapterManager.getAnalyticsAdapter(code).gvlid || null);
120
+ function getGvlidForAnalyticsAdapter(code, config) {
121
+ const adapter = adapterManager.getAnalyticsAdapter(code);
122
+ return adapter?.gvlid || ((gvlid) => {
123
+ if (typeof gvlid !== 'function') return gvlid;
124
+ try {
125
+ return gvlid.call(adapter.adapter, config);
126
+ } catch (e) {
127
+ logError(`Error invoking ${code} adapter.gvlid()`, e)
128
+ }
129
+ })(adapter?.adapter?.gvlid)
127
130
  }
128
131
 
129
132
  export function shouldEnforce(consentData, purpose, name) {
@@ -145,20 +148,20 @@ export function shouldEnforce(consentData, purpose, name) {
145
148
  * @param {Object} consentData - gdpr consent data
146
149
  * @param {string=} currentModule - Bidder code of the current module
147
150
  * @param {number=} gvlId - GVL ID for the module
148
- * @param vendorlessModule a predicate function that takes a module name, and returns true if the module does not need vendor consent
149
151
  * @returns {boolean}
150
152
  */
151
- export function validateRules(rule, consentData, currentModule, gvlId, vendorlessModule = VENDORLESS_MODULES.has.bind(VENDORLESS_MODULES)) {
153
+ export function validateRules(rule, consentData, currentModule, gvlId) {
152
154
  const purposeId = TCF2[Object.keys(TCF2).filter(purposeName => TCF2[purposeName].name === rule.purpose)[0]].id;
153
155
 
154
156
  // return 'true' if vendor present in 'vendorExceptions'
155
- if (includes(rule.vendorExceptions || [], currentModule)) {
157
+ if ((rule.vendorExceptions || []).includes(currentModule)) {
156
158
  return true;
157
159
  }
160
+ const vendorConsentRequred = !((gvlId === VENDORLESS_GVLID || (rule.softVendorExceptions || []).includes(currentModule)))
158
161
 
159
162
  // get data from the consent string
160
163
  const purposeConsent = deepAccess(consentData, `vendorData.purpose.consents.${purposeId}`);
161
- const vendorConsent = deepAccess(consentData, `vendorData.vendor.consents.${gvlId}`);
164
+ const vendorConsent = vendorConsentRequred ? deepAccess(consentData, `vendorData.vendor.consents.${gvlId}`) : true;
162
165
  const liTransparency = deepAccess(consentData, `vendorData.purpose.legitimateInterests.${purposeId}`);
163
166
 
164
167
  /*
@@ -166,7 +169,7 @@ export function validateRules(rule, consentData, currentModule, gvlId, vendorles
166
169
  or the user has consented. Similar with vendors.
167
170
  */
168
171
  const purposeAllowed = rule.enforcePurpose === false || purposeConsent === true;
169
- const vendorAllowed = vendorlessModule(currentModule) || rule.enforceVendor === false || vendorConsent === true;
172
+ const vendorAllowed = rule.enforceVendor === false || vendorConsent === true;
170
173
 
171
174
  /*
172
175
  Few if any vendors should be declaring Legitimate Interest for Device Access (Purpose 1), but some are claiming
@@ -183,19 +186,18 @@ export function validateRules(rule, consentData, currentModule, gvlId, vendorles
183
186
  /**
184
187
  * This hook checks whether module has permission to access device or not. Device access include cookie and local storage
185
188
  * @param {Function} fn reference to original function (used by hook logic)
186
- * @param isVendorless if true, do not require vendor consent (for e.g. core modules)
187
189
  * @param {Number=} gvlid gvlid of the module
188
190
  * @param {string=} moduleName name of the module
189
191
  * @param result
190
192
  */
191
- export function deviceAccessHook(fn, isVendorless, gvlid, moduleName, result, {validate = validateRules} = {}) {
193
+ export function deviceAccessHook(fn, gvlid, moduleName, result, {validate = validateRules} = {}) {
192
194
  result = Object.assign({}, {
193
195
  hasEnforcementHook: true
194
196
  });
195
197
  if (!hasDeviceAccess()) {
196
198
  logWarn('Device access is disabled by Publisher');
197
199
  result.valid = false;
198
- } else if (isVendorless && !strictStorageEnforcement) {
200
+ } else if (gvlid === VENDORLESS_GVLID && !strictStorageEnforcement) {
199
201
  // for vendorless (core) storage, do not enforce rules unless strictStorageEnforcement is set
200
202
  result.valid = true;
201
203
  } else {
@@ -203,13 +205,13 @@ export function deviceAccessHook(fn, isVendorless, gvlid, moduleName, result, {v
203
205
  if (shouldEnforce(consentData, 1, moduleName)) {
204
206
  const curBidder = config.getCurrentBidder();
205
207
  // Bidders have a copy of storage object with bidder code binded. Aliases will also pass the same bidder code when invoking storage functions and hence if alias tries to access device we will try to grab the gvl id for alias instead of original bidder
206
- if (curBidder && (curBidder != moduleName) && adapterManager.aliasRegistry[curBidder] === moduleName) {
208
+ if (curBidder && (curBidder !== moduleName) && adapterManager.aliasRegistry[curBidder] === moduleName) {
207
209
  gvlid = getGvlid(curBidder);
208
210
  } else {
209
211
  gvlid = getGvlid(moduleName) || gvlid;
210
212
  }
211
213
  const curModule = moduleName || curBidder;
212
- let isAllowed = validate(purpose1Rule, consentData, curModule, gvlid, isVendorless ? () => true : undefined);
214
+ let isAllowed = validate(purpose1Rule, consentData, curModule, gvlid,);
213
215
  if (isAllowed) {
214
216
  result.valid = true;
215
217
  } else {
@@ -221,7 +223,7 @@ export function deviceAccessHook(fn, isVendorless, gvlid, moduleName, result, {v
221
223
  result.valid = true;
222
224
  }
223
225
  }
224
- fn.call(this, isVendorless, gvlid, moduleName, result);
226
+ fn.call(this, gvlid, moduleName, result);
225
227
  }
226
228
 
227
229
  /**
@@ -314,7 +316,7 @@ export function enableAnalyticsHook(fn, config) {
314
316
  }
315
317
  config = config.filter(conf => {
316
318
  const analyticsAdapterCode = conf.provider;
317
- const gvlid = getGvlid(analyticsAdapterCode);
319
+ const gvlid = getGvlid(analyticsAdapterCode, conf);
318
320
  const isAllowed = !!validateRules(purpose7Rule, consentData, analyticsAdapterCode, gvlid);
319
321
  if (!isAllowed) {
320
322
  analyticsBlocked.push(analyticsAdapterCode);