prebid.js 8.4.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/a1MediaRtdProvider.js +1 -0
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adfBidAdapter.js +1 -1
  7. package/dist/adgenerationBidAdapter.js +1 -1
  8. package/dist/adkernelAdnBidAdapter.js +1 -1
  9. package/dist/adkernelBidAdapter.js +1 -1
  10. package/dist/admixerIdSystem.js +1 -1
  11. package/dist/adnuntiusBidAdapter.js +1 -1
  12. package/dist/adqueryBidAdapter.js +1 -1
  13. package/dist/adqueryIdSystem.js +1 -1
  14. package/dist/adrelevantisBidAdapter.js +1 -1
  15. package/dist/adsinteractiveBidAdapter.js +1 -1
  16. package/dist/adtelligentIdSystem.js +1 -1
  17. package/dist/adtrgtmeBidAdapter.js +1 -1
  18. package/dist/adxcgBidAdapter.js +1 -1
  19. package/dist/adyoulikeBidAdapter.js +1 -1
  20. package/dist/ajaBidAdapter.js +1 -1
  21. package/dist/amxBidAdapter.js +1 -1
  22. package/dist/amxIdSystem.js +1 -1
  23. package/dist/appierAnalyticsAdapter.js +1 -1
  24. package/dist/appnexusBidAdapter.js +1 -1
  25. package/dist/asoBidAdapter.js +1 -1
  26. package/dist/axonixBidAdapter.js +1 -1
  27. package/dist/beachfrontBidAdapter.js +1 -1
  28. package/dist/bidglassBidAdapter.js +1 -1
  29. package/dist/big-richmediaBidAdapter.js +1 -1
  30. package/dist/bridBidAdapter.js +1 -1
  31. package/dist/bridgewellBidAdapter.js +1 -1
  32. package/dist/brightMountainMediaBidAdapter.js +1 -1
  33. package/dist/britepoolIdSystem.js +1 -1
  34. package/dist/carodaBidAdapter.js +1 -1
  35. package/dist/chtnwBidAdapter.js +1 -1
  36. package/dist/concertBidAdapter.js +1 -1
  37. package/dist/connectIdSystem.js +1 -1
  38. package/dist/connectadBidAdapter.js +1 -1
  39. package/dist/consentManagementGpp.js +1 -1
  40. package/dist/consumableBidAdapter.js +1 -1
  41. package/dist/conversantAnalyticsAdapter.js +1 -1
  42. package/dist/conversantBidAdapter.js +1 -1
  43. package/dist/craftBidAdapter.js +1 -1
  44. package/dist/criteoBidAdapter.js +1 -1
  45. package/dist/criteoIdSystem.js +1 -1
  46. package/dist/cwireBidAdapter.js +1 -1
  47. package/dist/czechAdIdSystem.js +1 -1
  48. package/dist/dacIdSystem.js +1 -1
  49. package/dist/deepintentDpesIdSystem.js +1 -1
  50. package/dist/dependencies.json +6 -0
  51. package/dist/dmdIdSystem.js +1 -1
  52. package/dist/dspxBidAdapter.js +1 -1
  53. package/dist/eplanningBidAdapter.js +1 -1
  54. package/dist/euidIdSystem.js +1 -1
  55. package/dist/fabrickIdSystem.js +1 -1
  56. package/dist/feedadBidAdapter.js +1 -1
  57. package/dist/finativeBidAdapter.js +1 -1
  58. package/dist/freewheel-sspBidAdapter.js +1 -1
  59. package/dist/ftrackIdSystem.js +1 -1
  60. package/dist/geolocationRtdProvider.js +1 -0
  61. package/dist/gmosspBidAdapter.js +1 -1
  62. package/dist/goldbachBidAdapter.js +1 -1
  63. package/dist/gravitoIdSystem.js +1 -1
  64. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  65. package/dist/greenbidsRtdProvider.js +1 -1
  66. package/dist/gridBidAdapter.js +1 -1
  67. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  68. package/dist/growthCodeIdSystem.js +1 -1
  69. package/dist/gumgumBidAdapter.js +1 -1
  70. package/dist/h12mediaBidAdapter.js +1 -1
  71. package/dist/hadronIdSystem.js +1 -1
  72. package/dist/hypelabBidAdapter.js +1 -1
  73. package/dist/id5IdSystem.js +1 -1
  74. package/dist/identityLinkIdSystem.js +1 -1
  75. package/dist/idxIdSystem.js +1 -1
  76. package/dist/imdsBidAdapter.js +1 -1
  77. package/dist/improvedigitalBidAdapter.js +1 -1
  78. package/dist/imuIdSystem.js +1 -1
  79. package/dist/insticatorBidAdapter.js +1 -1
  80. package/dist/intentIqIdSystem.js +1 -1
  81. package/dist/invibesBidAdapter.js +1 -1
  82. package/dist/ixBidAdapter.js +1 -1
  83. package/dist/justIdSystem.js +1 -1
  84. package/dist/justpremiumBidAdapter.js +1 -1
  85. package/dist/kargoBidAdapter.js +1 -1
  86. package/dist/kinessoIdSystem.js +1 -1
  87. package/dist/konduitAnalyticsAdapter.js +1 -1
  88. package/dist/kueezBidAdapter.js +1 -1
  89. package/dist/kueezRtbBidAdapter.js +1 -1
  90. package/dist/kulturemediaBidAdapter.js +1 -1
  91. package/dist/lassoBidAdapter.js +1 -1
  92. package/dist/lifestreetBidAdapter.js +1 -1
  93. package/dist/liveIntentIdSystem.js +1 -1
  94. package/dist/logicadBidAdapter.js +1 -1
  95. package/dist/loglyliftBidAdapter.js +1 -1
  96. package/dist/lotamePanoramaIdSystem.js +1 -1
  97. package/dist/magniteAnalyticsAdapter.js +1 -1
  98. package/dist/malltvAnalyticsAdapter.js +1 -1
  99. package/dist/marsmediaBidAdapter.js +1 -1
  100. package/dist/mediafuseBidAdapter.js +1 -1
  101. package/dist/mediasquareBidAdapter.js +1 -1
  102. package/dist/merkleIdSystem.js +1 -1
  103. package/dist/mgidBidAdapter.js +1 -1
  104. package/dist/minutemediaBidAdapter.js +1 -1
  105. package/dist/minutemediaplusBidAdapter.js +1 -1
  106. package/dist/mspa.js +1 -1
  107. package/dist/mwOpenLinkIdSystem.js +1 -1
  108. package/dist/naveggIdSystem.js +1 -1
  109. package/dist/netIdSystem.js +1 -1
  110. package/dist/newspassidBidAdapter.js +1 -1
  111. package/dist/nexx360BidAdapter.js +1 -1
  112. package/dist/not-for-prod/prebid.js +186 -181
  113. package/dist/novatiqIdSystem.js +1 -1
  114. package/dist/oguryBidAdapter.js +1 -1
  115. package/dist/oneKeyIdSystem.js +1 -1
  116. package/dist/onetagBidAdapter.js +1 -1
  117. package/dist/ooloAnalyticsAdapter.js +1 -1
  118. package/dist/optidigitalBidAdapter.js +1 -1
  119. package/dist/outbrainBidAdapter.js +1 -1
  120. package/dist/ozoneBidAdapter.js +1 -1
  121. package/dist/pairIdSystem.js +1 -1
  122. package/dist/parrableIdSystem.js +1 -1
  123. package/dist/pixfutureBidAdapter.js +1 -1
  124. package/dist/prebid-core.js +1 -1
  125. package/dist/pubCircleBidAdapter.js +1 -0
  126. package/dist/publinkIdSystem.js +1 -1
  127. package/dist/pubmaticBidAdapter.js +1 -1
  128. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  129. package/dist/pxyzBidAdapter.js +1 -1
  130. package/dist/quantcastBidAdapter.js +1 -1
  131. package/dist/quantcastIdSystem.js +1 -1
  132. package/dist/readpeakBidAdapter.js +1 -1
  133. package/dist/relaidoBidAdapter.js +1 -1
  134. package/dist/relevadRtdProvider.js +1 -1
  135. package/dist/retailspotBidAdapter.js +1 -1
  136. package/dist/rhythmoneBidAdapter.js +1 -1
  137. package/dist/riseBidAdapter.js +1 -1
  138. package/dist/rubiconBidAdapter.js +1 -1
  139. package/dist/seedingAllianceBidAdapter.js +1 -1
  140. package/dist/seedtagBidAdapter.js +1 -1
  141. package/dist/sharedIdSystem.js +1 -1
  142. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  143. package/dist/sharethroughBidAdapter.js +1 -1
  144. package/dist/shinezBidAdapter.js +1 -1
  145. package/dist/silverpushBidAdapter.js +1 -1
  146. package/dist/smaatoBidAdapter.js +1 -1
  147. package/dist/smartadserverBidAdapter.js +1 -1
  148. package/dist/smartxBidAdapter.js +1 -1
  149. package/dist/smilewantedBidAdapter.js +1 -1
  150. package/dist/sonobiBidAdapter.js +1 -1
  151. package/dist/sovrnAnalyticsAdapter.js +1 -1
  152. package/dist/sovrnBidAdapter.js +1 -1
  153. package/dist/ssmasBidAdapter.js +1 -0
  154. package/dist/sspBCBidAdapter.js +1 -1
  155. package/dist/stvBidAdapter.js +1 -1
  156. package/dist/sublimeBidAdapter.js +1 -1
  157. package/dist/tapadIdSystem.js +1 -1
  158. package/dist/tappxBidAdapter.js +1 -1
  159. package/dist/targetVideoBidAdapter.js +1 -1
  160. package/dist/teadsBidAdapter.js +1 -1
  161. package/dist/tncIdSystem.js +1 -1
  162. package/dist/topicsFpdModule.js +1 -1
  163. package/dist/trionBidAdapter.js +1 -1
  164. package/dist/tripleliftBidAdapter.js +1 -1
  165. package/dist/ttdBidAdapter.js +1 -1
  166. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  167. package/dist/uid2IdSystem.js +1 -1
  168. package/dist/underdogmediaBidAdapter.js +1 -1
  169. package/dist/undertoneBidAdapter.js +1 -1
  170. package/dist/unifiedIdSystem.js +1 -1
  171. package/dist/userId.js +1 -1
  172. package/dist/utiqSystem.js +1 -1
  173. package/dist/verizonMediaIdSystem.js +1 -1
  174. package/dist/viantOrtbBidAdapter.js +1 -0
  175. package/dist/vidazooBidAdapter.js +1 -1
  176. package/dist/videobyteBidAdapter.js +1 -1
  177. package/dist/videojsVideoProvider.js +1 -1
  178. package/dist/visxBidAdapter.js +1 -1
  179. package/dist/vrtcalBidAdapter.js +1 -1
  180. package/dist/vuukleBidAdapter.js +1 -1
  181. package/dist/widespaceBidAdapter.js +1 -1
  182. package/dist/winrBidAdapter.js +1 -1
  183. package/dist/yahoosspBidAdapter.js +1 -1
  184. package/dist/yieldmoBidAdapter.js +1 -1
  185. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  186. package/dist/zeotapIdPlusIdSystem.js +1 -1
  187. package/integrationExamples/gpt/adUnitFloors.html +0 -1
  188. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  189. package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +1 -1
  190. package/integrationExamples/videoModule/jwplayer/bidsBackHandlerOverride.html +137 -0
  191. package/integrationExamples/videoModule/jwplayer/eventListeners.html +1 -1
  192. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  193. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  194. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  195. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  196. package/integrationExamples/videoModule/videojs/bidsBackHandlerOverride.html +164 -0
  197. package/libraries/mspa/activityControls.js +51 -32
  198. package/modules/.submodules.json +1 -0
  199. package/modules/33acrossIdSystem.js +9 -0
  200. package/modules/a1MediaRtdProvider.js +92 -0
  201. package/modules/a1MediaRtdProvider.md +46 -0
  202. package/modules/adfBidAdapter.js +4 -1
  203. package/modules/adgenerationBidAdapter.js +3 -3
  204. package/modules/adkernelAdnBidAdapter.js +1 -1
  205. package/modules/adkernelBidAdapter.js +10 -3
  206. package/modules/admixerIdSystem.js +6 -0
  207. package/modules/adnuntiusBidAdapter.js +5 -13
  208. package/modules/adqueryIdSystem.js +6 -0
  209. package/modules/adsinteractiveBidAdapter.js +2 -2
  210. package/modules/adtelligentIdSystem.js +6 -0
  211. package/modules/adyoulikeBidAdapter.js +6 -3
  212. package/modules/amxIdSystem.js +6 -0
  213. package/modules/appnexusBidAdapter.js +1 -1
  214. package/modules/beachfrontBidAdapter.js +32 -6
  215. package/modules/britepoolIdSystem.js +6 -0
  216. package/modules/connectIdSystem.js +6 -0
  217. package/modules/consentManagementGpp.js +10 -1
  218. package/modules/consumableBidAdapter.js +9 -1
  219. package/modules/criteoBidAdapter.js +18 -0
  220. package/modules/criteoIdSystem.js +6 -0
  221. package/modules/cwireBidAdapter.js +19 -0
  222. package/modules/czechAdIdSystem.js +6 -0
  223. package/modules/dacIdSystem.js +6 -0
  224. package/modules/deepintentDpesIdSystem.js +7 -2
  225. package/modules/dmdIdSystem.js +6 -0
  226. package/modules/euidIdSystem.js +9 -0
  227. package/modules/fabrickIdSystem.js +6 -0
  228. package/modules/ftrackIdSystem.js +16 -0
  229. package/modules/geolocationRtdProvider.js +65 -0
  230. package/modules/gravitoIdSystem.js +6 -0
  231. package/modules/greenbidsRtdProvider.js +1 -1
  232. package/modules/growthCodeAnalyticsAdapter.js +7 -2
  233. package/modules/growthCodeIdSystem.js +20 -1
  234. package/modules/hadronIdSystem.js +6 -0
  235. package/modules/id5IdSystem.js +34 -8
  236. package/modules/identityLinkIdSystem.js +6 -0
  237. package/modules/idxIdSystem.js +6 -0
  238. package/modules/imdsBidAdapter.js +38 -14
  239. package/modules/imuIdSystem.js +10 -0
  240. package/modules/intentIqIdSystem.js +6 -0
  241. package/modules/invibesBidAdapter.js +5 -5
  242. package/modules/ixBidAdapter.js +16 -0
  243. package/modules/justIdSystem.js +6 -0
  244. package/modules/kinessoIdSystem.js +7 -2
  245. package/modules/liveIntentIdSystem.js +53 -0
  246. package/modules/lotamePanoramaIdSystem.js +6 -0
  247. package/modules/merkleIdSystem.js +24 -0
  248. package/modules/mwOpenLinkIdSystem.js +6 -0
  249. package/modules/naveggIdSystem.js +6 -0
  250. package/modules/netIdSystem.js +6 -0
  251. package/modules/newspassid.md +76 -0
  252. package/modules/newspassidBidAdapter.js +44 -18
  253. package/modules/novatiqIdSystem.js +12 -0
  254. package/modules/oneKeyIdSystem.js +26 -0
  255. package/modules/ozoneBidAdapter.js +65 -18
  256. package/modules/ozoneBidAdapter.md +3 -1
  257. package/modules/pairIdSystem.js +6 -0
  258. package/modules/parrableIdSystem.js +38 -2
  259. package/modules/pubCircleBidAdapter.js +231 -0
  260. package/modules/pubCircleBidAdapter.md +79 -0
  261. package/modules/publinkIdSystem.js +7 -1
  262. package/modules/quantcastIdSystem.js +6 -0
  263. package/modules/relevadRtdProvider.js +6 -7
  264. package/modules/rubiconBidAdapter.js +9 -0
  265. package/modules/sharedIdSystem.js +6 -0
  266. package/modules/silverpushBidAdapter.js +2 -2
  267. package/modules/ssmasBidAdapter.js +126 -0
  268. package/modules/ssmasBidAdapter.md +35 -0
  269. package/modules/sspBCBidAdapter.js +36 -13
  270. package/modules/tapadIdSystem.js +6 -0
  271. package/modules/tappxBidAdapter.js +10 -1
  272. package/modules/tappxBidAdapter.md +17 -0
  273. package/modules/tncIdSystem.js +6 -0
  274. package/modules/topicsFpdModule.js +21 -48
  275. package/modules/tripleliftBidAdapter.js +5 -0
  276. package/modules/uid2IdSystem.js +14 -0
  277. package/modules/unifiedIdSystem.js +11 -0
  278. package/modules/userId/eids.js +6 -445
  279. package/modules/userId/index.js +36 -24
  280. package/modules/utiqSystem.js +9 -0
  281. package/modules/verizonMediaIdSystem.js +6 -0
  282. package/modules/viantOrtbBidAdapter.js +113 -0
  283. package/modules/viantOrtbBidAdapter.md +54 -0
  284. package/modules/vidazooBidAdapter.js +9 -2
  285. package/modules/videojsVideoProvider.js +9 -2
  286. package/modules/vrtcalBidAdapter.js +10 -6
  287. package/modules/zeotapIdPlusIdSystem.js +6 -0
  288. package/package.json +1 -1
  289. package/src/adapters/bidderFactory.js +15 -6
  290. package/src/adloader.js +2 -1
  291. package/test/spec/libraries/mspa/activityControls_spec.js +145 -212
  292. package/test/spec/modules/a1MediaRtdProvider_spec.js +105 -0
  293. package/test/spec/modules/adfBidAdapter_spec.js +47 -0
  294. package/test/spec/modules/adgenerationBidAdapter_spec.js +6 -6
  295. package/test/spec/modules/adkernelAdnBidAdapter_spec.js +1 -2
  296. package/test/spec/modules/adkernelBidAdapter_spec.js +7 -2
  297. package/test/spec/modules/adnuntiusBidAdapter_spec.js +116 -64
  298. package/test/spec/modules/adyoulikeBidAdapter_spec.js +13 -24
  299. package/test/spec/modules/appnexusBidAdapter_spec.js +12 -1
  300. package/test/spec/modules/beachfrontBidAdapter_spec.js +35 -2
  301. package/test/spec/modules/consentManagementGpp_spec.js +16 -0
  302. package/test/spec/modules/consumableBidAdapter_spec.js +15 -0
  303. package/test/spec/modules/criteoBidAdapter_spec.js +31 -3
  304. package/test/spec/modules/cwireBidAdapter_spec.js +47 -0
  305. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +5 -5
  306. package/test/spec/modules/geolocationRtdProvider_spec.js +119 -0
  307. package/test/spec/modules/greenbidsRtdProvider_spec.js +1 -1
  308. package/test/spec/modules/id5IdSystem_spec.js +18 -0
  309. package/test/spec/modules/imdsBidAdapter_spec.js +98 -17
  310. package/test/spec/modules/invibesBidAdapter_spec.js +123 -32
  311. package/test/spec/modules/ixBidAdapter_spec.js +23 -5
  312. package/test/spec/modules/medianetBidAdapter_spec.js +117 -0
  313. package/test/spec/modules/newspassidBidAdapter_spec.js +6 -0
  314. package/test/spec/modules/outbrainBidAdapter_spec.js +3 -5
  315. package/test/spec/modules/ozoneBidAdapter_spec.js +27 -1
  316. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -20
  317. package/test/spec/modules/priceFloors_spec.js +14 -0
  318. package/test/spec/modules/pubCircleBidAdapter_spec.js +399 -0
  319. package/test/spec/modules/pubmaticBidAdapter_spec.js +6 -373
  320. package/test/spec/modules/rubiconBidAdapter_spec.js +220 -9
  321. package/test/spec/modules/smaatoBidAdapter_spec.js +4 -6
  322. package/test/spec/modules/ssmasBidAdapter_spec.js +244 -0
  323. package/test/spec/modules/sspBCBidAdapter_spec.js +18 -19
  324. package/test/spec/modules/topicsFpdModule_spec.js +343 -365
  325. package/test/spec/modules/tripleliftBidAdapter_spec.js +40 -0
  326. package/test/spec/modules/userId_spec.js +116 -7
  327. package/test/spec/modules/viantOrtbBidAdapter_spec.js +432 -0
  328. package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -4
  329. package/test/spec/modules/xeBidAdapter_spec.js +366 -368
  330. package/test/spec/modules/yahoosspBidAdapter_spec.js +5 -18
  331. package/test/spec/unit/core/bidderFactory_spec.js +61 -14
  332. package/integrationExamples/gpt/pbjs_video_adUnit.html +0 -109
@@ -174,6 +174,12 @@ export const sharedIdSystemSubmodule = {
174
174
  },
175
175
 
176
176
  domainOverride: domainOverrideToRootDomain(storage, 'sharedId'),
177
+ eids: {
178
+ 'pubcid': {
179
+ source: 'pubcid.org',
180
+ atype: 1
181
+ },
182
+ }
177
183
  };
178
184
 
179
185
  submodule('userId', sharedIdSystemSubmodule);
@@ -12,7 +12,7 @@ const bidderConfig = 'sp_pb_ortb';
12
12
  const bidderVersion = '1.0.0';
13
13
  const DEFAULT_CURRENCY = 'USD';
14
14
 
15
- export const REQUEST_URL = 'https://apac.chocolateplatform.com/bidder/?identifier=prebidchoc';
15
+ export const REQUEST_URL = 'https://prebid.chocolateplatform.co/bidder/?identifier=prebidchoc';
16
16
  export const SP_OUTSTREAM_PLAYER_URL = 'https://xaido.sgp1.cdn.digitaloceanspaces.com/prebid/spoutstream.min.js';
17
17
 
18
18
  const VIDEO_ORTB_PARAMS = [
@@ -110,7 +110,7 @@ export const CONVERTER = ortbConverter({
110
110
  bidResponse.meta.paf.content_id = utils.deepAccess(bid, 'ext.paf.content_id');
111
111
  }
112
112
 
113
- bidResponse = buildVideoVastResponse(bidResponse)
113
+ bidResponse = buildVideoVastResponse(bidResponse);
114
114
  bidResponse = buildVideoOutstreamResponse(bidResponse, context)
115
115
 
116
116
  return bidResponse;
@@ -0,0 +1,126 @@
1
+ import { BANNER } from '../src/mediaTypes.js';
2
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
3
+ import { triggerPixel, deepSetValue } from '../src/utils.js';
4
+ import { ortbConverter } from '../libraries/ortbConverter/converter.js';
5
+ import {config} from '../src/config.js';
6
+
7
+ export const SSMAS_CODE = 'ssmas';
8
+ const SSMAS_SERVER = 'ads.ssmas.com';
9
+ export const SSMAS_ENDPOINT = `https://${SSMAS_SERVER}/ortb`;
10
+ const SYNC_URL = `https://sync.ssmas.com/user_sync`;
11
+ export const SSMAS_REQUEST_METHOD = 'POST';
12
+ const GDPR_VENDOR_ID = 1183;
13
+
14
+ export const ssmasOrtbConverter = ortbConverter({
15
+ context: {
16
+ netRevenue: true,
17
+ ttl: 300,
18
+ mediaType: BANNER,
19
+ },
20
+ imp(buildImp, bidRequest, context) {
21
+ const imp = buildImp(bidRequest, context);
22
+ deepSetValue(imp, 'ext.placementId', bidRequest.params.placementId);
23
+ return imp;
24
+ },
25
+ });
26
+
27
+ export const spec = {
28
+ code: SSMAS_CODE,
29
+ supportedMediaTypes: [BANNER],
30
+ gvlid: GDPR_VENDOR_ID,
31
+
32
+ isBidRequestValid: (bid) => {
33
+ return !!bid.params.placementId && !!bid.bidId && bid.bidder === SSMAS_CODE;
34
+ },
35
+
36
+ buildRequests: (bidRequests, bidderRequest) => {
37
+ const data = ssmasOrtbConverter.toORTB({ bidRequests, bidderRequest });
38
+
39
+ const options = {
40
+ contentType: 'application/json',
41
+ withCredentials: false,
42
+ };
43
+
44
+ data.imp && data.imp.forEach(imp => {
45
+ if (imp.ext && imp.ext.placementId) {
46
+ imp.tagId = imp.ext.placementId;
47
+ }
48
+ });
49
+
50
+ data.regs = data.regs || {};
51
+ data.regs.ext = data.regs.ext || {};
52
+
53
+ if (bidderRequest.gdprConsent) {
54
+ data.regs.ext.consent = bidderRequest.gdprConsent.consentString;
55
+ data.regs.ext.gdpr = bidderRequest.gdprConsent.gdprApplies ? 1 : 0;
56
+ }
57
+ if (bidderRequest.uspConsent) {
58
+ data.regs.ext.consent = bidderRequest.uspConsent.consentString;
59
+ data.regs.ext.ccpa = 1;
60
+ }
61
+ if (config.getConfig('coppa') === true) {
62
+ data.regs.coppa = 1;
63
+ }
64
+
65
+ return [
66
+ {
67
+ method: SSMAS_REQUEST_METHOD,
68
+ url: SSMAS_ENDPOINT,
69
+ data,
70
+ options,
71
+ },
72
+ ];
73
+ },
74
+
75
+ interpretResponse: (serverResponse, bidRequest) => {
76
+ const bids = ssmasOrtbConverter.fromORTB({
77
+ response: serverResponse.body,
78
+ request: bidRequest.data,
79
+ }).bids;
80
+
81
+ return bids.filter((bid) => {
82
+ return bid.cpm > 0;
83
+ });
84
+ },
85
+
86
+ onBidWon: (bid) => {
87
+ if (bid.burl) {
88
+ triggerPixel(bid.burl);
89
+ }
90
+ },
91
+
92
+ getUserSyncs: (
93
+ syncOptions,
94
+ serverResponses,
95
+ gdprConsent,
96
+ uspConsent
97
+ ) => {
98
+ const syncs = [];
99
+
100
+ let params = ['pbjs=1'];
101
+
102
+ if (gdprConsent) {
103
+ if (typeof gdprConsent.gdprApplies === 'boolean') {
104
+ params.push(`gdpr=${Boolean(gdprConsent.gdprApplies)}&gdpr_consent=${
105
+ gdprConsent.consentString
106
+ }`);
107
+ } else {
108
+ params.push(`gdpr_consent=${gdprConsent.consentString}`);
109
+ }
110
+ }
111
+
112
+ if (uspConsent && uspConsent.consentString) {
113
+ params.push(`ccpa_consent=${uspConsent.consentString}`);
114
+ }
115
+
116
+ if (syncOptions.pixelEnabled && serverResponses.length > 0) {
117
+ syncs.push({
118
+ type: 'image',
119
+ url: `${SYNC_URL}?${params.join('&')}`
120
+ });
121
+ }
122
+ return syncs;
123
+ },
124
+ };
125
+
126
+ registerBidder(spec);
@@ -0,0 +1,35 @@
1
+ # Overview
2
+
3
+ Module Name: SSMas Bidder Adapter
4
+ Module Type: Bidder Adapter
5
+ Maintainer: hzchen.work@gmail.com
6
+
7
+ # Description
8
+
9
+ Module that connects to Sem Seo & Mas header bidding endpoint to fetch bids.
10
+ Supports Banner
11
+ Supported currencies: EUR
12
+
13
+ Required parameters:
14
+ - placement id
15
+
16
+ # Test Parameters
17
+ ```
18
+ var adUnits = [
19
+ // Banner adUnit
20
+ {
21
+ code: 'banner-div',
22
+ mediaTypes: {
23
+ banner: {
24
+ sizes: [[300, 250]]
25
+ }
26
+ },
27
+ bids: [{
28
+ bidder: 'ssmas',
29
+ params: {
30
+ placementId: "10336"
31
+ }
32
+ }]
33
+ }
34
+ ];
35
+ ```
@@ -12,13 +12,14 @@ const SYNC_URL = 'https://ssp.wp.pl/bidder/usersync';
12
12
  const NOTIFY_URL = 'https://ssp.wp.pl/bidder/notify';
13
13
  const GVLID = 676;
14
14
  const TMAX = 450;
15
- const BIDDER_VERSION = '5.8';
15
+ const BIDDER_VERSION = '5.9';
16
16
  const DEFAULT_CURRENCY = 'PLN';
17
17
  const W = window;
18
18
  const { navigator } = W;
19
19
  const oneCodeDetection = {};
20
20
  const adUnitsCalled = {};
21
21
  const adSizesCalled = {};
22
+ const bidderRequestsMap = {};
22
23
  const pageView = {};
23
24
  var consentApiVersion;
24
25
 
@@ -93,19 +94,17 @@ const getNotificationPayload = bidData => {
93
94
  const bids = isArray(bidData) ? bidData : [bidData];
94
95
  if (bids.length > 0) {
95
96
  let result = {
96
- requestId: undefined,
97
97
  siteId: [],
98
98
  slotId: [],
99
99
  tagid: [],
100
100
  }
101
101
  bids.forEach(bid => {
102
- const { adUnitCode, auctionId, cpm, creativeId, meta, params: bidParams, requestId, timeout } = bid;
102
+ const { adUnitCode, cpm, creativeId, meta, mediaType, params: bidParams, bidderRequestId, requestId, timeout } = bid;
103
103
  const params = unpackParams(bidParams);
104
104
 
105
105
  // basic notification data
106
106
  const bidBasicData = {
107
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
108
- requestId: auctionId || result.requestId,
107
+ requestId: bidderRequestId || bidderRequestsMap[requestId],
109
108
  timeout: timeout || result.timeout,
110
109
  pvid: pageView.id,
111
110
  }
@@ -127,12 +126,14 @@ const getNotificationPayload = bidData => {
127
126
 
128
127
  if (cpm) {
129
128
  // non-empty bid data
129
+ const { advertiserDomains = [], networkName, pricepl } = meta;
130
130
  const bidNonEmptyData = {
131
131
  cpm,
132
- cpmpl: meta && meta.pricepl,
132
+ cpmpl: pricepl,
133
133
  creativeId,
134
- adomain: meta && meta.advertiserDomains && meta.advertiserDomains[0],
135
- networkName: meta && meta.networkName,
134
+ adomain: advertiserDomains[0],
135
+ adtype: mediaType,
136
+ networkName,
136
137
  }
137
138
  result = { ...result, ...bidNonEmptyData }
138
139
  }
@@ -447,10 +448,15 @@ var mapVideo = (slot, videoFromBid) => {
447
448
  };
448
449
 
449
450
  const mapImpression = slot => {
450
- const { adUnitCode, bidId, params = {}, ortb2Imp = {} } = slot;
451
+ const { adUnitCode, bidderRequestId, bidId, params = {}, ortb2Imp = {} } = slot;
451
452
  const { id, siteId, video } = params;
452
453
  const { ext = {} } = ortb2Imp;
453
454
 
455
+ /*
456
+ store bidId <-> bidderRequestId mapping for bidWon notification
457
+ */
458
+ bidderRequestsMap[bidId] = bidderRequestId;
459
+
454
460
  /*
455
461
  check max size for this imp, and check/store number this size was called (for current view)
456
462
  send this info as ext.pbsize
@@ -494,15 +500,20 @@ const isNativeAd = bid => {
494
500
  return bid.admNative || (bid.adm && bid.adm.match(xmlTester));
495
501
  }
496
502
 
497
- const parseNative = (nativeData) => {
503
+ const parseNative = (nativeData, adUnitCode) => {
498
504
  const { link = {}, imptrackers: impressionTrackers, jstracker } = nativeData;
499
505
  const { url: clickUrl, clicktrackers: clickTrackers = [] } = link;
506
+ const macroReplacer = tracker => tracker.replace(new RegExp('%native_dom_id%', 'g'), adUnitCode);
507
+ let javascriptTrackers = isArray(jstracker) ? jstracker : jstracker && [jstracker];
508
+
509
+ // replace known macros in js trackers
510
+ javascriptTrackers = javascriptTrackers && javascriptTrackers.map(macroReplacer);
500
511
 
501
512
  const result = {
502
513
  clickUrl,
503
514
  clickTrackers,
504
515
  impressionTrackers,
505
- javascriptTrackers: isArray(jstracker) ? jstracker : jstracker && [jstracker],
516
+ javascriptTrackers,
506
517
  };
507
518
 
508
519
  nativeData.assets.forEach(asset => {
@@ -627,6 +638,8 @@ const spec = {
627
638
  return true;
628
639
  },
629
640
  buildRequests(validBidRequests, bidderRequest) {
641
+ logWarn('DEBUG: buildRequests', bidderRequest.auctionId, bidderRequest.bidderRequestId);
642
+
630
643
  // convert Native ORTB definition to old-style prebid native definition
631
644
  validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
632
645
 
@@ -644,7 +657,7 @@ const spec = {
644
657
  const ref = bidderRequest.refererInfo.ref;
645
658
 
646
659
  const payload = {
647
- id: bidderRequest.auctionId,
660
+ id: bidderRequest.bidderRequestId,
648
661
  site: {
649
662
  id: siteId ? `${siteId}` : undefined,
650
663
  publisher: publisherId ? { id: publisherId } : undefined,
@@ -725,6 +738,7 @@ const spec = {
725
738
 
726
739
  if (bidRequest && site.id && !strIncludes(site.id, 'bidid')) {
727
740
  // found a matching request; add this bid
741
+ const { adUnitCode } = bidRequest;
728
742
 
729
743
  // store site data for future notification
730
744
  oneCodeDetection[bidId] = [site.id, site.slot];
@@ -760,7 +774,7 @@ const spec = {
760
774
  // check native object
761
775
  try {
762
776
  const nativeData = serverBid.admNative || JSON.parse(serverBid.adm).native;
763
- bid.native = parseNative(nativeData);
777
+ bid.native = parseNative(nativeData, adUnitCode);
764
778
  bid.width = 1;
765
779
  bid.height = 1;
766
780
  } catch (err) {
@@ -807,6 +821,15 @@ const spec = {
807
821
  }
808
822
  },
809
823
 
824
+ onBidViewable(bid) {
825
+ const payload = getNotificationPayload(bid);
826
+ if (payload) {
827
+ payload.event = 'bidViewable';
828
+ sendNotification(payload);
829
+ return payload;
830
+ }
831
+ },
832
+
810
833
  onBidWon(bid) {
811
834
  const payload = getNotificationPayload(bid);
812
835
  if (payload) {
@@ -56,6 +56,12 @@ export const tapadIdSubmodule = {
56
56
  );
57
57
  }
58
58
  }
59
+ },
60
+ eids: {
61
+ 'tapadId': {
62
+ source: 'tapad.com',
63
+ atype: 1
64
+ },
59
65
  }
60
66
  }
61
67
  submodule('userId', tapadIdSubmodule);
@@ -252,6 +252,7 @@ function buildOneRequest(validBidRequests, bidderRequest) {
252
252
  const BIDEXTRA = deepAccess(validBidRequests, 'params.ext');
253
253
  const bannerMediaType = deepAccess(validBidRequests, 'mediaTypes.banner');
254
254
  const videoMediaType = deepAccess(validBidRequests, 'mediaTypes.video');
255
+ const ORTB2 = deepAccess(validBidRequests, 'ortb2');
255
256
 
256
257
  // let requests = [];
257
258
  let payload = {};
@@ -410,6 +411,14 @@ function buildOneRequest(validBidRequests, bidderRequest) {
410
411
  let geo = {};
411
412
  geo.country = deepAccess(validBidRequests, 'params.geo.country');
412
413
  // < Device object
414
+ let configGeo = {};
415
+ configGeo.country = ORTB2?.device?.geo;
416
+
417
+ if (typeof configGeo.country !== 'undefined') {
418
+ device.geo = configGeo;
419
+ } else if (typeof geo.country !== 'undefined') {
420
+ device.geo = geo;
421
+ };
413
422
 
414
423
  // > GDPR
415
424
  let user = {};
@@ -491,7 +500,7 @@ function getLanguage() {
491
500
 
492
501
  function getOs() {
493
502
  let ua = navigator.userAgent;
494
- if (ua.indexOf('Windows') != -1) { return 'Windows'; } else if (ua.indexOf('Mac OS X') != -1) { return 'macOS'; } else if (ua.match(/Android/)) { return 'Android'; } else if (ua.match(/(iPhone|iPod|iPad)/)) { return 'iOS'; } else if (ua.indexOf('Linux') != -1) { return 'Linux'; } else { return 'Unknown'; }
503
+ if (ua.match(/Android/)) { return 'Android'; } else if (ua.match(/(iPhone|iPod|iPad)/)) { return 'iOS'; } else if (ua.indexOf('Mac OS X') != -1) { return 'macOS'; } else if (ua.indexOf('Windows') != -1) { return 'Windows'; } else if (ua.indexOf('Linux') != -1) { return 'Linux'; } else { return 'Unknown'; }
495
504
  }
496
505
 
497
506
  function getVendor() {
@@ -92,3 +92,20 @@ Ads sizes available: [300,250], [320,50], [320,480], [480,320], [728,90], [768,1
92
92
  }
93
93
  ];
94
94
  ```
95
+ ### Configuration
96
+
97
+ Use `setConfig` to configure this submodule ortb2.device.geo, this will allow geolocation
98
+ `Geo` object to bring First Party Information.
99
+
100
+ ```javascript
101
+ var TIMEOUT = 1000;
102
+ pbjs.setConfig({
103
+ ortb2:{
104
+ device:{
105
+ geo:{
106
+ country:'US'
107
+ }
108
+ }
109
+ }
110
+ });
111
+ ```
@@ -57,6 +57,12 @@ export const tncidSubModule = {
57
57
  return {
58
58
  callback: function (cb) { return tncCallback(cb); }
59
59
  }
60
+ },
61
+ eids: {
62
+ 'tncid': {
63
+ source: 'thenewco.it',
64
+ atype: 3
65
+ },
60
66
  }
61
67
  }
62
68
 
@@ -1,18 +1,22 @@
1
- import {logError, logWarn, mergeDeep, isEmpty, safeJSONParse, logInfo, hasDeviceAccess} from '../src/utils.js';
1
+ import {isEmpty, logError, logWarn, mergeDeep, safeJSONParse} from '../src/utils.js';
2
2
  import {getRefererInfo} from '../src/refererDetection.js';
3
3
  import {submodule} from '../src/hook.js';
4
4
  import {GreedyPromise} from '../src/utils/promise.js';
5
5
  import {config} from '../src/config.js';
6
6
  import {getCoreStorageManager} from '../src/storageManager.js';
7
7
  import {includes} from '../src/polyfill.js';
8
- import {gdprDataHandler} from '../src/adapterManager.js';
8
+ import {isActivityAllowed} from '../src/activities/rules.js';
9
+ import {ACTIVITY_ENRICH_UFPD} from '../src/activities/activities.js';
10
+ import {activityParams} from '../src/activities/activityParams.js';
11
+ import {MODULE_TYPE_BIDDER} from '../src/activities/modules.js';
9
12
 
10
13
  const MODULE_NAME = 'topicsFpd';
11
14
  const DEFAULT_EXPIRATION_DAYS = 21;
12
- const TCF_REQUIRED_PURPOSES = ['1', '2', '3', '4'];
13
- let HAS_GDPR_CONSENT = true;
14
15
  let LOAD_TOPICS_INITIALISE = false;
15
- const HAS_DEVICE_ACCESS = hasDeviceAccess();
16
+
17
+ export function reset() {
18
+ LOAD_TOPICS_INITIALISE = false;
19
+ }
16
20
 
17
21
  const bidderIframeList = {
18
22
  maxTopicCaller: 2,
@@ -86,10 +90,14 @@ export function getTopicsData(name, topics, taxonomies = TAXONOMIES) {
86
90
  );
87
91
  }
88
92
 
93
+ function isTopicsSupported(doc = document) {
94
+ return 'browsingTopics' in doc && doc.featurePolicy.allowsFeature('browsing-topics')
95
+ }
96
+
89
97
  export function getTopics(doc = document) {
90
98
  let topics = null;
91
99
  try {
92
- if ('browsingTopics' in doc && doc.featurePolicy.allowsFeature('browsing-topics')) {
100
+ if (isTopicsSupported(doc)) {
93
101
  topics = GreedyPromise.resolve(doc.browsingTopics());
94
102
  }
95
103
  } catch (e) {
@@ -126,19 +134,16 @@ export function processFpd(config, {global}, {data = topicsData} = {}) {
126
134
  */
127
135
  export function getCachedTopics() {
128
136
  let cachedTopicData = [];
129
- if (!HAS_GDPR_CONSENT || !HAS_DEVICE_ACCESS) {
130
- return cachedTopicData;
131
- }
132
137
  const topics = config.getConfig('userSync.topics') || bidderIframeList;
133
138
  const bidderList = topics.bidders || [];
134
139
  let storedSegments = new Map(safeJSONParse(coreStorage.getDataFromLocalStorage(topicStorageName)));
135
140
  storedSegments && storedSegments.forEach((value, cachedBidder) => {
136
141
  // Check bidder exist in config for cached bidder data and then only retrieve the cached data
137
- let bidderConfigObj = bidderList.find(({bidder}) => cachedBidder == bidder)
138
- if (bidderConfigObj) {
142
+ let bidderConfigObj = bidderList.find(({bidder}) => cachedBidder === bidder)
143
+ if (bidderConfigObj && isActivityAllowed(ACTIVITY_ENRICH_UFPD, activityParams(MODULE_TYPE_BIDDER, cachedBidder))) {
139
144
  if (!isCachedDataExpired(value[lastUpdated], bidderConfigObj?.expiry || DEFAULT_EXPIRATION_DAYS)) {
140
145
  Object.keys(value).forEach((segData) => {
141
- segData != lastUpdated && cachedTopicData.push(value[segData]);
146
+ segData !== lastUpdated && cachedTopicData.push(value[segData]);
142
147
  })
143
148
  } else {
144
149
  // delete the specific bidder map from the store and store the updated maps
@@ -204,55 +209,23 @@ function listenMessagesFromTopicIframe() {
204
209
  window.addEventListener('message', receiveMessage, false);
205
210
  }
206
211
 
207
- function checkTCFv2(vendorData, requiredPurposes = TCF_REQUIRED_PURPOSES) {
208
- const {gdprApplies, purpose} = vendorData;
209
- if (!gdprApplies || !purpose) {
210
- return true;
211
- }
212
- return requiredPurposes.map((purposeNo) => {
213
- const purposeConsent = purpose.consents ? purpose.consents[purposeNo] : false;
214
- if (purposeConsent) {
215
- return true;
216
- }
217
- return false;
218
- }).reduce((a, b) => a && b, true);
219
- }
220
-
221
- export function hasGDPRConsent() {
222
- // Check for GDPR consent for purpose 1,2,3,4 and return false if consent has not been given
223
- const gdprConsent = gdprDataHandler.getConsentData();
224
- const hasGdpr = (gdprConsent && typeof gdprConsent.gdprApplies === 'boolean' && gdprConsent.gdprApplies) ? 1 : 0;
225
- const gdprConsentString = hasGdpr ? gdprConsent.consentString : '';
226
- if (hasGdpr) {
227
- if ((!gdprConsentString || gdprConsentString === '') || !gdprConsent.vendorData) {
228
- return false;
229
- }
230
- return checkTCFv2(gdprConsent.vendorData);
231
- }
232
- return true;
233
- }
234
-
235
212
  /**
236
213
  * function to load the iframes of the bidder to load the topics data
237
214
  */
238
- function loadTopicsForBidders() {
239
- HAS_GDPR_CONSENT = hasGDPRConsent();
240
- if (!HAS_GDPR_CONSENT || !HAS_DEVICE_ACCESS) {
241
- logInfo('Topics Module : Consent string is required to fetch the topics from third party domains.');
242
- return;
243
- }
215
+ export function loadTopicsForBidders(doc = document) {
216
+ if (!isTopicsSupported(doc)) return;
244
217
  const topics = config.getConfig('userSync.topics') || bidderIframeList;
245
218
  if (topics) {
246
219
  listenMessagesFromTopicIframe();
247
220
  const randomBidders = getRandomBidders(topics.bidders || [], topics.maxTopicCaller || 1)
248
221
  randomBidders && randomBidders.forEach(({ bidder, iframeURL }) => {
249
222
  if (bidder && iframeURL) {
250
- let ifrm = document.createElement('iframe');
223
+ let ifrm = doc.createElement('iframe');
251
224
  ifrm.name = 'ifrm_'.concat(bidder);
252
225
  ifrm.src = ''.concat(iframeURL, '?bidder=').concat(bidder);
253
226
  ifrm.style.display = 'none';
254
227
  setLoadedIframeURL(new URL(iframeURL).origin);
255
- iframeURL && window.document.documentElement.appendChild(ifrm);
228
+ iframeURL && doc.documentElement.appendChild(ifrm);
256
229
  }
257
230
  })
258
231
  } else {
@@ -189,6 +189,11 @@ function _buildPostBody(bidRequests, bidderRequest) {
189
189
  if (bidderRequest?.ortb2?.regs?.gpp) {
190
190
  data.regs = Object.assign({}, bidderRequest.ortb2.regs);
191
191
  }
192
+
193
+ if (bidderRequest?.ortb2) {
194
+ data.ext.ortb2 = Object.assign({}, bidderRequest.ortb2);
195
+ }
196
+
192
197
  return data;
193
198
  }
194
199
 
@@ -83,6 +83,20 @@ export const uid2IdSubmodule = {
83
83
  _logInfo(`UID2 getId returned`, result);
84
84
  return result;
85
85
  },
86
+ eids: {
87
+ 'uid2': {
88
+ source: 'uidapi.com',
89
+ atype: 3,
90
+ getValue: function(data) {
91
+ return data.id;
92
+ },
93
+ getUidExt: function(data) {
94
+ if (data.ext) {
95
+ return data.ext;
96
+ }
97
+ }
98
+ },
99
+ },
86
100
  };
87
101
 
88
102
  function decodeImpl(value) {
@@ -67,6 +67,17 @@ export const unifiedIdSubmodule = {
67
67
  ajax(url, callbacks, undefined, {method: 'GET', withCredentials: true});
68
68
  };
69
69
  return {callback: resp};
70
+ },
71
+ eids: {
72
+ 'tdid': {
73
+ source: 'adserver.org',
74
+ atype: 1,
75
+ getUidExt: function() {
76
+ return {
77
+ rtiPartner: 'TDID'
78
+ };
79
+ }
80
+ },
70
81
  }
71
82
  };
72
83