prebid.js 9.6.0 → 9.8.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 (274) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE.md +1 -1
  2. package/.github/codeql/codeql-config.yml +3 -0
  3. package/.github/codeql/queries/deviceMemory.ql +14 -0
  4. package/.github/codeql/queries/hardwareConcurrency.ql +14 -0
  5. package/.github/codeql/queries/prebid.qll +36 -0
  6. package/.github/codeql/queries/qlpack.yml +8 -0
  7. package/.github/release-drafter.yml +4 -0
  8. package/.github/workflows/jscpd.yml +1 -1
  9. package/README.md +4 -4
  10. package/dist/33acrossAnalyticsAdapter.js +1 -1
  11. package/dist/33acrossBidAdapter.js +1 -1
  12. package/dist/33acrossIdSystem.js +1 -1
  13. package/dist/BTBidAdapter.js +1 -1
  14. package/dist/adagioAnalyticsAdapter.js +1 -1
  15. package/dist/adagioBidAdapter.js +1 -1
  16. package/dist/adagioUtils.js +1 -1
  17. package/dist/addefendBidAdapter.js +1 -1
  18. package/dist/adgenerationBidAdapter.js +1 -1
  19. package/dist/adlooxRtdProvider.js +1 -1
  20. package/dist/admixerBidAdapter.js +1 -1
  21. package/dist/adqueryBidAdapter.js +1 -1
  22. package/dist/adrelevantisBidAdapter.js +1 -1
  23. package/dist/adstirBidAdapter.js +1 -1
  24. package/dist/adtrgtmeBidAdapter.js +1 -1
  25. package/dist/adxcgAnalyticsAdapter.js +1 -1
  26. package/dist/adxcgBidAdapter.js +1 -1
  27. package/dist/adyoulikeBidAdapter.js +1 -1
  28. package/dist/agmaAnalyticsAdapter.js +1 -1
  29. package/dist/ajaBidAdapter.js +1 -1
  30. package/dist/amxBidAdapter.js +1 -1
  31. package/dist/amxIdSystem.js +1 -1
  32. package/dist/appierAnalyticsAdapter.js +1 -1
  33. package/dist/appnexusBidAdapter.js +1 -1
  34. package/dist/asoBidAdapter.js +1 -1
  35. package/dist/axonixBidAdapter.js +1 -1
  36. package/dist/bidglassBidAdapter.js +1 -1
  37. package/dist/big-richmediaBidAdapter.js +1 -1
  38. package/dist/bridBidAdapter.js +1 -1
  39. package/dist/bridgewellBidAdapter.js +1 -1
  40. package/dist/brightMountainMediaBidAdapter.js +1 -1
  41. package/dist/carodaBidAdapter.js +1 -1
  42. package/dist/ccxBidAdapter.js +1 -1
  43. package/dist/chtnwBidAdapter.js +1 -1
  44. package/dist/chunk-core.js +1 -1
  45. package/dist/cleanmedianetBidAdapter.js +1 -1
  46. package/dist/concertBidAdapter.js +1 -1
  47. package/dist/connectadBidAdapter.js +1 -1
  48. package/dist/connectionInfo.js +1 -0
  49. package/dist/consumableBidAdapter.js +1 -1
  50. package/dist/contxtfulRtdProvider.js +1 -1
  51. package/dist/conversantAnalyticsAdapter.js +1 -1
  52. package/dist/conversantBidAdapter.js +1 -1
  53. package/dist/craftBidAdapter.js +1 -1
  54. package/dist/criteoBidAdapter.js +1 -1
  55. package/dist/cwireBidAdapter.js +1 -1
  56. package/dist/dailymotionBidAdapter.js +1 -1
  57. package/dist/dependencies.json +16 -3
  58. package/dist/discoveryBidAdapter.js +1 -1
  59. package/dist/docereeAdManagerBidAdapter.js +1 -1
  60. package/dist/dspxBidAdapter.js +1 -1
  61. package/dist/dxkultureBidAdapter.js +1 -1
  62. package/dist/eightPodAnalyticsAdapter.js +1 -1
  63. package/dist/eplanningBidAdapter.js +1 -1
  64. package/dist/euidIdSystem.js +1 -1
  65. package/dist/exadsBidAdapter.js +1 -1
  66. package/dist/feedadBidAdapter.js +1 -1
  67. package/dist/finativeBidAdapter.js +1 -1
  68. package/dist/freewheel-sspBidAdapter.js +1 -1
  69. package/dist/gamoshiBidAdapter.js +1 -1
  70. package/dist/gmosspBidAdapter.js +1 -1
  71. package/dist/goldbachBidAdapter.js +1 -1
  72. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  73. package/dist/greenbidsRtdProvider.js +1 -1
  74. package/dist/gridBidAdapter.js +1 -1
  75. package/dist/gumgumBidAdapter.js +1 -1
  76. package/dist/h12mediaBidAdapter.js +1 -1
  77. package/dist/hypelabBidAdapter.js +1 -1
  78. package/dist/id5AnalyticsAdapter.js +1 -1
  79. package/dist/id5IdSystem.js +1 -1
  80. package/dist/idImportLibrary.js +1 -1
  81. package/dist/imdsBidAdapter.js +1 -1
  82. package/dist/improvedigitalBidAdapter.js +1 -1
  83. package/dist/insticatorBidAdapter.js +1 -1
  84. package/dist/intentIqAnalyticsAdapter.js +1 -1
  85. package/dist/ixBidAdapter.js +1 -1
  86. package/dist/jixieBidAdapter.js +1 -1
  87. package/dist/justpremiumBidAdapter.js +1 -1
  88. package/dist/kargoBidAdapter.js +1 -1
  89. package/dist/kimberliteBidAdapter.js +1 -1
  90. package/dist/konduitAnalyticsAdapter.js +1 -1
  91. package/dist/kueezBidAdapter.js +1 -1
  92. package/dist/lassoBidAdapter.js +1 -1
  93. package/dist/lifestreetBidAdapter.js +1 -1
  94. package/dist/liveIntentIdSystem.js +1 -1
  95. package/dist/logicadBidAdapter.js +1 -1
  96. package/dist/loglyliftBidAdapter.js +1 -1
  97. package/dist/luceadBidAdapter.js +1 -1
  98. package/dist/mabidderBidAdapter.js +1 -1
  99. package/dist/magniteAnalyticsAdapter.js +1 -1
  100. package/dist/malltvAnalyticsAdapter.js +1 -1
  101. package/dist/marsmediaBidAdapter.js +1 -1
  102. package/dist/mediafuseBidAdapter.js +1 -1
  103. package/dist/mediagoBidAdapter.js +1 -1
  104. package/dist/medianetAnalyticsAdapter.js +1 -1
  105. package/dist/medianetBidAdapter.js +1 -1
  106. package/dist/mediasquareBidAdapter.js +1 -1
  107. package/dist/mgidBidAdapter.js +1 -1
  108. package/dist/mgidUtils.js +1 -0
  109. package/dist/mgidXBidAdapter.js +1 -1
  110. package/dist/missenaBidAdapter.js +1 -1
  111. package/dist/mobianRtdProvider.js +1 -1
  112. package/dist/navigatorData.js +1 -0
  113. package/dist/nexx360BidAdapter.js +1 -1
  114. package/dist/nobidAnalyticsAdapter.js +1 -1
  115. package/dist/nobidBidAdapter.js +1 -1
  116. package/dist/not-for-prod/prebid.js +176 -170
  117. package/dist/oguryBidAdapter.js +1 -1
  118. package/dist/omsBidAdapter.js +1 -1
  119. package/dist/onetagBidAdapter.js +1 -1
  120. package/dist/ooloAnalyticsAdapter.js +1 -1
  121. package/dist/openxBidAdapter.js +1 -1
  122. package/dist/optidigitalBidAdapter.js +1 -1
  123. package/dist/orbidderBidAdapter.js +1 -1
  124. package/dist/ortbConverter.js +1 -1
  125. package/dist/outbrainBidAdapter.js +1 -1
  126. package/dist/ownadxBidAdapter.js +1 -0
  127. package/dist/pixfutureBidAdapter.js +1 -1
  128. package/dist/prismaBidAdapter.js +1 -1
  129. package/dist/publinkIdSystem.js +1 -1
  130. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  131. package/dist/pubmaticBidAdapter.js +1 -1
  132. package/dist/pubriseBidAdapter.js +1 -0
  133. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  134. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  135. package/dist/pubxaiRtdProvider.js +1 -1
  136. package/dist/pxyzBidAdapter.js +1 -1
  137. package/dist/quantcastBidAdapter.js +1 -1
  138. package/dist/readpeakBidAdapter.js +1 -1
  139. package/dist/redtramBidAdapter.js +1 -1
  140. package/dist/relaidoBidAdapter.js +1 -1
  141. package/dist/retailspotBidAdapter.js +1 -1
  142. package/dist/rhythmoneBidAdapter.js +1 -1
  143. package/dist/riseUtils.js +1 -1
  144. package/dist/rubiconBidAdapter.js +1 -1
  145. package/dist/seedingAllianceBidAdapter.js +1 -1
  146. package/dist/seedtagBidAdapter.js +1 -1
  147. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  148. package/dist/sharethroughBidAdapter.js +1 -1
  149. package/dist/smaatoBidAdapter.js +1 -1
  150. package/dist/smartadserverBidAdapter.js +1 -1
  151. package/dist/smarthubBidAdapter.js +1 -1
  152. package/dist/smartxBidAdapter.js +1 -1
  153. package/dist/smilewantedBidAdapter.js +1 -1
  154. package/dist/snigelBidAdapter.js +1 -1
  155. package/dist/sonobiBidAdapter.js +1 -1
  156. package/dist/sovrnBidAdapter.js +1 -1
  157. package/dist/sspBCBidAdapter.js +1 -1
  158. package/dist/stvBidAdapter.js +1 -1
  159. package/dist/sublimeBidAdapter.js +1 -1
  160. package/dist/taboolaBidAdapter.js +1 -1
  161. package/dist/tappxBidAdapter.js +1 -1
  162. package/dist/targetVideoBidAdapter.js +1 -1
  163. package/dist/teadsBidAdapter.js +1 -1
  164. package/dist/terceptAnalyticsAdapter.js +1 -1
  165. package/dist/themoneytizerBidAdapter.js +1 -1
  166. package/dist/trionBidAdapter.js +1 -1
  167. package/dist/tripleliftBidAdapter.js +1 -1
  168. package/dist/ttdBidAdapter.js +1 -1
  169. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  170. package/dist/uid2IdSystem.js +1 -1
  171. package/dist/underdogmediaBidAdapter.js +1 -1
  172. package/dist/undertoneBidAdapter.js +1 -1
  173. package/dist/unrulyBidAdapter.js +1 -1
  174. package/dist/userId.js +1 -1
  175. package/dist/viantOrtbBidAdapter.js +1 -1
  176. package/dist/vidazooUtils.js +1 -1
  177. package/dist/videobyteBidAdapter.js +1 -1
  178. package/dist/visxBidAdapter.js +1 -1
  179. package/dist/vuukleBidAdapter.js +1 -1
  180. package/dist/widespaceBidAdapter.js +1 -1
  181. package/dist/winrBidAdapter.js +1 -1
  182. package/dist/wurflRtdProvider.js +1 -0
  183. package/dist/yahooAdsBidAdapter.js +1 -1
  184. package/dist/yieldmoBidAdapter.js +1 -1
  185. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  186. package/integrationExamples/gpt/wurflRtdProvider_example.html +106 -0
  187. package/libraries/connectionInfo/connectionUtils.js +33 -0
  188. package/libraries/mgidUtils/mgidUtils.js +73 -0
  189. package/{src/fpd/navigator.js → libraries/navigatorData/navigatorData.js} +1 -1
  190. package/libraries/ortbConverter/processors/video.js +2 -24
  191. package/libraries/riseUtils/index.js +2 -1
  192. package/libraries/vidazooUtils/bidderUtils.js +16 -0
  193. package/modules/.submodules.json +3 -1
  194. package/modules/51DegreesRtdProvider.md +11 -7
  195. package/modules/adagioBidAdapter.js +10 -50
  196. package/modules/admixerBidAdapter.js +12 -5
  197. package/modules/appnexusBidAdapter.js +1 -1
  198. package/modules/ccxBidAdapter.js +6 -2
  199. package/modules/cleanmedianetBidAdapter.js +1 -1
  200. package/modules/contxtfulRtdProvider.js +15 -12
  201. package/modules/cwireBidAdapter.js +13 -9
  202. package/modules/cwireBidAdapter.md +29 -10
  203. package/modules/dailymotionBidAdapter.js +20 -1
  204. package/modules/dailymotionBidAdapter.md +11 -7
  205. package/modules/discoveryBidAdapter.js +1 -1
  206. package/modules/docereeAdManagerBidAdapter.js +9 -12
  207. package/modules/eightPodAnalyticsAdapter.js +13 -1
  208. package/modules/gamoshiBidAdapter.js +1 -1
  209. package/modules/greenbidsAnalyticsAdapter.js +7 -4
  210. package/modules/greenbidsRtdProvider.js +15 -5
  211. package/modules/id5IdSystem.js +14 -93
  212. package/modules/idImportLibrary.js +14 -6
  213. package/modules/ixBidAdapter.js +0 -1
  214. package/modules/mediagoBidAdapter.js +4 -4
  215. package/modules/mgidBidAdapter.js +30 -109
  216. package/modules/mgidXBidAdapter.js +2 -66
  217. package/modules/mobianRtdProvider.js +28 -14
  218. package/modules/omsBidAdapter.js +1 -1
  219. package/modules/ownadxBidAdapter.js +99 -0
  220. package/modules/prismaBidAdapter.js +1 -27
  221. package/modules/pubmaticBidAdapter.js +2 -1
  222. package/modules/pubriseBidAdapter.js +19 -0
  223. package/modules/pubriseBidAdapter.md +79 -0
  224. package/modules/pubxaiAnalyticsAdapter.js +9 -4
  225. package/modules/pubxaiRtdProvider.js +38 -18
  226. package/modules/pubxaiRtdProvider.md +2 -2
  227. package/modules/redtramBidAdapter.js +2 -6
  228. package/modules/rubiconBidAdapter.js +3 -3
  229. package/modules/sharethroughBidAdapter.js +5 -0
  230. package/modules/smarthubBidAdapter.js +2 -0
  231. package/modules/teadsBidAdapter.js +4 -3
  232. package/modules/ttdBidAdapter.js +14 -32
  233. package/modules/undertoneBidAdapter.js +1 -19
  234. package/modules/userId/index.js +1 -1
  235. package/modules/viantOrtbBidAdapter.js +1 -1
  236. package/modules/wurflRtdProvider.js +213 -0
  237. package/modules/wurflRtdProvider.md +67 -0
  238. package/package.json +1 -1
  239. package/src/adloader.js +1 -0
  240. package/src/prebid.js +2 -1
  241. package/src/utils/focusTimeout.js +17 -6
  242. package/src/utils/ttlCollection.js +1 -1
  243. package/src/utils.js +28 -0
  244. package/src/video.js +78 -1
  245. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  246. package/test/spec/modules/admixerBidAdapter_spec.js +2 -2
  247. package/test/spec/modules/appnexusBidAdapter_spec.js +0 -33
  248. package/test/spec/modules/ccxBidAdapter_spec.js +81 -0
  249. package/test/spec/modules/cleanmedianetBidAdapter_spec.js +1 -1
  250. package/test/spec/modules/contxtfulRtdProvider_spec.js +19 -19
  251. package/test/spec/modules/dailymotionBidAdapter_spec.js +62 -12
  252. package/test/spec/modules/discoveryBidAdapter_spec.js +1 -1
  253. package/test/spec/modules/docereeAdManagerBidAdapter_spec.js +1 -0
  254. package/test/spec/modules/gamoshiBidAdapter_spec.js +1 -1
  255. package/test/spec/modules/id5IdSystem_spec.js +25 -98
  256. package/test/spec/modules/idImportLibrary_spec.js +14 -0
  257. package/test/spec/modules/ixBidAdapter_spec.js +8 -1
  258. package/test/spec/modules/mobianRtdProvider_spec.js +46 -43
  259. package/test/spec/modules/openxBidAdapter_spec.js +1 -1
  260. package/test/spec/modules/ownadxBidAdapter_spec.js +103 -0
  261. package/test/spec/modules/pubmaticBidAdapter_spec.js +18 -0
  262. package/test/spec/modules/pubriseBidAdapter_spec.js +514 -0
  263. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +9 -4
  264. package/test/spec/modules/pubxaiRtdProvider_spec.js +37 -5
  265. package/test/spec/modules/rubiconBidAdapter_spec.js +10 -0
  266. package/test/spec/modules/sharethroughBidAdapter_spec.js +35 -0
  267. package/test/spec/modules/trafficgateBidAdapter_spec.js +1 -1
  268. package/test/spec/modules/ttdBidAdapter_spec.js +10 -1
  269. package/test/spec/modules/viantOrtbBidAdapter_spec.js +1 -1
  270. package/test/spec/modules/vidazooBidAdapter_spec.js +12 -4
  271. package/test/spec/modules/wurflRtdProvider_spec.js +324 -0
  272. package/test/spec/ortbConverter/userId_spec.js +23 -2
  273. package/test/spec/unit/utils/focusTimeout_spec.js +33 -6
  274. package/test/spec/video_spec.js +103 -1
@@ -1,4 +1,5 @@
1
1
  import { expect } from 'chai';
2
+ import {syncAddFPDToBidderRequest} from '../../helpers/fpd';
2
3
  import { spec } from 'modules/ccxBidAdapter.js';
3
4
  import * as utils from 'src/utils.js';
4
5
 
@@ -39,6 +40,7 @@ describe('ccxAdapter', function () {
39
40
  transactionId: 'aefddd38-cfa0-48ab-8bdd-325de4bab5f9'
40
41
  }
41
42
  ];
43
+
42
44
  describe('isBidRequestValid', function () {
43
45
  it('Valid bid requests', function () {
44
46
  expect(spec.isBidRequestValid(bids[0])).to.be.true;
@@ -75,6 +77,7 @@ describe('ccxAdapter', function () {
75
77
  expect(spec.isBidRequestValid(bidsClone[0])).to.be.true;
76
78
  });
77
79
  });
80
+
78
81
  describe('buildRequests', function () {
79
82
  it('No valid bids', function () {
80
83
  expect(spec.buildRequests([])).to.be.undefined;
@@ -173,6 +176,7 @@ describe('ccxAdapter', function () {
173
176
 
174
177
  expect(data.imp).to.deep.have.same.members(imps);
175
178
  });
179
+
176
180
  it('Valid bid request - sizes old style', function () {
177
181
  let bidsClone = utils.deepClone(bids);
178
182
  delete (bidsClone[0].mediaTypes);
@@ -218,6 +222,7 @@ describe('ccxAdapter', function () {
218
222
 
219
223
  expect(data.imp).to.deep.have.same.members(imps);
220
224
  });
225
+
221
226
  it('Valid bid request - sizes old style - no media type', function () {
222
227
  let bidsClone = utils.deepClone(bids);
223
228
  delete (bidsClone[0].mediaTypes);
@@ -385,6 +390,7 @@ describe('ccxAdapter', function () {
385
390
  expect(spec.interpretResponse({})).to.be.empty;
386
391
  });
387
392
  });
393
+
388
394
  describe('getUserSyncs', function () {
389
395
  it('Valid syncs - all', function () {
390
396
  let syncOptions = {
@@ -434,6 +440,7 @@ describe('ccxAdapter', function () {
434
440
  expect(spec.getUserSyncs(syncOptions, [{body: response}])).to.be.empty;
435
441
  });
436
442
  });
443
+
437
444
  describe('mediaTypesVideoParams', function () {
438
445
  it('Valid video mediaTypes', function () {
439
446
  let bids = [
@@ -488,4 +495,78 @@ describe('ccxAdapter', function () {
488
495
  expect(data.imp).to.deep.have.same.members(imps);
489
496
  });
490
497
  });
498
+
499
+ describe('FLEDGE', function () {
500
+ it('should properly build a request when FLEDGE is enabled', function () {
501
+ let bidderRequest = {
502
+ paapi: {
503
+ enabled: true
504
+ }
505
+ };
506
+ let bids = [
507
+ {
508
+ adUnitCode: 'banner',
509
+ auctionId: '0b9de793-8eda-481e-a548-aaaaaaaaaaa1',
510
+ bidId: '2e56e1af51ccc1',
511
+ bidder: 'ccx',
512
+ bidderRequestId: '17e7b9f58accc1',
513
+ mediaTypes: {
514
+ banner: {
515
+ sizes: [[300, 250]]
516
+ }
517
+ },
518
+ params: {
519
+ placementId: 609
520
+ },
521
+ sizes: [[300, 250]],
522
+ transactionId: 'befddd38-cfa0-48ab-8bdd-bbbbbbbbbbb1',
523
+ ortb2Imp: {
524
+ ext: {
525
+ ae: 1
526
+ }
527
+ }
528
+ }
529
+ ];
530
+
531
+ let ortbRequest = spec.buildRequests(bids, syncAddFPDToBidderRequest(bidderRequest));
532
+ let data = JSON.parse(ortbRequest.data);
533
+ expect(data.imp[0].ext.ae).to.equal(1);
534
+ });
535
+
536
+ it('should properly build a request when FLEDGE is disabled', function () {
537
+ let bidderRequest = {
538
+ paapi: {
539
+ enabled: false
540
+ }
541
+ };
542
+ let bids = [
543
+ {
544
+ adUnitCode: 'banner',
545
+ auctionId: '0b9de793-8eda-481e-a548-aaaaaaaaaaa2',
546
+ bidId: '2e56e1af51ccc2',
547
+ bidder: 'ccx',
548
+ bidderRequestId: '17e7b9f58accc2',
549
+ mediaTypes: {
550
+ banner: {
551
+ sizes: [[300, 250]]
552
+ }
553
+ },
554
+ params: {
555
+ placementId: 610
556
+ },
557
+ sizes: [[300, 250]],
558
+ transactionId: 'befddd38-cfa0-48ab-8bdd-bbbbbbbbbbb2',
559
+ ortb2Imp: {
560
+ ext: {
561
+ ae: 1
562
+ }
563
+ }
564
+ }
565
+ ];
566
+
567
+ let ortbRequest = spec.buildRequests(bids, syncAddFPDToBidderRequest(bidderRequest));
568
+ let data = JSON.parse(ortbRequest.data);
569
+ expect(data.imp[0].ext.ae).to.be.undefined;
570
+ });
571
+ });
491
572
  });
@@ -395,7 +395,7 @@ describe('CleanmedianetAdapter', () => {
395
395
 
396
396
  expect(response.data.imp[0].video.mimes).to.equal(bidRequestWithVideo.mediaTypes.video.mimes);
397
397
  expect(response.data.imp[0].video.skip).to.not.exist;
398
- expect(response.data.imp[0].video.placement).to.equal(1);
398
+ expect(response.data.imp[0].video.plcmt).to.equal(1);
399
399
  expect(response.data.imp[0].video.minduration).to.equal(1);
400
400
  expect(response.data.imp[0].video.playbackmethod).to.equal(1);
401
401
  expect(response.data.imp[0].video.startdelay).to.equal(1);
@@ -17,7 +17,7 @@ const RX_CONNECTOR_MOCK = {
17
17
  };
18
18
 
19
19
  const TIMEOUT = 10;
20
- const RX_CONNECTOR_IS_READY_EVENT = new CustomEvent('rxConnectorIsReady', { detail: RX_CONNECTOR_MOCK });
20
+ const RX_CONNECTOR_IS_READY_EVENT = new CustomEvent('rxConnectorIsReady', { detail: {[CUSTOMER]: RX_CONNECTOR_MOCK}, bubbles: true });
21
21
 
22
22
  function writeToStorage(requester, timeDiff) {
23
23
  let rx = RX_FROM_SESSION_STORAGE;
@@ -157,30 +157,30 @@ describe('contxtfulRtdProvider', function () {
157
157
  });
158
158
 
159
159
  describe('init', function () {
160
- it('gets the RX API returned by an external script', (done) => {
160
+ it('uses the RX API to get receptivity', (done) => {
161
161
  let config = buildInitConfig(VERSION, CUSTOMER);
162
162
  contxtfulSubmodule.init(config);
163
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
163
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
164
164
 
165
165
  setTimeout(() => {
166
166
  contxtfulSubmodule.getTargetingData(['ad-slot'], config);
167
- expect(RX_CONNECTOR_MOCK.fetchConfig.callCount, 'fetchConfig').to.be.equal(1);
168
- expect(RX_CONNECTOR_MOCK.rxApiBuilder.callCount, 'rxApiBuilder').to.be.equal(1);
167
+ expect(RX_API_MOCK.receptivity.callCount, 'receptivity 42').to.be.equal(1);
168
+ expect(RX_API_MOCK.receptivity.firstCall.returnValue, 'receptivity').to.be.equal(RX_FROM_API);
169
169
  done();
170
170
  }, TIMEOUT);
171
171
  });
172
172
  });
173
173
 
174
174
  describe('init', function () {
175
- it('uses the RX API to get receptivity', (done) => {
175
+ it('gets the RX API returned by an external script', (done) => {
176
176
  let config = buildInitConfig(VERSION, CUSTOMER);
177
177
  contxtfulSubmodule.init(config);
178
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
178
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
179
179
 
180
180
  setTimeout(() => {
181
181
  contxtfulSubmodule.getTargetingData(['ad-slot'], config);
182
- expect(RX_API_MOCK.receptivity.callCount, 'receptivity 42').to.be.equal(1);
183
- expect(RX_API_MOCK.receptivity.firstCall.returnValue, 'receptivity').to.be.equal(RX_FROM_API);
182
+ expect(RX_CONNECTOR_MOCK.fetchConfig.callCount, 'fetchConfig').at.least(1);
183
+ expect(RX_CONNECTOR_MOCK.rxApiBuilder.callCount, 'rxApiBuilder').at.least(1);
184
184
  done();
185
185
  }, TIMEOUT);
186
186
  });
@@ -245,7 +245,7 @@ describe('contxtfulRtdProvider', function () {
245
245
  it('adds receptivity to the ad units using the RX API', function (done) {
246
246
  let config = buildInitConfig(VERSION, CUSTOMER);
247
247
  contxtfulSubmodule.init(config);
248
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
248
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
249
249
 
250
250
  setTimeout(() => {
251
251
  let targetingData = contxtfulSubmodule.getTargetingData(adUnits, config);
@@ -278,7 +278,7 @@ describe('contxtfulRtdProvider', function () {
278
278
  let config = buildInitConfig(VERSION, CUSTOMER);
279
279
  config.params.adServerTargeting = false;
280
280
  contxtfulSubmodule.init(config);
281
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
281
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
282
282
 
283
283
  setTimeout(() => {
284
284
  let _ = contxtfulSubmodule.getTargetingData(adUnits, config);
@@ -291,7 +291,7 @@ describe('contxtfulRtdProvider', function () {
291
291
  let config = buildInitConfig(VERSION, CUSTOMER);
292
292
  config.params.adServerTargeting = false;
293
293
  contxtfulSubmodule.init(config);
294
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
294
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
295
295
 
296
296
  setTimeout(() => {
297
297
  let targetingData = contxtfulSubmodule.getTargetingData(adUnits, config);
@@ -375,7 +375,7 @@ describe('contxtfulRtdProvider', function () {
375
375
  describe('getBidRequestData', function () {
376
376
  it('calls once the onDone callback', function (done) {
377
377
  contxtfulSubmodule.init(buildInitConfig(VERSION, CUSTOMER));
378
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
378
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
379
379
 
380
380
  let reqBidsConfigObj = {
381
381
  ortb2Fragments: {
@@ -397,7 +397,7 @@ describe('contxtfulRtdProvider', function () {
397
397
  it('does not write receptivity to the global OpenRTB 2 fragment', function (done) {
398
398
  let config = buildInitConfig(VERSION, CUSTOMER);
399
399
  contxtfulSubmodule.init(config);
400
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
400
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
401
401
 
402
402
  let reqBidsConfigObj = {
403
403
  ortb2Fragments: {
@@ -419,7 +419,7 @@ describe('contxtfulRtdProvider', function () {
419
419
  it('writes receptivity to the configured bidder OpenRTB 2 fragments', function (done) {
420
420
  let config = buildInitConfig(VERSION, CUSTOMER);
421
421
  contxtfulSubmodule.init(config);
422
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
422
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
423
423
 
424
424
  let reqBidsConfigObj = {
425
425
  ortb2Fragments: {
@@ -505,7 +505,7 @@ describe('contxtfulRtdProvider', function () {
505
505
  it('uses the RX API', function (done) {
506
506
  let config = buildInitConfig(VERSION, CUSTOMER);
507
507
  contxtfulSubmodule.init(config);
508
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
508
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
509
509
 
510
510
  let reqBidsConfigObj = {
511
511
  ortb2Fragments: {
@@ -515,8 +515,8 @@ describe('contxtfulRtdProvider', function () {
515
515
  };
516
516
 
517
517
  setTimeout(() => {
518
- expect(RX_CONNECTOR_MOCK.fetchConfig.callCount).to.equal(1);
519
- expect(RX_CONNECTOR_MOCK.rxApiBuilder.callCount).to.equal(1);
518
+ expect(RX_CONNECTOR_MOCK.fetchConfig.callCount).at.least(1);
519
+ expect(RX_CONNECTOR_MOCK.rxApiBuilder.callCount).at.least(1);
520
520
  const onDoneSpy = sinon.spy();
521
521
  contxtfulSubmodule.getBidRequestData(reqBidsConfigObj, onDoneSpy, config);
522
522
  expect(onDoneSpy.callCount).to.equal(1);
@@ -530,7 +530,7 @@ describe('contxtfulRtdProvider', function () {
530
530
  it('adds receptivity to the reqBidsConfigObj', function (done) {
531
531
  let config = buildInitConfig(VERSION, CUSTOMER);
532
532
  contxtfulSubmodule.init(config);
533
- loadExternalScriptTag.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
533
+ window.dispatchEvent(RX_CONNECTOR_IS_READY_EVENT);
534
534
 
535
535
  let reqBidsConfigObj = {
536
536
  ortb2Fragments: {
@@ -116,11 +116,11 @@ describe('dailymotionBidAdapterTests', () => {
116
116
  title: 'test video',
117
117
  url: 'https://test.com/test',
118
118
  topics: 'topic_1, topic_2',
119
- xid: 'x123456',
120
119
  livestream: 1,
121
120
  isCreatedForKids: true,
122
121
  videoViewsInSession: 2,
123
122
  autoplay: true,
123
+ playerName: 'dailymotion',
124
124
  playerVolume: 8,
125
125
  },
126
126
  },
@@ -158,6 +158,18 @@ describe('dailymotionBidAdapterTests', () => {
158
158
  },
159
159
  };
160
160
 
161
+ config.setConfig({
162
+ userSync: {
163
+ syncEnabled: true,
164
+ filterSettings: {
165
+ all: {
166
+ bidders: '*',
167
+ filter: 'include'
168
+ }
169
+ }
170
+ }
171
+ });
172
+
161
173
  const [request] = config.runWithBidder(
162
174
  'dailymotion',
163
175
  () => spec.buildRequests(bidRequestData, bidderRequestData),
@@ -169,6 +181,7 @@ describe('dailymotionBidAdapterTests', () => {
169
181
  expect(request.url).to.equal('https://pb.dmxleo.com');
170
182
 
171
183
  expect(reqData.pbv).to.eql('$prebid.version$');
184
+ expect(reqData.userSyncEnabled).to.be.true;
172
185
  expect(reqData.bidder_request).to.eql({
173
186
  refererInfo: bidderRequestData.refererInfo,
174
187
  uspConsent: bidderRequestData.uspConsent,
@@ -191,7 +204,6 @@ describe('dailymotionBidAdapterTests', () => {
191
204
  title: bidRequestData[0].params.video.title,
192
205
  url: bidRequestData[0].params.video.url,
193
206
  topics: bidRequestData[0].params.video.topics,
194
- xid: bidRequestData[0].params.video.xid,
195
207
  duration: bidRequestData[0].params.video.duration,
196
208
  livestream: !!bidRequestData[0].params.video.livestream,
197
209
  isCreatedForKids: bidRequestData[0].params.video.isCreatedForKids,
@@ -199,6 +211,7 @@ describe('dailymotionBidAdapterTests', () => {
199
211
  siteOrAppCat: [],
200
212
  videoViewsInSession: bidRequestData[0].params.video.videoViewsInSession,
201
213
  autoplay: bidRequestData[0].params.video.autoplay,
214
+ playerName: bidRequestData[0].params.video.playerName,
202
215
  playerVolume: bidRequestData[0].params.video.playerVolume,
203
216
  },
204
217
  });
@@ -241,11 +254,11 @@ describe('dailymotionBidAdapterTests', () => {
241
254
  title: 'test video',
242
255
  url: 'https://test.com/test',
243
256
  topics: 'topic_1, topic_2',
244
- xid: 'x123456',
245
257
  livestream: 1,
246
258
  isCreatedForKids: true,
247
259
  videoViewsInSession: 2,
248
260
  autoplay: true,
261
+ playerName: 'dailymotion',
249
262
  playerVolume: 8,
250
263
  },
251
264
  },
@@ -331,11 +344,11 @@ describe('dailymotionBidAdapterTests', () => {
331
344
  title: 'test video',
332
345
  url: 'https://test.com/test',
333
346
  topics: 'topic_1, topic_2',
334
- xid: 'x123456',
335
347
  livestream: 1,
336
348
  isCreatedForKids: true,
337
349
  videoViewsInSession: 2,
338
350
  autoplay: true,
351
+ playerName: 'dailymotion',
339
352
  playerVolume: 8,
340
353
  },
341
354
  },
@@ -418,11 +431,11 @@ describe('dailymotionBidAdapterTests', () => {
418
431
  title: 'test video',
419
432
  url: 'https://test.com/test',
420
433
  topics: 'topic_1, topic_2',
421
- xid: 'x123456',
422
434
  livestream: 1,
423
435
  isCreatedForKids: true,
424
436
  videoViewsInSession: 2,
425
437
  autoplay: true,
438
+ playerName: 'dailymotion',
426
439
  playerVolume: 8,
427
440
  },
428
441
  },
@@ -524,11 +537,11 @@ describe('dailymotionBidAdapterTests', () => {
524
537
  title: 'test video',
525
538
  url: 'https://test.com/test',
526
539
  topics: 'topic_1, topic_2',
527
- xid: 'x123456',
528
540
  livestream: 1,
529
541
  isCreatedForKids: true,
530
542
  videoViewsInSession: 2,
531
543
  autoplay: true,
544
+ playerName: 'dailymotion',
532
545
  playerVolume: 8,
533
546
  },
534
547
  },
@@ -632,11 +645,11 @@ describe('dailymotionBidAdapterTests', () => {
632
645
  title: 'test video',
633
646
  url: 'https://test.com/test',
634
647
  topics: 'topic_1, topic_2',
635
- xid: 'x123456',
636
648
  livestream: 1,
637
649
  isCreatedForKids: true,
638
650
  videoViewsInSession: 2,
639
651
  autoplay: true,
652
+ playerName: 'dailymotion',
640
653
  playerVolume: 8,
641
654
  },
642
655
  },
@@ -732,12 +745,12 @@ describe('dailymotionBidAdapterTests', () => {
732
745
  title: 'test video',
733
746
  url: 'https://test.com/test',
734
747
  topics: 'topic_1, topic_2',
735
- xid: 'x123456',
736
748
  livestream: 1,
737
749
  // Test invalid values
738
750
  isCreatedForKids: 'false',
739
751
  videoViewsInSession: -1,
740
752
  autoplay: 'true',
753
+ playerName: 'dailymotion',
741
754
  playerVolume: 12,
742
755
  },
743
756
  },
@@ -790,6 +803,18 @@ describe('dailymotionBidAdapterTests', () => {
790
803
  },
791
804
  };
792
805
 
806
+ config.setConfig({
807
+ userSync: {
808
+ syncEnabled: true,
809
+ filterSettings: {
810
+ iframe: {
811
+ bidders: ['dailymotion'],
812
+ filter: 'include'
813
+ }
814
+ }
815
+ }
816
+ });
817
+
793
818
  const [request] = config.runWithBidder(
794
819
  'dailymotion',
795
820
  () => spec.buildRequests(bidRequestData, bidderRequestData),
@@ -800,6 +825,7 @@ describe('dailymotionBidAdapterTests', () => {
800
825
  expect(request.url).to.equal('https://pb.dmxleo.com');
801
826
 
802
827
  expect(reqData.pbv).to.eql('$prebid.version$');
828
+ expect(reqData.userSyncEnabled).to.be.true;
803
829
  expect(reqData.bidder_request).to.eql({
804
830
  refererInfo: bidderRequestData.refererInfo,
805
831
  uspConsent: bidderRequestData.uspConsent,
@@ -829,7 +855,6 @@ describe('dailymotionBidAdapterTests', () => {
829
855
  title: bidRequestData[0].params.video.title,
830
856
  url: bidRequestData[0].params.video.url,
831
857
  topics: bidRequestData[0].params.video.topics,
832
- xid: bidRequestData[0].params.video.xid,
833
858
  // Overriden through bidder params
834
859
  duration: bidderRequestData.ortb2.app.content.len,
835
860
  livestream: !!bidRequestData[0].params.video.livestream,
@@ -838,6 +863,7 @@ describe('dailymotionBidAdapterTests', () => {
838
863
  siteOrAppCat: [],
839
864
  videoViewsInSession: null,
840
865
  autoplay: null,
866
+ playerName: 'dailymotion',
841
867
  playerVolume: null,
842
868
  },
843
869
  });
@@ -863,10 +889,10 @@ describe('dailymotionBidAdapterTests', () => {
863
889
  private: false,
864
890
  title: 'test video',
865
891
  topics: 'topic_1, topic_2',
866
- xid: 'x123456',
867
892
  isCreatedForKids: false,
868
893
  videoViewsInSession: 10,
869
894
  autoplay: false,
895
+ playerName: 'dailymotion',
870
896
  playerVolume: 0,
871
897
  },
872
898
  },
@@ -942,6 +968,22 @@ describe('dailymotionBidAdapterTests', () => {
942
968
  },
943
969
  };
944
970
 
971
+ config.setConfig({
972
+ userSync: {
973
+ syncEnabled: true,
974
+ filterSettings: {
975
+ image: {
976
+ bidders: ['dailymotion'],
977
+ filter: 'include'
978
+ },
979
+ iframe: {
980
+ bidders: ['dailymotion'],
981
+ filter: 'exclude',
982
+ },
983
+ }
984
+ }
985
+ });
986
+
945
987
  const [request] = config.runWithBidder(
946
988
  'dailymotion',
947
989
  () => spec.buildRequests(bidRequestData, bidderRequestData),
@@ -952,6 +994,7 @@ describe('dailymotionBidAdapterTests', () => {
952
994
  expect(request.url).to.equal('https://pb.dmxleo.com');
953
995
 
954
996
  expect(reqData.pbv).to.eql('$prebid.version$');
997
+ expect(reqData.userSyncEnabled).to.be.true;
955
998
  expect(reqData.bidder_request).to.eql({
956
999
  refererInfo: bidderRequestData.refererInfo,
957
1000
  uspConsent: bidderRequestData.uspConsent,
@@ -992,7 +1035,6 @@ describe('dailymotionBidAdapterTests', () => {
992
1035
  title: bidderRequestData.ortb2.site.content.title,
993
1036
  url: bidderRequestData.ortb2.site.content.url,
994
1037
  topics: bidRequestData[0].params.video.topics,
995
- xid: bidRequestData[0].params.video.xid,
996
1038
  duration: bidRequestData[0].params.video.duration,
997
1039
  livestream: !!bidderRequestData.ortb2.site.content.livestream,
998
1040
  isCreatedForKids: bidRequestData[0].params.video.isCreatedForKids,
@@ -1000,6 +1042,7 @@ describe('dailymotionBidAdapterTests', () => {
1000
1042
  siteOrAppCat: bidderRequestData.ortb2.site.content.cat,
1001
1043
  videoViewsInSession: bidRequestData[0].params.video.videoViewsInSession,
1002
1044
  autoplay: bidRequestData[0].params.video.autoplay,
1045
+ playerName: bidRequestData[0].params.video.playerName,
1003
1046
  playerVolume: bidRequestData[0].params.video.playerVolume,
1004
1047
  },
1005
1048
  });
@@ -1012,6 +1055,12 @@ describe('dailymotionBidAdapterTests', () => {
1012
1055
  },
1013
1056
  }];
1014
1057
 
1058
+ config.setConfig({
1059
+ userSync: {
1060
+ syncEnabled: false,
1061
+ }
1062
+ });
1063
+
1015
1064
  const [request] = config.runWithBidder(
1016
1065
  'dailymotion',
1017
1066
  () => spec.buildRequests(bidRequestDataWithApi, {}),
@@ -1025,6 +1074,7 @@ describe('dailymotionBidAdapterTests', () => {
1025
1074
  expect(reqData.coppa).to.be.false;
1026
1075
 
1027
1076
  expect(reqData.pbv).to.eql('$prebid.version$');
1077
+ expect(reqData.userSyncEnabled).to.be.false;
1028
1078
  expect(reqData.bidder_request).to.eql({
1029
1079
  gdprConsent: {
1030
1080
  apiVersion: 1,
@@ -1077,13 +1127,13 @@ describe('dailymotionBidAdapterTests', () => {
1077
1127
  title: '',
1078
1128
  url: '',
1079
1129
  topics: '',
1080
- xid: '',
1081
1130
  livestream: false,
1082
1131
  isCreatedForKids: null,
1083
1132
  context: {
1084
1133
  siteOrAppCat: [],
1085
1134
  videoViewsInSession: null,
1086
1135
  autoplay: null,
1136
+ playerName: '',
1087
1137
  playerVolume: null,
1088
1138
  },
1089
1139
  });
@@ -10,7 +10,7 @@ import {
10
10
  } from 'modules/discoveryBidAdapter.js';
11
11
  import { getPageTitle, getPageDescription, getPageKeywords, getConnectionDownLink } from '../../../libraries/fpdUtils/pageInfo.js';
12
12
  import * as utils from 'src/utils.js';
13
- import { getHLen, getHC, getDM } from '../../../src/fpd/navigator.js';
13
+ import {getDM, getHC, getHLen} from '../../../libraries/navigatorData/navigatorData.js';
14
14
 
15
15
  describe('discovery:BidAdapterTests', function () {
16
16
  let sandbox;
@@ -25,6 +25,7 @@ describe('docereeadmanager', function () {
25
25
  userid: '',
26
26
  zipcode: '',
27
27
  userconsent: '',
28
+ platformUid: ''
28
29
  },
29
30
  },
30
31
  },
@@ -398,7 +398,7 @@ describe('GamoshiAdapter', () => {
398
398
 
399
399
  expect(response.data.imp[0].video.mimes).to.equal(bidRequestWithVideo.mediaTypes.video.mimes);
400
400
  expect(response.data.imp[0].video.skip).to.not.exist;
401
- expect(response.data.imp[0].video.placement).to.equal(1);
401
+ expect(response.data.imp[0].video.plcmt).to.equal(1);
402
402
  expect(response.data.imp[0].video.minduration).to.equal(1);
403
403
  expect(response.data.imp[0].video.playbackmethod).to.equal(1);
404
404
  expect(response.data.imp[0].video.startdelay).to.equal(1);