prebid.js 7.33.0 → 7.35.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 (219) hide show
  1. package/.devcontainer/devcontainer.json +2 -1
  2. package/.github/workflows/issue_tracker.yml +27 -16
  3. package/dist/33acrossBidAdapter.js +1 -1
  4. package/dist/33acrossIdSystem.js +1 -1
  5. package/dist/adagioBidAdapter.js +1 -1
  6. package/dist/adbookpspBidAdapter.js +1 -1
  7. package/dist/adgenerationBidAdapter.js +1 -1
  8. package/dist/admaticBidAdapter.js +1 -1
  9. package/dist/admixerBidAdapter.js +1 -1
  10. package/dist/adnuntiusBidAdapter.js +1 -1
  11. package/dist/adrelevantisBidAdapter.js +1 -1
  12. package/dist/adtrgtmeBidAdapter.js +1 -1
  13. package/dist/adxcgBidAdapter.js +1 -1
  14. package/dist/adyoulikeBidAdapter.js +1 -1
  15. package/dist/ajaBidAdapter.js +1 -1
  16. package/dist/amxBidAdapter.js +1 -1
  17. package/dist/amxIdSystem.js +1 -1
  18. package/dist/appierAnalyticsAdapter.js +1 -1
  19. package/dist/appnexusBidAdapter.js +1 -1
  20. package/dist/arcspanRtdProvider.js +1 -0
  21. package/dist/asoBidAdapter.js +1 -1
  22. package/dist/axonixBidAdapter.js +1 -1
  23. package/dist/bidglassBidAdapter.js +1 -1
  24. package/dist/big-richmediaBidAdapter.js +1 -1
  25. package/dist/bliinkBidAdapter.js +1 -1
  26. package/dist/bridgewellBidAdapter.js +1 -1
  27. package/dist/brightMountainMediaBidAdapter.js +1 -1
  28. package/dist/carodaBidAdapter.js +1 -1
  29. package/dist/chtnwBidAdapter.js +1 -1
  30. package/dist/concertBidAdapter.js +1 -1
  31. package/dist/connectadBidAdapter.js +1 -1
  32. package/dist/consentManagement.js +1 -1
  33. package/dist/consumableBidAdapter.js +1 -1
  34. package/dist/conversantBidAdapter.js +1 -1
  35. package/dist/craftBidAdapter.js +1 -1
  36. package/dist/criteoBidAdapter.js +1 -1
  37. package/dist/cwireBidAdapter.js +1 -1
  38. package/dist/dspxBidAdapter.js +1 -1
  39. package/dist/emx_digitalBidAdapter.js +1 -1
  40. package/dist/eplanningBidAdapter.js +1 -1
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/glimpseBidAdapter.js +1 -1
  44. package/dist/gmosspBidAdapter.js +1 -1
  45. package/dist/goldbachBidAdapter.js +1 -1
  46. package/dist/gridBidAdapter.js +1 -1
  47. package/dist/gridNMBidAdapter.js +1 -1
  48. package/dist/gumgumBidAdapter.js +1 -1
  49. package/dist/h12mediaBidAdapter.js +1 -1
  50. package/dist/hadronIdSystem.js +1 -1
  51. package/dist/holidBidAdapter.js +1 -1
  52. package/dist/id5IdSystem.js +1 -1
  53. package/dist/improvedigitalBidAdapter.js +1 -1
  54. package/dist/inmarBidAdapter.js +1 -1
  55. package/dist/insticatorBidAdapter.js +1 -1
  56. package/dist/ixBidAdapter.js +1 -1
  57. package/dist/justpremiumBidAdapter.js +1 -1
  58. package/dist/kargoBidAdapter.js +1 -1
  59. package/dist/konduitAnalyticsAdapter.js +1 -1
  60. package/dist/kueezBidAdapter.js +1 -1
  61. package/dist/kueezRtbBidAdapter.js +1 -1
  62. package/dist/lassoBidAdapter.js +1 -1
  63. package/dist/lifestreetBidAdapter.js +1 -1
  64. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  65. package/dist/logicadBidAdapter.js +1 -1
  66. package/dist/loglyliftBidAdapter.js +1 -1
  67. package/dist/lotamePanoramaIdSystem.js +1 -1
  68. package/dist/magniteAnalyticsAdapter.js +1 -1
  69. package/dist/malltvAnalyticsAdapter.js +1 -1
  70. package/dist/marsmediaBidAdapter.js +1 -1
  71. package/dist/mediafuseBidAdapter.js +1 -1
  72. package/dist/mediasquareBidAdapter.js +1 -1
  73. package/dist/mgidBidAdapter.js +1 -1
  74. package/dist/minutemediaBidAdapter.js +1 -1
  75. package/dist/nextMillenniumBidAdapter.js +1 -1
  76. package/dist/nexx360BidAdapter.js +1 -1
  77. package/dist/not-for-prod/prebid.js +140 -149
  78. package/dist/oguryBidAdapter.js +1 -1
  79. package/dist/onetagBidAdapter.js +1 -1
  80. package/dist/ooloAnalyticsAdapter.js +1 -1
  81. package/dist/openxBidAdapter.js +1 -1
  82. package/dist/ortbConverter.js +1 -1
  83. package/dist/outbrainBidAdapter.js +1 -1
  84. package/dist/parrableIdSystem.js +1 -1
  85. package/dist/permutiveRtdProvider.js +1 -1
  86. package/dist/pixfutureBidAdapter.js +1 -1
  87. package/dist/prebid-core.js +1 -1
  88. package/dist/prebidServerBidAdapter.js +1 -1
  89. package/dist/priceFloors.js +1 -1
  90. package/dist/publinkIdSystem.js +1 -1
  91. package/dist/pubmaticBidAdapter.js +1 -1
  92. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  93. package/dist/pulsepointBidAdapter.js +1 -1
  94. package/dist/pxyzBidAdapter.js +1 -1
  95. package/dist/quantcastBidAdapter.js +1 -1
  96. package/dist/readpeakBidAdapter.js +1 -1
  97. package/dist/relaidoBidAdapter.js +1 -1
  98. package/dist/rhythmoneBidAdapter.js +1 -1
  99. package/dist/riseBidAdapter.js +1 -1
  100. package/dist/rubiconAnalyticsAdapter.js +1 -1
  101. package/dist/rubiconBidAdapter.js +1 -1
  102. package/dist/seedingAllianceBidAdapter.js +1 -1
  103. package/dist/seedtagBidAdapter.js +1 -1
  104. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  105. package/dist/sharethroughBidAdapter.js +1 -1
  106. package/dist/shinezBidAdapter.js +1 -1
  107. package/dist/smaatoBidAdapter.js +1 -1
  108. package/dist/smartadserverBidAdapter.js +1 -1
  109. package/dist/smartxBidAdapter.js +1 -1
  110. package/dist/smartytechBidAdapter.js +1 -1
  111. package/dist/smilewantedBidAdapter.js +1 -1
  112. package/dist/sonobiBidAdapter.js +1 -1
  113. package/dist/sovrnAnalyticsAdapter.js +1 -1
  114. package/dist/sovrnBidAdapter.js +1 -1
  115. package/dist/sspBCBidAdapter.js +1 -1
  116. package/dist/sublimeBidAdapter.js +1 -1
  117. package/dist/synacormediaBidAdapter.js +1 -1
  118. package/dist/taboolaBidAdapter.js +1 -1
  119. package/dist/targetVideoBidAdapter.js +1 -1
  120. package/dist/teadsBidAdapter.js +1 -1
  121. package/dist/trionBidAdapter.js +1 -1
  122. package/dist/tripleliftBidAdapter.js +1 -1
  123. package/dist/ttdBidAdapter.js +1 -1
  124. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  125. package/dist/uid2IdSystem.js +1 -1
  126. package/dist/underdogmediaBidAdapter.js +1 -1
  127. package/dist/undertoneBidAdapter.js +1 -1
  128. package/dist/vidazooBidAdapter.js +1 -1
  129. package/dist/videobyteBidAdapter.js +1 -1
  130. package/dist/visxBidAdapter.js +1 -1
  131. package/dist/vuukleBidAdapter.js +1 -1
  132. package/dist/widespaceBidAdapter.js +1 -1
  133. package/dist/winrBidAdapter.js +1 -1
  134. package/dist/yahoosspBidAdapter.js +1 -1
  135. package/dist/yieldmoBidAdapter.js +1 -1
  136. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  137. package/dist/zeta_global_sspBidAdapter.js +1 -1
  138. package/dist/zeusPrimeRtdProvider.js +4 -14
  139. package/integrationExamples/gpt/hello_world.html +0 -0
  140. package/libraries/ortbConverter/processors/default.js +19 -1
  141. package/modules/.submodules.json +1 -0
  142. package/modules/admaticBidAdapter.js +2 -1
  143. package/modules/admixerBidAdapter.js +26 -4
  144. package/modules/adnuntiusBidAdapter.js +36 -38
  145. package/modules/adyoulikeBidAdapter.js +2 -0
  146. package/modules/arcspanRtdProvider.js +73 -0
  147. package/modules/arcspanRtdProvider.md +11 -0
  148. package/modules/bliinkBidAdapter.js +1 -1
  149. package/modules/consentManagement.js +33 -5
  150. package/modules/consumableBidAdapter.js +20 -2
  151. package/modules/criteoBidAdapter.js +1 -1
  152. package/modules/cwireBidAdapter.js +169 -242
  153. package/modules/cwireBidAdapter.md +15 -14
  154. package/modules/emx_digitalBidAdapter.js +9 -2
  155. package/modules/hadronIdSystem.js +37 -32
  156. package/modules/holidBidAdapter.js +9 -4
  157. package/modules/kargoBidAdapter.js +5 -1
  158. package/modules/lotamePanoramaIdSystem.js +9 -1
  159. package/modules/nextMillenniumBidAdapter.js +19 -9
  160. package/modules/nexx360BidAdapter.js +1 -2
  161. package/modules/onetagBidAdapter.js +12 -1
  162. package/modules/openxBidAdapter.js +5 -0
  163. package/modules/outbrainBidAdapter.js +103 -6
  164. package/modules/permutiveRtdProvider.js +17 -12
  165. package/modules/prebidServerBidAdapter/index.js +14 -1
  166. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
  167. package/modules/priceFloors.js +7 -8
  168. package/modules/pulsepointBidAdapter.js +2 -0
  169. package/modules/seedingAllianceBidAdapter.js +129 -116
  170. package/modules/smartadserverBidAdapter.js +39 -28
  171. package/modules/smartyadsBidAdapter.md +9 -0
  172. package/modules/smartytechBidAdapter.js +67 -10
  173. package/modules/smartytechBidAdapter.md +44 -33
  174. package/modules/sonobiBidAdapter.js +17 -10
  175. package/modules/taboolaBidAdapter.js +2 -1
  176. package/modules/tripleliftBidAdapter.js +4 -0
  177. package/modules/vidazooBidAdapter.js +56 -22
  178. package/modules/zeta_global_sspBidAdapter.js +15 -0
  179. package/modules/zeusPrimeRtdProvider.js +3 -323
  180. package/modules/zeusPrimeRtdProvider.md +3 -0
  181. package/package.json +1 -1
  182. package/src/adloader.js +2 -1
  183. package/src/auction.js +2 -11
  184. package/src/prebid.js +8 -0
  185. package/src/utils/cpm.js +17 -0
  186. package/test/spec/modules/admixerBidAdapter_spec.js +140 -60
  187. package/test/spec/modules/adnuntiusBidAdapter_spec.js +120 -120
  188. package/test/spec/modules/adyoulikeBidAdapter_spec.js +3 -0
  189. package/test/spec/modules/arcspanRtdProvider_spec.js +187 -0
  190. package/test/spec/modules/bliinkBidAdapter_spec.js +7 -7
  191. package/test/spec/modules/consentManagement_spec.js +49 -1
  192. package/test/spec/modules/consumableBidAdapter_spec.js +46 -0
  193. package/test/spec/modules/cwireBidAdapter_spec.js +249 -335
  194. package/test/spec/modules/emx_digitalBidAdapter_spec.js +30 -1
  195. package/test/spec/modules/hadronIdSystem_spec.js +4 -6
  196. package/test/spec/modules/holidBidAdapter_spec.js +29 -0
  197. package/test/spec/modules/kargoBidAdapter_spec.js +32 -0
  198. package/test/spec/modules/lotamePanoramaIdSystem_spec.js +16 -10
  199. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +14 -2
  200. package/test/spec/modules/nexx360BidAdapter_spec.js +0 -4
  201. package/test/spec/modules/onetagBidAdapter_spec.js +43 -0
  202. package/test/spec/modules/openxBidAdapter_spec.js +41 -0
  203. package/test/spec/modules/openxOrtbBidAdapter_spec.js +41 -0
  204. package/test/spec/modules/outbrainBidAdapter_spec.js +182 -18
  205. package/test/spec/modules/prebidServerBidAdapter_spec.js +138 -0
  206. package/test/spec/modules/pulsepointBidAdapter_spec.js +11 -1
  207. package/test/spec/modules/seedingAllianceAdapter_spec.js +66 -23
  208. package/test/spec/modules/smartadserverBidAdapter_spec.js +116 -5
  209. package/test/spec/modules/smartytechBidAdapter_spec.js +172 -14
  210. package/test/spec/modules/sonobiBidAdapter_spec.js +2 -1
  211. package/test/spec/modules/taboolaBidAdapter_spec.js +12 -3
  212. package/test/spec/modules/tripleliftBidAdapter_spec.js +13 -0
  213. package/test/spec/modules/userId_spec.js +19 -14
  214. package/test/spec/modules/vidazooBidAdapter_spec.js +61 -22
  215. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +8 -0
  216. package/test/spec/ortbConverter/default_processors_spec.js +23 -0
  217. package/test/spec/unit/pbjs_api_spec.js +14 -0
  218. package/test/spec/unit/utils/cpm_spec.js +64 -0
  219. package/test/spec/modules/zeusPrimeRtdProvider_spec.js +0 -410
@@ -707,7 +707,7 @@ describe('emx_digital Adapter', function () {
707
707
  }));
708
708
  });
709
709
 
710
- it('returns valid advertiser domain', function () {
710
+ it('returns valid advertiser domains', function () {
711
711
  const bidResponse = utils.deepClone(serverResponse);
712
712
  let result = spec.interpretResponse({body: bidResponse});
713
713
  expect(result[0].meta.advertiserDomains).to.deep.equal(expectedResponse[0].meta.advertiserDomains);
@@ -724,6 +724,7 @@ describe('emx_digital Adapter', function () {
724
724
  expect(syncs).to.not.be.an('undefined');
725
725
  expect(syncs).to.have.lengthOf(1);
726
726
  expect(syncs[0].type).to.equal('iframe');
727
+ expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html')
727
728
  });
728
729
 
729
730
  it('should pass gdpr params', function () {
@@ -734,6 +735,34 @@ describe('emx_digital Adapter', function () {
734
735
  expect(syncs).to.have.lengthOf(1);
735
736
  expect(syncs[0].type).to.equal('iframe');
736
737
  expect(syncs[0].url).to.contains('gdpr=0');
738
+ expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=0&gdpr_consent=test')
739
+ });
740
+
741
+ it('should pass us_privacy string', function () {
742
+ let syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {
743
+ consentString: 'test',
744
+ });
745
+ expect(syncs).to.not.be.an('undefined');
746
+ expect(syncs).to.have.lengthOf(1);
747
+ expect(syncs[0].type).to.equal('iframe');
748
+ expect(syncs[0].url).to.contains('usp=test');
749
+ });
750
+
751
+ it('should pass us_privacy and gdpr strings', function () {
752
+ let syncs = spec.getUserSyncs({ iframeEnabled: true }, {},
753
+ {
754
+ gdprApplies: true,
755
+ consentString: 'test'
756
+ },
757
+ {
758
+ consentString: 'test'
759
+ });
760
+ expect(syncs).to.not.be.an('undefined');
761
+ expect(syncs).to.have.lengthOf(1);
762
+ expect(syncs[0].type).to.equal('iframe');
763
+ expect(syncs[0].url).to.contains('gdpr=1');
764
+ expect(syncs[0].url).to.contains('usp=test');
765
+ expect(syncs[0].url).to.equal('https://biddr.brealtime.com/check.html?gdpr=1&gdpr_consent=test&usp=test')
737
766
  });
738
767
  });
739
768
  });
@@ -24,7 +24,7 @@ describe('HadronIdSystem', function () {
24
24
  const request = server.requests[0];
25
25
  expect(request.url).to.eq(`https://id.hadron.ad.gt/api/v1/pbhid?partner_id=0&_it=prebid`);
26
26
  request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ hadronId: 'testHadronId1' }));
27
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({hadronId: 'testHadronId1'});
27
+ expect(callbackSpy.lastCall.lastArg).to.deep.equal({ id: { hadronId: 'testHadronId1' } });
28
28
  });
29
29
 
30
30
  it('gets a cached hadronid', function() {
@@ -33,10 +33,8 @@ describe('HadronIdSystem', function () {
33
33
  };
34
34
  getDataFromLocalStorageStub.withArgs('auHadronId').returns('tstCachedHadronId1');
35
35
 
36
- const callbackSpy = sinon.spy();
37
- const callback = hadronIdSubmodule.getId(config).callback;
38
- callback(callbackSpy);
39
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({hadronId: 'tstCachedHadronId1'});
36
+ const result = hadronIdSubmodule.getId(config);
37
+ expect(result).to.deep.equal({ id: { hadronId: 'tstCachedHadronId1' } });
40
38
  });
41
39
 
42
40
  it('allows configurable id url', function() {
@@ -51,7 +49,7 @@ describe('HadronIdSystem', function () {
51
49
  const request = server.requests[0];
52
50
  expect(request.url).to.eq('https://hadronid.publync.com?partner_id=0&_it=prebid');
53
51
  request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ hadronId: 'testHadronId1' }));
54
- expect(callbackSpy.lastCall.lastArg).to.deep.equal({hadronId: 'testHadronId1'});
52
+ expect(callbackSpy.lastCall.lastArg).to.deep.equal({ id: { hadronId: 'testHadronId1' } });
55
53
  });
56
54
  });
57
55
  });
@@ -161,5 +161,34 @@ describe('holidBidAdapterTests', () => {
161
161
 
162
162
  expect(userSyncs).to.deep.equal(expectedUserSyncs)
163
163
  })
164
+
165
+ it('should return empty user syncs when responsetimemillis is not defined', () => {
166
+ const optionsType = {
167
+ iframeEnabled: true,
168
+ pixelEnabled: true,
169
+ }
170
+ const serverResponse = [
171
+ {
172
+ body: {
173
+ ext: {},
174
+ },
175
+ },
176
+ ]
177
+ const gdprConsent = {
178
+ gdprApplies: 1,
179
+ consentString: 'dkj49Sjmfjuj34as:12jaf90123hufabidfy9u23brfpoig',
180
+ }
181
+ const uspConsent = 'mkjvbiniwot4827obfoy8sdg8203gb'
182
+ const expectedUserSyncs = []
183
+
184
+ const userSyncs = spec.getUserSyncs(
185
+ optionsType,
186
+ serverResponse,
187
+ gdprConsent,
188
+ uspConsent
189
+ )
190
+
191
+ expect(userSyncs).to.deep.equal(expectedUserSyncs)
192
+ })
164
193
  })
165
194
  })
@@ -556,6 +556,17 @@ describe('kargo adapter tests', function () {
556
556
  mediaType: 'video',
557
557
  metadata: {},
558
558
  currency: 'EUR'
559
+ },
560
+ 6: {
561
+ id: 'bar',
562
+ cpm: 2.5,
563
+ adm: '',
564
+ admUrl: 'https://foobar.com/vast_adm',
565
+ width: 300,
566
+ height: 250,
567
+ mediaType: 'video',
568
+ metadata: {},
569
+ currency: 'EUR'
559
570
  }
560
571
  }}, {
561
572
  currency: 'USD',
@@ -584,6 +595,11 @@ describe('kargo adapter tests', function () {
584
595
  params: {
585
596
  placementId: 'bar'
586
597
  }
598
+ }, {
599
+ bidId: 6,
600
+ params: {
601
+ placementId: 'bar'
602
+ }
587
603
  }]
588
604
  });
589
605
  var expectation = [{
@@ -664,6 +680,22 @@ describe('kargo adapter tests', function () {
664
680
  meta: {
665
681
  mediaType: 'video'
666
682
  }
683
+ }, {
684
+ requestId: '6',
685
+ cpm: 2.5,
686
+ width: 300,
687
+ height: 250,
688
+ ad: '',
689
+ vastUrl: 'https://foobar.com/vast_adm',
690
+ ttl: 300,
691
+ creativeId: 'bar',
692
+ dealId: undefined,
693
+ netRevenue: true,
694
+ currency: 'EUR',
695
+ mediaType: 'video',
696
+ meta: {
697
+ mediaType: 'video'
698
+ }
667
699
  }];
668
700
  expect(resp).to.deep.equal(expectation);
669
701
  });
@@ -18,6 +18,7 @@ describe('LotameId', function() {
18
18
  let removeFromLocalStorageStub;
19
19
  let timeStampStub;
20
20
  let uspConsentDataStub;
21
+ let requestHost;
21
22
 
22
23
  const nowTimestamp = new Date().getTime();
23
24
 
@@ -33,6 +34,11 @@ describe('LotameId', function() {
33
34
  );
34
35
  timeStampStub = sinon.stub(utils, 'timestamp').returns(nowTimestamp);
35
36
  uspConsentDataStub = sinon.stub(uspDataHandler, 'getConsentData');
37
+ if (navigator.userAgent && navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
38
+ requestHost = 'https://c.ltmsphrcl.net/id';
39
+ } else {
40
+ requestHost = 'https://id.crwdcntrl.net/id';
41
+ }
36
42
  });
37
43
 
38
44
  afterEach(function () {
@@ -69,7 +75,7 @@ describe('LotameId', function() {
69
75
  });
70
76
 
71
77
  it('should call the remote server when getId is called', function () {
72
- expect(request.url).to.be.eq('https://id.crwdcntrl.net/id');
78
+ expect(request.url).to.be.eq(`${requestHost}`);
73
79
  expect(callBackSpy.calledOnce).to.be.true;
74
80
  });
75
81
 
@@ -439,7 +445,7 @@ describe('LotameId', function() {
439
445
 
440
446
  it('should pass the gdpr consent string back', function() {
441
447
  expect(request.url).to.be.eq(
442
- 'https://id.crwdcntrl.net/id?gdpr_applies=true&gdpr_consent=consentGiven'
448
+ `${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
443
449
  );
444
450
  });
445
451
  });
@@ -471,7 +477,7 @@ describe('LotameId', function() {
471
477
 
472
478
  it('should pass the gdpr consent string back', function() {
473
479
  expect(request.url).to.be.eq(
474
- 'https://id.crwdcntrl.net/id?gdpr_applies=true&gdpr_consent=consentGiven'
480
+ `${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
475
481
  );
476
482
  });
477
483
  });
@@ -503,7 +509,7 @@ describe('LotameId', function() {
503
509
 
504
510
  it('should pass the gdpr consent string back', function() {
505
511
  expect(request.url).to.be.eq(
506
- 'https://id.crwdcntrl.net/id?gdpr_applies=true&gdpr_consent=consentGiven'
512
+ `${requestHost}?gdpr_applies=true&gdpr_consent=consentGiven`
507
513
  );
508
514
  });
509
515
  });
@@ -531,7 +537,7 @@ describe('LotameId', function() {
531
537
 
532
538
  it('should not include the gdpr consent string on the url', function() {
533
539
  expect(request.url).to.be.eq(
534
- 'https://id.crwdcntrl.net/id?gdpr_applies=true'
540
+ `${requestHost}?gdpr_applies=true`
535
541
  );
536
542
  });
537
543
  });
@@ -560,7 +566,7 @@ describe('LotameId', function() {
560
566
 
561
567
  it('should pass the gdpr consent string back', function() {
562
568
  expect(request.url).to.be.eq(
563
- 'https://id.crwdcntrl.net/id?gdpr_consent=consentGiven'
569
+ `${requestHost}?gdpr_consent=consentGiven`
564
570
  );
565
571
  });
566
572
  });
@@ -589,7 +595,7 @@ describe('LotameId', function() {
589
595
 
590
596
  it('should pass the gdpr consent string back', function() {
591
597
  expect(request.url).to.be.eq(
592
- 'https://id.crwdcntrl.net/id?gdpr_consent=consentGiven'
598
+ `${requestHost}?gdpr_consent=consentGiven`
593
599
  );
594
600
  });
595
601
  });
@@ -613,7 +619,7 @@ describe('LotameId', function() {
613
619
  });
614
620
 
615
621
  it('should pass the gdpr consent string back', function() {
616
- expect(request.url).to.be.eq('https://id.crwdcntrl.net/id');
622
+ expect(request.url).to.be.eq(`${requestHost}`);
617
623
  });
618
624
  });
619
625
 
@@ -835,7 +841,7 @@ describe('LotameId', function() {
835
841
 
836
842
  it('should pass the usp consent string and client id back', function () {
837
843
  expect(request.url).to.be.eq(
838
- 'https://id.crwdcntrl.net/id?gdpr_applies=false&us_privacy=1NNN&c=1234'
844
+ `${requestHost}?gdpr_applies=false&us_privacy=1NNN&c=1234`
839
845
  );
840
846
  });
841
847
 
@@ -923,7 +929,7 @@ describe('LotameId', function() {
923
929
 
924
930
  it('should pass client id back', function () {
925
931
  expect(request.url).to.be.eq(
926
- 'https://id.crwdcntrl.net/id?gdpr_applies=false&c=1234'
932
+ `${requestHost}?gdpr_applies=false&c=1234`
927
933
  );
928
934
  });
929
935
 
@@ -49,7 +49,7 @@ describe('nextMillenniumBidAdapterTests', function() {
49
49
  cur: 'USD',
50
50
  ext: {
51
51
  sync: {
52
- image: ['urlA'],
52
+ image: ['urlA?gdpr={{.GDPR}}'],
53
53
  iframe: ['urlB'],
54
54
  }
55
55
  }
@@ -132,7 +132,7 @@ describe('nextMillenniumBidAdapterTests', function() {
132
132
  let userSync = spec.getUserSyncs(syncOptions, [serverResponse], bidRequestData[0].gdprConsent, bidRequestData[0].uspConsent);
133
133
  expect(userSync).to.be.an('array').with.lengthOf(1);
134
134
  expect(userSync[0].type).to.equal('image');
135
- expect(userSync[0].url).to.equal('urlA');
135
+ expect(userSync[0].url).to.equal('urlA?gdpr=1');
136
136
 
137
137
  syncOptions.iframeEnabled = true;
138
138
  syncOptions.pixelEnabled = false;
@@ -142,6 +142,18 @@ describe('nextMillenniumBidAdapterTests', function() {
142
142
  expect(userSync[0].url).to.equal('urlB');
143
143
  });
144
144
 
145
+ it('Test getUserSyncs function if GDPR is undefined', function () {
146
+ const syncOptions = {
147
+ 'iframeEnabled': false,
148
+ 'pixelEnabled': true
149
+ }
150
+
151
+ let userSync = spec.getUserSyncs(syncOptions, [serverResponse], undefined, bidRequestData[0].uspConsent);
152
+ expect(userSync).to.be.an('array').with.lengthOf(1);
153
+ expect(userSync[0].type).to.equal('image');
154
+ expect(userSync[0].url).to.equal('urlA?gdpr=0');
155
+ });
156
+
145
157
  it('Request params check without GDPR Consent', function () {
146
158
  delete bidRequestData[0].gdprConsent
147
159
  const request = spec.buildRequests(bidRequestData, bidRequestData[0]);
@@ -372,7 +372,6 @@ describe('Nexx360 bid adapter tests', function () {
372
372
  }
373
373
  };
374
374
  const output = spec.interpretResponse(response);
375
- expect(output[0].bidderCode).to.be.eql('nexx360');
376
375
  expect(output[0].adUrl).to.be.eql(response.body.seatbid[0].bid[0].adUrl);
377
376
  expect(output[0].mediaType).to.be.eql(response.body.seatbid[0].bid[0].type);
378
377
  expect(output[0].currency).to.be.eql(response.body.cur);
@@ -411,7 +410,6 @@ describe('Nexx360 bid adapter tests', function () {
411
410
  }
412
411
  };
413
412
  const output = spec.interpretResponse(response);
414
- expect(output[0].bidderCode).to.be.eql('nexx360');
415
413
  expect(output[0].vastXml).to.be.eql(response.body.seatbid[0].bid[0].vastXml);
416
414
  expect(output[0].mediaType).to.be.eql('video');
417
415
  expect(output[0].currency).to.be.eql(response.body.cur);
@@ -454,7 +452,6 @@ describe('Nexx360 bid adapter tests', function () {
454
452
  }
455
453
  };
456
454
  const output = spec.interpretResponse(response);
457
- expect(output[0].bidderCode).to.be.eql('nexx360');
458
455
  expect(output[0].adUrl).to.be.eql(response.body.seatbid[0].bid[0].adUrl);
459
456
  expect(output[0].mediaType).to.be.eql(response.body.seatbid[0].bid[0].type);
460
457
  expect(output[0].currency).to.be.eql(response.body.cur);
@@ -490,7 +487,6 @@ describe('Nexx360 bid adapter tests', function () {
490
487
  }
491
488
  };
492
489
  const output = spec.interpretResponse(response);
493
- expect(output[0].bidderCode).to.be.eql('nexx360');
494
490
  expect(output[0].vastXml).to.be.eql(response.body.seatbid[0].bid[0].vastXml);
495
491
  expect(output[0].mediaType).to.be.eql('video');
496
492
  expect(output[0].currency).to.be.eql(response.body.cur);
@@ -266,6 +266,27 @@ describe('onetag', function () {
266
266
  expect(payload.gdprConsent.consentString).to.exist.and.to.equal(consentString);
267
267
  expect(payload.gdprConsent.consentRequired).to.exist.and.to.be.true;
268
268
  });
269
+ it('Should send GPP consent data', function () {
270
+ let consentString = 'consentString';
271
+ let applicableSections = [1, 2, 3];
272
+ let bidderRequest = {
273
+ 'bidderCode': 'onetag',
274
+ 'auctionId': '1d1a030790a475',
275
+ 'bidderRequestId': '22edbae2733bf6',
276
+ 'timeout': 3000,
277
+ 'gppConsent': {
278
+ gppString: consentString,
279
+ applicableSections: applicableSections
280
+ }
281
+ };
282
+ let serverRequest = spec.buildRequests([bannerBid], bidderRequest);
283
+ const payload = JSON.parse(serverRequest.data);
284
+
285
+ expect(payload).to.exist;
286
+ expect(payload.gppConsent).to.exist;
287
+ expect(payload.gppConsent.consentString).to.exist.and.to.equal(consentString);
288
+ expect(payload.gppConsent.applicableSections).to.have.same.members(applicableSections);
289
+ });
269
290
  it('Should send us privacy string', function () {
270
291
  let consentString = 'us_foo';
271
292
  let bidderRequest = {
@@ -375,6 +396,28 @@ describe('onetag', function () {
375
396
  expect(syncs[0].url).to.include(sync_endpoint);
376
397
  expect(syncs[0].url).to.not.match(/(?:[?&](?:gdpr_consent=([^&]*)|gdpr=([^&]*)))+$/);
377
398
  });
399
+ it('Must pass gpp consent string when gppConsent object is available', function () {
400
+ const syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {}, {
401
+ gppString: 'foo'
402
+ });
403
+ expect(syncs[0].type).to.equal('iframe');
404
+ expect(syncs[0].url).to.include(sync_endpoint);
405
+ expect(syncs[0].url).to.match(/(?:[?&](?:gpp_consent=foo([^&]*)))+$/);
406
+ });
407
+ it('Must pass no gpp params when consentString is null', function () {
408
+ const syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {}, {
409
+ gppString: null
410
+ });
411
+ expect(syncs[0].type).to.equal('iframe');
412
+ expect(syncs[0].url).to.include(sync_endpoint);
413
+ expect(syncs[0].url).to.not.match(/(?:[?&](?:gpp_consent=([^&]*)))+$/);
414
+ });
415
+ it('Must pass no gpp params when consentString is empty', function () {
416
+ const syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, {}, {});
417
+ expect(syncs[0].type).to.equal('iframe');
418
+ expect(syncs[0].url).to.include(sync_endpoint);
419
+ expect(syncs[0].url).to.not.match(/(?:[?&](?:gpp_consent=([^&]*)))+$/);
420
+ });
378
421
  it('Should send us privacy string', function () {
379
422
  let usConsentString = 'us_foo';
380
423
  const syncs = spec.getUserSyncs({ iframeEnabled: true }, {}, {}, usConsentString);
@@ -1729,6 +1729,47 @@ describe('OpenxAdapter', function () {
1729
1729
  });
1730
1730
  });
1731
1731
  });
1732
+ describe('with user agent client hints', function () {
1733
+ it('should add json query param sua with BidRequest.device.sua if available', function () {
1734
+ const bidderRequestWithUserAgentClientHints = { refererInfo: {},
1735
+ ortb2: {
1736
+ device: {
1737
+ sua: {
1738
+ source: 2,
1739
+ platform: {
1740
+ brand: 'macOS',
1741
+ version: [ '12', '4', '0' ]
1742
+ },
1743
+ browsers: [
1744
+ {
1745
+ brand: 'Chromium',
1746
+ version: [ '106', '0', '5249', '119' ]
1747
+ },
1748
+ {
1749
+ brand: 'Google Chrome',
1750
+ version: [ '106', '0', '5249', '119' ]
1751
+ },
1752
+ {
1753
+ brand: 'Not;A=Brand',
1754
+ version: [ '99', '0', '0', '0' ]
1755
+ }],
1756
+ mobile: 0,
1757
+ model: 'Pro',
1758
+ bitness: '64',
1759
+ architecture: 'x86'
1760
+ }
1761
+ }
1762
+ }};
1763
+
1764
+ let request = spec.buildRequests([bidRequest], bidderRequestWithUserAgentClientHints);
1765
+ expect(request[0].data.sua).to.exist;
1766
+ const payload = JSON.parse(request[0].data.sua);
1767
+ expect(payload).to.deep.equal(bidderRequestWithUserAgentClientHints.ortb2.device.sua);
1768
+ const bidderRequestWithoutUserAgentClientHints = {refererInfo: {}, ortb2: {}};
1769
+ request = spec.buildRequests([bidRequest], bidderRequestWithoutUserAgentClientHints);
1770
+ expect(request[0].data.sua).to.not.exist;
1771
+ });
1772
+ });
1732
1773
  });
1733
1774
  })
1734
1775
 
@@ -579,6 +579,47 @@ describe('OpenxRtbAdapter', function () {
579
579
  });
580
580
  });
581
581
  });
582
+
583
+ describe('with user agent client hints', function () {
584
+ it('should add device.sua if available', function () {
585
+ const bidderRequestWithUserAgentClientHints = { refererInfo: {},
586
+ ortb2: {
587
+ device: {
588
+ sua: {
589
+ source: 2,
590
+ platform: {
591
+ brand: 'macOS',
592
+ version: [ '12', '4', '0' ]
593
+ },
594
+ browsers: [
595
+ {
596
+ brand: 'Chromium',
597
+ version: [ '106', '0', '5249', '119' ]
598
+ },
599
+ {
600
+ brand: 'Google Chrome',
601
+ version: [ '106', '0', '5249', '119' ]
602
+ },
603
+ {
604
+ brand: 'Not;A=Brand',
605
+ version: [ '99', '0', '0', '0' ]
606
+ }],
607
+ mobile: 0,
608
+ model: 'Pro',
609
+ bitness: '64',
610
+ architecture: 'x86'
611
+ }
612
+ }
613
+ }};
614
+
615
+ let request = spec.buildRequests(bidRequests, bidderRequestWithUserAgentClientHints);
616
+ expect(request[0].data.device.sua).to.exist;
617
+ expect(request[0].data.device.sua).to.deep.equal(bidderRequestWithUserAgentClientHints.ortb2.device.sua);
618
+ const bidderRequestWithoutUserAgentClientHints = {refererInfo: {}, ortb2: {}};
619
+ request = spec.buildRequests(bidRequests, bidderRequestWithoutUserAgentClientHints);
620
+ expect(request[0].data.device?.sua).to.not.exist;
621
+ });
622
+ });
582
623
  });
583
624
 
584
625
  context('when there is a consent management framework', function () {