prebid.js 7.25.0 → 7.26.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 (168) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/adagioBidAdapter.js +1 -1
  3. package/dist/adbookpspBidAdapter.js +1 -1
  4. package/dist/adgenerationBidAdapter.js +1 -1
  5. package/dist/admaticBidAdapter.js +1 -1
  6. package/dist/adrelevantisBidAdapter.js +1 -1
  7. package/dist/adtrgtmeBidAdapter.js +1 -1
  8. package/dist/adxcgBidAdapter.js +1 -1
  9. package/dist/ajaBidAdapter.js +1 -1
  10. package/dist/amxBidAdapter.js +1 -1
  11. package/dist/amxIdSystem.js +1 -1
  12. package/dist/appierAnalyticsAdapter.js +1 -1
  13. package/dist/appnexusBidAdapter.js +1 -1
  14. package/dist/asoBidAdapter.js +1 -1
  15. package/dist/axonixBidAdapter.js +1 -1
  16. package/dist/beopBidAdapter.js +1 -1
  17. package/dist/bidglassBidAdapter.js +1 -1
  18. package/dist/big-richmediaBidAdapter.js +1 -1
  19. package/dist/bridgewellBidAdapter.js +1 -1
  20. package/dist/brightMountainMediaBidAdapter.js +1 -1
  21. package/dist/captifyRtdProvider.js +1 -0
  22. package/dist/carodaBidAdapter.js +1 -1
  23. package/dist/chtnwBidAdapter.js +1 -1
  24. package/dist/concertBidAdapter.js +1 -1
  25. package/dist/connectadBidAdapter.js +1 -1
  26. package/dist/consumableBidAdapter.js +1 -1
  27. package/dist/conversantBidAdapter.js +1 -1
  28. package/dist/craftBidAdapter.js +1 -1
  29. package/dist/criteoBidAdapter.js +1 -1
  30. package/dist/discoveryBidAdapter.js +1 -1
  31. package/dist/dspxBidAdapter.js +1 -1
  32. package/dist/eplanningBidAdapter.js +1 -1
  33. package/dist/finativeBidAdapter.js +1 -1
  34. package/dist/glimpseBidAdapter.js +1 -1
  35. package/dist/gmosspBidAdapter.js +1 -1
  36. package/dist/goldbachBidAdapter.js +1 -1
  37. package/dist/gridBidAdapter.js +1 -1
  38. package/dist/gridNMBidAdapter.js +1 -1
  39. package/dist/gumgumBidAdapter.js +1 -1
  40. package/dist/h12mediaBidAdapter.js +1 -1
  41. package/dist/id5IdSystem.js +1 -1
  42. package/dist/improvedigitalBidAdapter.js +1 -1
  43. package/dist/inmarBidAdapter.js +1 -1
  44. package/dist/insticatorBidAdapter.js +1 -1
  45. package/dist/ixBidAdapter.js +1 -1
  46. package/dist/justpremiumBidAdapter.js +1 -1
  47. package/dist/konduitAnalyticsAdapter.js +1 -1
  48. package/dist/kueezBidAdapter.js +1 -1
  49. package/dist/kueezRtbBidAdapter.js +1 -1
  50. package/dist/lassoBidAdapter.js +1 -1
  51. package/dist/lifestreetBidAdapter.js +1 -1
  52. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  53. package/dist/logicadBidAdapter.js +1 -1
  54. package/dist/loglyliftBidAdapter.js +1 -1
  55. package/dist/magniteAnalyticsAdapter.js +1 -1
  56. package/dist/malltvAnalyticsAdapter.js +1 -1
  57. package/dist/marsmediaBidAdapter.js +1 -1
  58. package/dist/mediafuseBidAdapter.js +1 -1
  59. package/dist/mediasquareBidAdapter.js +1 -1
  60. package/dist/mgidBidAdapter.js +1 -1
  61. package/dist/minutemediaBidAdapter.js +1 -1
  62. package/dist/nextMillenniumBidAdapter.js +1 -1
  63. package/dist/not-for-prod/prebid.js +152 -118
  64. package/dist/oguryBidAdapter.js +1 -1
  65. package/dist/onetagBidAdapter.js +1 -1
  66. package/dist/ooloAnalyticsAdapter.js +1 -1
  67. package/dist/outbrainBidAdapter.js +1 -1
  68. package/dist/parrableIdSystem.js +1 -1
  69. package/dist/pixfutureBidAdapter.js +1 -1
  70. package/dist/prebid-core.js +1 -1
  71. package/dist/publinkIdSystem.js +1 -1
  72. package/dist/pubmaticBidAdapter.js +1 -1
  73. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  74. package/dist/pxyzBidAdapter.js +1 -1
  75. package/dist/quantcastBidAdapter.js +1 -1
  76. package/dist/readpeakBidAdapter.js +1 -1
  77. package/dist/relaidoBidAdapter.js +1 -1
  78. package/dist/rhythmoneBidAdapter.js +1 -1
  79. package/dist/riseBidAdapter.js +1 -1
  80. package/dist/rubiconAnalyticsAdapter.js +1 -1
  81. package/dist/rubiconBidAdapter.js +1 -1
  82. package/dist/seedingAllianceBidAdapter.js +1 -1
  83. package/dist/seedtagBidAdapter.js +1 -1
  84. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  85. package/dist/sharethroughBidAdapter.js +1 -1
  86. package/dist/shinezBidAdapter.js +1 -1
  87. package/dist/smaatoBidAdapter.js +1 -1
  88. package/dist/smartadserverBidAdapter.js +1 -1
  89. package/dist/smartxBidAdapter.js +1 -1
  90. package/dist/smartytechBidAdapter.js +1 -0
  91. package/dist/smilewantedBidAdapter.js +1 -1
  92. package/dist/sonobiBidAdapter.js +1 -1
  93. package/dist/sovrnAnalyticsAdapter.js +1 -1
  94. package/dist/sovrnBidAdapter.js +1 -1
  95. package/dist/sspBCBidAdapter.js +1 -1
  96. package/dist/sublimeBidAdapter.js +1 -1
  97. package/dist/synacormediaBidAdapter.js +1 -1
  98. package/dist/taboolaBidAdapter.js +1 -1
  99. package/dist/tappxBidAdapter.js +1 -1
  100. package/dist/targetVideoBidAdapter.js +1 -1
  101. package/dist/teadsBidAdapter.js +1 -1
  102. package/dist/trionBidAdapter.js +1 -1
  103. package/dist/tripleliftBidAdapter.js +1 -1
  104. package/dist/ttdBidAdapter.js +1 -1
  105. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  106. package/dist/underdogmediaBidAdapter.js +1 -1
  107. package/dist/undertoneBidAdapter.js +1 -1
  108. package/dist/userId.js +1 -1
  109. package/dist/vidazooBidAdapter.js +1 -1
  110. package/dist/videobyteBidAdapter.js +1 -1
  111. package/dist/viqeoBidAdapter.js +1 -0
  112. package/dist/visxBidAdapter.js +1 -1
  113. package/dist/vuukleBidAdapter.js +1 -1
  114. package/dist/widespaceBidAdapter.js +1 -1
  115. package/dist/winrBidAdapter.js +1 -1
  116. package/dist/yahoosspBidAdapter.js +1 -1
  117. package/dist/yieldlabBidAdapter.js +1 -1
  118. package/dist/yieldmoBidAdapter.js +1 -1
  119. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  120. package/dist/zeta_global_sspBidAdapter.js +1 -1
  121. package/dist/zeusPrimeRtdProvider.js +31 -0
  122. package/integrationExamples/gpt/captifyRtdProvider_example.html +167 -0
  123. package/modules/.submodules.json +3 -1
  124. package/modules/admaticBidAdapter.js +108 -59
  125. package/modules/admaticBidAdapter.md +2 -2
  126. package/modules/beopBidAdapter.js +17 -2
  127. package/modules/captifyRtdProvider.js +146 -0
  128. package/modules/captifyRtdProvider.md +68 -0
  129. package/modules/discoveryBidAdapter.js +38 -17
  130. package/modules/discoveryBidAdapter.md +7 -6
  131. package/modules/gridBidAdapter.js +440 -22
  132. package/modules/nextMillenniumBidAdapter.js +19 -23
  133. package/modules/smartadserverBidAdapter.js +6 -2
  134. package/modules/smartxBidAdapter.js +10 -7
  135. package/modules/smartytechBidAdapter.js +78 -0
  136. package/modules/smartytechBidAdapter.md +44 -0
  137. package/modules/taboolaBidAdapter.js +3 -3
  138. package/modules/taboolaBidAdapter.md +0 -2
  139. package/modules/tappxBidAdapter.js +21 -6
  140. package/modules/ttdBidAdapter.js +4 -3
  141. package/modules/userId/index.js +1 -1
  142. package/modules/vidazooBidAdapter.js +15 -2
  143. package/modules/viqeoBidAdapter.js +180 -0
  144. package/modules/viqeoBidAdapter.md +56 -0
  145. package/modules/yieldlabBidAdapter.js +19 -8
  146. package/modules/yieldoneBidAdapter.js +60 -8
  147. package/modules/yieldoneBidAdapter.md +109 -9
  148. package/modules/zeta_global_sspBidAdapter.js +4 -0
  149. package/modules/zeusPrimeRtdProvider.js +357 -0
  150. package/modules/zeusPrimeRtdProvider.md +60 -0
  151. package/package.json +1 -1
  152. package/src/adloader.js +0 -1
  153. package/test/spec/modules/admaticBidAdapter_spec.js +262 -3
  154. package/test/spec/modules/beopBidAdapter_spec.js +52 -0
  155. package/test/spec/modules/captifyRtdProvider_spec.js +253 -0
  156. package/test/spec/modules/discoveryBidAdapter_spec.js +9 -8
  157. package/test/spec/modules/gridBidAdapter_spec.js +289 -1
  158. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +4 -3
  159. package/test/spec/modules/smartadserverBidAdapter_spec.js +80 -0
  160. package/test/spec/modules/smartxBidAdapter_spec.js +32 -0
  161. package/test/spec/modules/smartytechBidAdapter_spec.js +162 -0
  162. package/test/spec/modules/taboolaBidAdapter_spec.js +0 -77
  163. package/test/spec/modules/ttdBidAdapter_spec.js +13 -0
  164. package/test/spec/modules/viqeoBidAdapter_spec.js +124 -0
  165. package/test/spec/modules/yieldlabBidAdapter_spec.js +125 -0
  166. package/test/spec/modules/yieldoneBidAdapter_spec.js +30 -6
  167. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +16 -1
  168. package/test/spec/modules/zeusPrimeRtdProvider_spec.js +410 -0
@@ -1,14 +1,14 @@
1
1
  import { expect } from 'chai';
2
2
  import { spec } from 'modules/discoveryBidAdapter.js';
3
3
 
4
- describe('DiscoveryDSP:BidAdapterTests', function () {
4
+ describe('discovery:BidAdapterTests', function () {
5
5
  let bidRequestData = {
6
- bidderCode: 'DiscoveryDSP',
6
+ bidderCode: 'discovery',
7
7
  auctionId: 'ff66e39e-4075-4d18-9854-56fde9b879ac',
8
8
  bidderRequestId: '4fec04e87ad785',
9
9
  bids: [
10
10
  {
11
- bidder: 'DiscoveryDSP',
11
+ bidder: 'discovery',
12
12
  params: {
13
13
  token: 'd0f4902b616cc5c38cbe0a08676d0ed9',
14
14
  },
@@ -32,25 +32,26 @@ describe('DiscoveryDSP:BidAdapterTests', function () {
32
32
  };
33
33
  let request = [];
34
34
 
35
- it('DiscoveryDSP:validate_pub_params', function () {
35
+ it('discovery:validate_pub_params', function () {
36
36
  expect(
37
37
  spec.isBidRequestValid({
38
- bidder: 'DiscoveryDSP',
38
+ bidder: 'discovery',
39
39
  params: {
40
40
  token: ['d0f4902b616cc5c38cbe0a08676d0ed9'],
41
- media: ['test_media']
41
+ tagid: ['test_tagid'],
42
+ publisher: ['test_publisher']
42
43
  },
43
44
  })
44
45
  ).to.equal(true);
45
46
  });
46
47
 
47
- it('DiscoveryDSP:validate_generated_params', function () {
48
+ it('discovery:validate_generated_params', function () {
48
49
  request = spec.buildRequests(bidRequestData.bids, bidRequestData);
49
50
  let req_data = JSON.parse(request.data);
50
51
  expect(req_data.imp).to.have.lengthOf(1);
51
52
  });
52
53
 
53
- it('DiscoveryDSP:validate_response_params', function () {
54
+ it('discovery:validate_response_params', function () {
54
55
  let tempAdm = '<link rel=\"stylesheet\" href=\"https://cdn.mediago.io/js/style/style_banner_336x280_standard.css\"><div id=\"mgcontainer-e1746bcc817beaba9d63bd4254aad533\" class=\"mediago-placement_46ee9c c336x280_standard_46ee9c mediago-placement c336x280_standard\" style=\"width:336px;height:280px;overflow:hidden\"><a class=\"mediago-placement-track_46ee9c mediago-placement-track\" title=\"秘密のしかけのネックレスをプレゼントした男性。2年後に彼女は中身に気付いて悲鳴を上げた\" href=\"https://trace.mediago.cc/api/bidder/track?tn=d0f4902b616cc5c38cbe0a08676d0ed9&price=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&evt=102&rid=3f6700b5e61e1476bed629b6ea6c7a4d&campaignid=1366258&impid=50-3663.infoseek.co.jp.336x280-1&offerid=28316825&test=0&time=1660811542&cp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&clickid=50_3f6700b5e61e1476bed629b6ea6c7a4d_50-3663.infoseek.co.jp.336x280-1&acid=1120&trackingid=e1746bcc817beaba9d63bd4254aad533&uid=7544198412013119947&jt=2&url=O7fi1nLA9qLQjcPq7rIDvxMyybMbcc2iUh-TuaqiVSD1Dj4cKrR82gRYdWy1Ao22yhq2FoY79tmyI3X_bsO3CusXggmpW8bZvwTlHPxfOxekArClcRSpWmkVorlnMSYf7yM6QBVTuTLCCP-cK8eXMZnQVR7PdOImYZGJis6q9Xx9MToxvPkWRVa13OaCtKVeqzGdglYH3G2mqo1qLP1RCCZJHE1Fq8fgCYmLJ0Xli-nLvFZjt3g0HIui_IvyZi6YtXS97p9ohgfgDJnqcGH6l053AP0cO7ZQDHtS2_9P9UqgaA47gmltDVEDkSThX7js&bm=50&la=ja&cn=jp&cid=4215873&info=x_ME1qzmB7TY6hTSn_XUw5s6N-EkBgxcE4qJ0fd9amgsJzO3-Gtm2Nja777SyGlpkF6k_tSzbcLYYecYQlHncOAAIyuNaT2rvqrhxrQPfC7opZUGQ8WMx4Rwkx8R2k0nDiBI8xnegLWYTvY-Fc99Rw&sid=38__149__12__24__144__163__47__1__99&sp=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&scp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&acu=JPY&scu=USD&sgcp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&gprice=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&gcp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&ah=&pb=m&de=infoseek.co.jp&cat=&iv=0\" target=\"_blank\"><div class=\"mediago-placement-top_46ee9c mediago-placement-top\" style=\"background-image:url(https://d2cli4kgl5uxre.cloudfront.net/ML/d8e9b4aa20fae1739d2aad8c926d3f15__scv1__306x304.png)\"></div></a><div class=\"mediago-placement-bottom_46ee9c mediago-placement-bottom\"><div class=\"mediago-middle_46ee9c mediago-middle\"><a class=\"mediago-placement-track_46ee9c mediago-placement-track\" title=\"秘密のしかけのネックレスをプレゼントした男性。2年後に彼女は中身に気付いて悲鳴を上げた\" href=\"https://trace.mediago.cc/api/bidder/track?tn=d0f4902b616cc5c38cbe0a08676d0ed9&price=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&evt=102&rid=3f6700b5e61e1476bed629b6ea6c7a4d&campaignid=1366258&impid=50-3663.infoseek.co.jp.336x280-1&offerid=28316825&test=0&time=1660811542&cp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&clickid=50_3f6700b5e61e1476bed629b6ea6c7a4d_50-3663.infoseek.co.jp.336x280-1&acid=1120&trackingid=e1746bcc817beaba9d63bd4254aad533&uid=7544198412013119947&jt=2&url=O7fi1nLA9qLQjcPq7rIDvxMyybMbcc2iUh-TuaqiVSD1Dj4cKrR82gRYdWy1Ao22yhq2FoY79tmyI3X_bsO3CusXggmpW8bZvwTlHPxfOxekArClcRSpWmkVorlnMSYf7yM6QBVTuTLCCP-cK8eXMZnQVR7PdOImYZGJis6q9Xx9MToxvPkWRVa13OaCtKVeqzGdglYH3G2mqo1qLP1RCCZJHE1Fq8fgCYmLJ0Xli-nLvFZjt3g0HIui_IvyZi6YtXS97p9ohgfgDJnqcGH6l053AP0cO7ZQDHtS2_9P9UqgaA47gmltDVEDkSThX7js&bm=50&la=ja&cn=jp&cid=4215873&info=x_ME1qzmB7TY6hTSn_XUw5s6N-EkBgxcE4qJ0fd9amgsJzO3-Gtm2Nja777SyGlpkF6k_tSzbcLYYecYQlHncOAAIyuNaT2rvqrhxrQPfC7opZUGQ8WMx4Rwkx8R2k0nDiBI8xnegLWYTvY-Fc99Rw&sid=38__149__12__24__144__163__47__1__99&sp=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&scp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&acu=JPY&scu=USD&sgcp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&gprice=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&gcp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&ah=&pb=m&de=infoseek.co.jp&cat=&iv=0\" target=\"_blank\"><div class=\"mediago-title_46ee9c mediago-title\">秘密のしかけのネックレスをプレゼントした男性。2年後に彼女は中身に気付いて悲鳴を上げた</div></a><div style=\"margin-top:10px;\"><a class=\"mediago-ad-icon_46ee9c mediago-ad-icon\" title=\"ad\" href=\"//www.mediago.io/privacy\" target=\"_blank\">AD</a> <a class=\"mediago-placement-track_46ee9c mediago-placement-track\" title=\"秘密のしかけのネックレスをプレゼントした男性。2年後に彼女は中身に気付いて悲鳴を上げた\" href=\"https://trace.mediago.cc/api/bidder/track?tn=d0f4902b616cc5c38cbe0a08676d0ed9&price=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&evt=102&rid=3f6700b5e61e1476bed629b6ea6c7a4d&campaignid=1366258&impid=50-3663.infoseek.co.jp.336x280-1&offerid=28316825&test=0&time=1660811542&cp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&clickid=50_3f6700b5e61e1476bed629b6ea6c7a4d_50-3663.infoseek.co.jp.336x280-1&acid=1120&trackingid=e1746bcc817beaba9d63bd4254aad533&uid=7544198412013119947&jt=2&url=O7fi1nLA9qLQjcPq7rIDvxMyybMbcc2iUh-TuaqiVSD1Dj4cKrR82gRYdWy1Ao22yhq2FoY79tmyI3X_bsO3CusXggmpW8bZvwTlHPxfOxekArClcRSpWmkVorlnMSYf7yM6QBVTuTLCCP-cK8eXMZnQVR7PdOImYZGJis6q9Xx9MToxvPkWRVa13OaCtKVeqzGdglYH3G2mqo1qLP1RCCZJHE1Fq8fgCYmLJ0Xli-nLvFZjt3g0HIui_IvyZi6YtXS97p9ohgfgDJnqcGH6l053AP0cO7ZQDHtS2_9P9UqgaA47gmltDVEDkSThX7js&bm=50&la=ja&cn=jp&cid=4215873&info=x_ME1qzmB7TY6hTSn_XUw5s6N-EkBgxcE4qJ0fd9amgsJzO3-Gtm2Nja777SyGlpkF6k_tSzbcLYYecYQlHncOAAIyuNaT2rvqrhxrQPfC7opZUGQ8WMx4Rwkx8R2k0nDiBI8xnegLWYTvY-Fc99Rw&sid=38__149__12__24__144__163__47__1__99&sp=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&scp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&acu=JPY&scu=USD&sgcp=mMrvLk32jGlArvPzkLzohkmMOOp6YSaVPquxpJIAub4&gprice=zM_t6HbCS8OclsiLiZUjtAqxHOGHkHjKXNZ9_buiV_s&gcp=WDWnWmVvDyEauBe8AfxyP7vfEVRzDMzzKOeztgGoSWY&ah=&pb=m&de=infoseek.co.jp&cat=&iv=0\" target=\"_blank\"><div class=\"mediago-brand-name_46ee9c mediago-brand-name\">Factable</div></a></div></div></div></div>'
55
56
  tempAdm += '%3Cscr';
56
57
  tempAdm += 'ipt%3E';
@@ -44,8 +44,9 @@ describe('TheMediaGrid Adapter', function () {
44
44
  return JSON.parse(data);
45
45
  }
46
46
  const bidderRequest = {
47
- refererInfo: {page: 'https://example.com'},
47
+ refererInfo: { page: 'https://example.com' },
48
48
  bidderRequestId: '22edbae2733bf6',
49
+ transactionId: '1239bd74-4511-4335-af21-e828852e25d7',
49
50
  auctionId: '9e2dfbfe-00c7-4f5e-9850-4044df3229c7',
50
51
  timeout: 3000
51
52
  };
@@ -67,6 +68,7 @@ describe('TheMediaGrid Adapter', function () {
67
68
  'bidId': '42dbe3a7168a6a',
68
69
  'bidderRequestId': '22edbae2733bf6',
69
70
  'auctionId': '9e2dfbfe-00c7-4f5e-9850-4044df3229c7',
71
+ transactionId: '1239bd74-4511-4335-af21-e828852e25d7',
70
72
  },
71
73
  {
72
74
  'bidder': 'grid',
@@ -78,6 +80,7 @@ describe('TheMediaGrid Adapter', function () {
78
80
  'bidId': '30b31c1838de1e',
79
81
  'bidderRequestId': '22edbae2733bf6',
80
82
  'auctionId': '9e2dfbfe-00c7-4f5e-9850-4044df3229c7',
83
+ transactionId: '1239bd74-4511-4335-af21-e828852e25d7',
81
84
  },
82
85
  {
83
86
  'bidder': 'grid',
@@ -95,6 +98,7 @@ describe('TheMediaGrid Adapter', function () {
95
98
  'bidId': '3150ccb55da321',
96
99
  'bidderRequestId': '22edbae2733bf6',
97
100
  'auctionId': '9e2dfbfe-00c7-4f5e-9850-4044df3229c7',
101
+ transactionId: '1239bd74-4511-4335-af21-e828852e25d7',
98
102
  },
99
103
  {
100
104
  'bidder': 'grid',
@@ -115,6 +119,7 @@ describe('TheMediaGrid Adapter', function () {
115
119
  'bidId': '3150ccb55da321',
116
120
  'bidderRequestId': '22edbae2733bf6',
117
121
  'auctionId': '9e2dfbfe-00c7-4f5e-9850-4044df3229c7',
122
+ transactionId: '1239bd74-4511-4335-af21-e828852e25d7',
118
123
  }
119
124
  ];
120
125
 
@@ -395,6 +400,158 @@ describe('TheMediaGrid Adapter', function () {
395
400
  getDataFromLocalStorageStub.restore();
396
401
  });
397
402
 
403
+ it('should send additional request with adUnits with withCriteo parameter', function () {
404
+ const fpdUserIdVal = '0b0f84a1-1596-4165-9742-2e1a7dfac57f';
405
+ const getDataFromLocalStorageStub = sinon.stub(storage, 'getDataFromLocalStorage').callsFake(
406
+ arg => arg === 'tmguid' ? fpdUserIdVal : null);
407
+
408
+ const bidRequestsWithCriteo = bidRequests.map((bid, i) =>
409
+ i % 2 ? bid : {
410
+ ...bid,
411
+ params: {
412
+ ...bid.params,
413
+ withCriteo: true,
414
+ networkId: 123 + i
415
+ },
416
+ mediaTypes: {
417
+ ...bid.mediaTypes,
418
+ ...(bid.mediaTypes.video && { video: {
419
+ ...bid.mediaTypes.video,
420
+ context: 'instream',
421
+ protocols: [1, 2, 3],
422
+ maxduration: 30,
423
+ api: [1, 2],
424
+ skip: 1,
425
+ placement: 1,
426
+ minduration: 0,
427
+ playbackmethod: 1,
428
+ startdelay: 0
429
+ }
430
+ })
431
+ }
432
+ });
433
+
434
+ const [request, criteoRequest] = spec.buildRequests(bidRequestsWithCriteo, bidderRequest);
435
+ expect(request.data).to.be.an('string');
436
+ expect(criteoRequest.data).to.be.an('object');
437
+ const payload = parseRequest(request.data);
438
+ const criteoPayload = criteoRequest.data;
439
+ expect(request.url).to.equal('https://grid.bidswitch.net/hbjson');
440
+ expect(criteoRequest.url.replace(/\?.*$/, ''))
441
+ .to.equal('https://bidder.criteo.com/cdb');
442
+ expect(payload).to.deep.equal({
443
+ 'id': bidderRequest.bidderRequestId,
444
+ 'site': {
445
+ 'page': referrer
446
+ },
447
+ 'tmax': bidderRequest.timeout,
448
+ 'source': {
449
+ 'tid': bidderRequest.auctionId,
450
+ 'ext': {'wrapper': 'Prebid_js', 'wrapper_version': '$prebid.version$'}
451
+ },
452
+ 'user': {
453
+ 'id': fpdUserIdVal
454
+ },
455
+ 'imp': [{
456
+ 'id': bidRequests[0].bidId,
457
+ 'tagid': bidRequests[0].params.uid,
458
+ 'ext': {'divid': bidRequests[0].adUnitCode},
459
+ 'bidfloor': bidRequests[0].params.bidFloor,
460
+ 'banner': {
461
+ 'w': 300,
462
+ 'h': 250,
463
+ 'format': [{'w': 300, 'h': 250}, {'w': 300, 'h': 600}]
464
+ }
465
+ }, {
466
+ 'id': bidRequests[1].bidId,
467
+ 'tagid': bidRequests[1].params.uid,
468
+ 'ext': {'divid': bidRequests[1].adUnitCode},
469
+ 'banner': {
470
+ 'w': 300,
471
+ 'h': 250,
472
+ 'format': [{'w': 300, 'h': 250}, {'w': 300, 'h': 600}]
473
+ }
474
+ }, {
475
+ 'id': bidRequests[2].bidId,
476
+ 'tagid': bidRequests[2].params.uid,
477
+ 'ext': {'divid': bidRequests[2].adUnitCode},
478
+ 'video': {
479
+ 'w': 400,
480
+ 'h': 600,
481
+ 'protocols': [1, 2, 3],
482
+ 'mimes': ['video/mp4', 'video/webm', 'application/javascript', 'video/ogg'],
483
+ }
484
+ }, {
485
+ 'id': bidRequests[3].bidId,
486
+ 'tagid': bidRequests[3].params.uid,
487
+ 'ext': {'divid': bidRequests[3].adUnitCode},
488
+ 'banner': {
489
+ 'w': 728,
490
+ 'h': 90,
491
+ 'format': [{'w': 728, 'h': 90}]
492
+ },
493
+ 'video': {
494
+ 'w': 400,
495
+ 'h': 600,
496
+ 'protocols': [1, 2, 3]
497
+ }
498
+ }]
499
+ });
500
+
501
+ expect(criteoPayload).to.deep.equal({
502
+ 'publisher': {
503
+ 'ext': undefined,
504
+ 'url': bidderRequest.refererInfo.page,
505
+ 'networkid': 125
506
+ },
507
+ 'regs': {
508
+ 'coppa': undefined
509
+ },
510
+ 'slots': [{
511
+ 'impid': bidRequests[0].adUnitCode,
512
+ 'transactionid': bidderRequest.transactionId,
513
+ 'auctionId': bidderRequest.auctionId,
514
+ 'sizes': ['300x250', '300x600']
515
+ }, {
516
+ 'impid': bidRequests[2].adUnitCode,
517
+ 'transactionid': bidderRequest.transactionId,
518
+ 'auctionId': bidderRequest.auctionId,
519
+ 'sizes': [],
520
+ 'video': {
521
+ 'api': [
522
+ 1,
523
+ 2
524
+ ],
525
+ 'maxduration': 30,
526
+ 'mimes': [
527
+ 'video/mp4',
528
+ 'video/webm',
529
+ 'application/javascript',
530
+ 'video/ogg',
531
+ ],
532
+ 'minduration': 0,
533
+ 'placement': 1,
534
+ 'playbackmethod': 1,
535
+ 'playersizes': [
536
+ '400x600'
537
+ ],
538
+ 'protocols': [
539
+ 1,
540
+ 2,
541
+ 3
542
+ ],
543
+ 'skip': 1,
544
+ 'startdelay': 0
545
+ }
546
+ }],
547
+ 'user': {
548
+ 'ext': undefined
549
+ }
550
+ });
551
+
552
+ getDataFromLocalStorageStub.restore();
553
+ });
554
+
398
555
  it('if gdprConsent is present payload must have gdpr params', function () {
399
556
  const gdprBidderRequest = Object.assign({gdprConsent: {consentString: 'AAA', gdprApplies: true}}, bidderRequest);
400
557
  const [request] = spec.buildRequests(bidRequests, gdprBidderRequest);
@@ -1365,6 +1522,137 @@ describe('TheMediaGrid Adapter', function () {
1365
1522
  expect(result).to.deep.equal(expectedResponse);
1366
1523
  });
1367
1524
 
1525
+ it('should add response with biggest price', function () {
1526
+ const mainResponse = [
1527
+ {'bid': [{'impid': '2164be6358b9', 'price': 1.15, 'adm': '<div>test content 1</div>', 'auid': 1, 'h': 250, 'w': 300, dealid: 11}], 'seat': '1'},
1528
+ {'bid': [{'impid': '4e111f1b66e4', 'price': 0.5, 'adm': '<div>test content 2</div>', 'auid': 2, 'h': 600, 'w': 300, dealid: 12}], 'seat': '1'},
1529
+ ];
1530
+ const criteoResponse = [
1531
+ {
1532
+ impid: 'adunit-code-1',
1533
+ cpm: 0.15,
1534
+ creative: '<div>test content 3</div>',
1535
+ creativecode: 1,
1536
+ bidId: '2164be6358b9',
1537
+ currency: 'USD',
1538
+ width: 300,
1539
+ height: 250,
1540
+ dealCode: 11,
1541
+ zoneid: 123,
1542
+ ttl: 360,
1543
+ adomain: ['criteo.com'],
1544
+ },
1545
+ {
1546
+ impid: 'adunit-code-1',
1547
+ cpm: 1,
1548
+ creative: '<div>test content 4</div>',
1549
+ creativecode: 2,
1550
+ bidId: '4e111f1b66e4',
1551
+ currency: 'USD',
1552
+ width: 300,
1553
+ height: 600,
1554
+ dealCode: 12,
1555
+ zoneid: 456,
1556
+ ttl: 360,
1557
+ adomain: ['criteo.com'],
1558
+ }
1559
+ ];
1560
+ const bidRequests = [
1561
+ {
1562
+ 'bidder': 'grid',
1563
+ 'params': {
1564
+ 'uid': '1',
1565
+ 'zoneId': 123,
1566
+ 'withCriteo': true
1567
+ },
1568
+ 'adUnitCode': 'adunit-code-1',
1569
+ 'sizes': [[300, 250], [300, 600]],
1570
+ 'bidId': '2164be6358b9',
1571
+ 'bidderRequestId': '106efe3247',
1572
+ 'auctionId': '32a1f276cb87cb8',
1573
+ 'transactionId': '43534f55b213ac',
1574
+ },
1575
+ {
1576
+ 'bidder': 'grid',
1577
+ 'params': {
1578
+ 'uid': '2',
1579
+ 'zoneId': 456,
1580
+ 'withCriteo': true
1581
+ },
1582
+ 'adUnitCode': 'adunit-code-1',
1583
+ 'sizes': [[300, 250], [300, 600]],
1584
+ 'bidId': '4e111f1b66e4',
1585
+ 'bidderRequestId': '106efe3247',
1586
+ 'auctionId': '32a1f276cb87cb8',
1587
+ 'transactionId': '43534f55b213ac',
1588
+ }
1589
+ ];
1590
+ const bidderRequest = {
1591
+ refererInfo: { page: 'https://example.com' },
1592
+ bidderRequestId: '106efe3247',
1593
+ transactionId: '43534f55b213ac',
1594
+ auctionId: '32a1f276cb87cb8',
1595
+ timeout: 3000
1596
+ };
1597
+ const [mainRequest, criteoRequest] = spec.buildRequests(bidRequests, bidderRequest);
1598
+ const expectedMainResponse = [
1599
+ {
1600
+ 'requestId': '2164be6358b9',
1601
+ 'cpm': 1.15,
1602
+ 'creativeId': 1,
1603
+ 'dealId': 11,
1604
+ 'width': 300,
1605
+ 'height': 250,
1606
+ 'ad': '<div>test content 1</div>',
1607
+ 'currency': 'USD',
1608
+ 'mediaType': 'banner',
1609
+ 'netRevenue': true,
1610
+ 'ttl': 360,
1611
+ 'meta': {
1612
+ advertiserDomains: []
1613
+ },
1614
+ },
1615
+ {
1616
+ 'requestId': '4e111f1b66e4',
1617
+ 'cpm': 0.5,
1618
+ 'creativeId': 2,
1619
+ 'dealId': 12,
1620
+ 'width': 300,
1621
+ 'height': 600,
1622
+ 'ad': '<div>test content 2</div>',
1623
+ 'currency': 'USD',
1624
+ 'mediaType': 'banner',
1625
+ 'netRevenue': true,
1626
+ 'ttl': 360,
1627
+ 'meta': {
1628
+ advertiserDomains: []
1629
+ },
1630
+ }
1631
+ ];
1632
+ const expectedCriteoResponse = [
1633
+ {
1634
+ 'requestId': '4e111f1b66e4',
1635
+ 'cpm': 1,
1636
+ 'creativeId': 2,
1637
+ 'dealId': 12,
1638
+ 'width': 300,
1639
+ 'height': 600,
1640
+ 'ad': '<div>test content 4</div>',
1641
+ 'currency': 'USD',
1642
+ 'netRevenue': true,
1643
+ 'ttl': 360,
1644
+ 'meta': {
1645
+ advertiserDomains: ['criteo.com']
1646
+ },
1647
+ }
1648
+ ];
1649
+
1650
+ const mainResult = spec.interpretResponse({'body': {'seatbid': mainResponse}}, mainRequest);
1651
+ const criteoResult = spec.interpretResponse({'body': {'slots': criteoResponse}}, criteoRequest);
1652
+ expect(mainResult).to.deep.equal(expectedMainResponse);
1653
+ expect(criteoResult).to.deep.equal(expectedCriteoResponse);
1654
+ });
1655
+
1368
1656
  it('response with ext.bidder.grid.demandSource', function () {
1369
1657
  const bidRequests = [
1370
1658
  {
@@ -148,14 +148,15 @@ describe('nextMillenniumBidAdapterTests', function() {
148
148
 
149
149
  it('Test getUserSyncs function', function () {
150
150
  const syncOptions = {
151
- 'iframeEnabled': true
151
+ 'iframeEnabled': false,
152
+ 'pixelEnabled': true
152
153
  }
153
154
  const userSync = spec.getUserSyncs(syncOptions);
154
155
  expect(userSync).to.be.an('array').with.lengthOf(1);
155
156
  expect(userSync[0].type).to.exist;
156
157
  expect(userSync[0].url).to.exist;
157
- expect(userSync[0].type).to.be.equal('iframe');
158
- expect(userSync[0].url).to.be.equal('https://statics.nextmillmedia.com/load-cookie.html?v=4');
158
+ expect(userSync[0].type).to.be.equal('image');
159
+ expect(userSync[0].url).to.be.equal('https://cookies.nextmillmedia.com/sync?type=image');
159
160
  });
160
161
 
161
162
  it('validate_response_params', function() {
@@ -158,12 +158,44 @@ describe('Smart bid adapter tests', function () {
158
158
  }
159
159
  };
160
160
 
161
+ var sellerDefinedAudience = [
162
+ {
163
+ 'name': 'hearst.com',
164
+ 'ext': { 'segtax': 1 },
165
+ 'segment': [
166
+ { 'id': '1001' },
167
+ { 'id': '1002' }
168
+ ]
169
+ }
170
+ ];
171
+
172
+ var sellerDefinedContext = [
173
+ {
174
+ 'name': 'cnn.com',
175
+ 'ext': { 'segtax': 2 },
176
+ 'segment': [
177
+ { 'id': '2002' }
178
+ ]
179
+ }
180
+ ];
181
+
161
182
  it('Verify build request', function () {
162
183
  config.setConfig({
163
184
  'currency': {
164
185
  'adServerCurrency': 'EUR'
186
+ },
187
+ ortb2: {
188
+ 'user': {
189
+ 'data': sellerDefinedAudience
190
+ },
191
+ 'site': {
192
+ 'content': {
193
+ 'data': sellerDefinedContext
194
+ }
195
+ }
165
196
  }
166
197
  });
198
+
167
199
  const request = spec.buildRequests(DEFAULT_PARAMS);
168
200
  expect(request[0]).to.have.property('url').and.to.equal('https://prg.smartadserver.com/prebid/v1');
169
201
  expect(request[0]).to.have.property('method').and.to.equal('POST');
@@ -186,6 +218,8 @@ describe('Smart bid adapter tests', function () {
186
218
  expect(requestContent).to.have.property('buid').and.to.equal('7569');
187
219
  expect(requestContent).to.have.property('appname').and.to.equal('Mozilla');
188
220
  expect(requestContent).to.have.property('ckid').and.to.equal(42);
221
+ expect(requestContent).to.have.property('sda').and.to.deep.equal(sellerDefinedAudience);
222
+ expect(requestContent).to.have.property('sdc').and.to.deep.equal(sellerDefinedContext);
189
223
  });
190
224
 
191
225
  it('Verify parse response with no ad', function () {
@@ -200,6 +234,27 @@ describe('Smart bid adapter tests', function () {
200
234
  }).to.not.throw();
201
235
  });
202
236
 
237
+ it('Should not nest response if ad and adUrl empty', () => {
238
+ const BID_RESPONSE_EMPTY = {
239
+ body: {
240
+ ad: null,
241
+ adUrl: null,
242
+ cpm: 0.92,
243
+ isNoAd: false
244
+ }
245
+ };
246
+
247
+ const request = spec.buildRequests(DEFAULT_PARAMS);
248
+ const bids = spec.interpretResponse(BID_RESPONSE_EMPTY, request[0]);
249
+
250
+ expect(bids).to.have.lengthOf(0);
251
+ expect(() => {
252
+ spec.interpretResponse(BID_RESPONSE_EMPTY, {
253
+ data: 'invalid Json'
254
+ });
255
+ }).to.not.throw();
256
+ });
257
+
203
258
  it('Verify parse response', function () {
204
259
  const request = spec.buildRequests(DEFAULT_PARAMS);
205
260
  const bids = spec.interpretResponse(BID_RESPONSE, request[0]);
@@ -337,6 +392,7 @@ describe('Smart bid adapter tests', function () {
337
392
 
338
393
  describe('gdpr tests', function () {
339
394
  afterEach(function () {
395
+ config.setConfig({ ortb2: undefined });
340
396
  config.resetConfig();
341
397
  $$PREBID_GLOBAL$$.requestBids.removeAll();
342
398
  });
@@ -468,6 +524,16 @@ describe('Smart bid adapter tests', function () {
468
524
  config.setConfig({
469
525
  'currency': {
470
526
  'adServerCurrency': 'EUR'
527
+ },
528
+ ortb2: {
529
+ 'user': {
530
+ 'data': sellerDefinedAudience
531
+ },
532
+ 'site': {
533
+ 'content': {
534
+ 'data': sellerDefinedContext
535
+ }
536
+ }
471
537
  }
472
538
  });
473
539
  const request = spec.buildRequests(INSTREAM_DEFAULT_PARAMS);
@@ -486,6 +552,8 @@ describe('Smart bid adapter tests', function () {
486
552
  expect(requestContent).to.have.property('buid').and.to.equal('7569');
487
553
  expect(requestContent).to.have.property('appname').and.to.equal('Mozilla');
488
554
  expect(requestContent).to.have.property('ckid').and.to.equal(42);
555
+ expect(requestContent).to.have.property('sda').and.to.deep.equal(sellerDefinedAudience);
556
+ expect(requestContent).to.have.property('sdc').and.to.deep.equal(sellerDefinedContext);
489
557
  expect(requestContent).to.have.property('isVideo').and.to.equal(true);
490
558
  expect(requestContent).to.have.property('videoData');
491
559
  expect(requestContent.videoData).to.have.property('videoProtocol').and.to.equal(6);
@@ -727,6 +795,16 @@ describe('Smart bid adapter tests', function () {
727
795
  config.setConfig({
728
796
  'currency': {
729
797
  'adServerCurrency': 'EUR'
798
+ },
799
+ ortb2: {
800
+ 'user': {
801
+ 'data': sellerDefinedAudience
802
+ },
803
+ 'site': {
804
+ 'content': {
805
+ 'data': sellerDefinedContext
806
+ }
807
+ }
730
808
  }
731
809
  });
732
810
  const request = spec.buildRequests(OUTSTREAM_DEFAULT_PARAMS);
@@ -745,6 +823,8 @@ describe('Smart bid adapter tests', function () {
745
823
  expect(requestContent).to.have.property('buid').and.to.equal('7579');
746
824
  expect(requestContent).to.have.property('appname').and.to.equal('Mozilla');
747
825
  expect(requestContent).to.have.property('ckid').and.to.equal(43);
826
+ expect(requestContent).to.have.property('sda').and.to.deep.equal(sellerDefinedAudience);
827
+ expect(requestContent).to.have.property('sdc').and.to.deep.equal(sellerDefinedContext);
748
828
  expect(requestContent).to.have.property('isVideo').and.to.equal(false);
749
829
  expect(requestContent).to.have.property('videoData');
750
830
  expect(requestContent.videoData).to.have.property('videoProtocol').and.to.equal(7);
@@ -342,6 +342,38 @@ describe('The smartx adapter', function () {
342
342
  expect(request.data.imp[0].video.minduration).to.equal(3);
343
343
  expect(request.data.imp[0].video.maxduration).to.equal(15);
344
344
  });
345
+
346
+ it('should pass schain param', function () {
347
+ var request;
348
+
349
+ bid.schain = {
350
+ complete: 1,
351
+ nodes: [
352
+ {
353
+ asi: 'indirectseller.com',
354
+ sid: '00001',
355
+ hp: 1
356
+ }
357
+ ]
358
+ }
359
+
360
+ request = spec.buildRequests([bid], bidRequestObj)[0];
361
+
362
+ expect(request.data.source).to.deep.equal({
363
+ ext: {
364
+ schain: {
365
+ complete: 1,
366
+ nodes: [
367
+ {
368
+ asi: 'indirectseller.com',
369
+ sid: '00001',
370
+ hp: 1
371
+ }
372
+ ]
373
+ }
374
+ }
375
+ })
376
+ });
345
377
  });
346
378
 
347
379
  describe('interpretResponse', function () {