prebid.js 7.35.0 → 7.36.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 (188) hide show
  1. package/.devcontainer/Dockerfile +2 -0
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/admaruBidAdapter.js +1 -1
  8. package/dist/adrelevantisBidAdapter.js +1 -1
  9. package/dist/adtrgtmeBidAdapter.js +1 -1
  10. package/dist/adxcgBidAdapter.js +1 -1
  11. package/dist/adyoulikeBidAdapter.js +1 -1
  12. package/dist/aidemBidAdapter.js +1 -1
  13. package/dist/ajaBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/aolBidAdapter.js +1 -1
  17. package/dist/appierAnalyticsAdapter.js +1 -1
  18. package/dist/appnexusBidAdapter.js +1 -1
  19. package/dist/asoBidAdapter.js +1 -1
  20. package/dist/audiencerunBidAdapter.js +1 -1
  21. package/dist/axonixBidAdapter.js +1 -1
  22. package/dist/bidglassBidAdapter.js +1 -1
  23. package/dist/big-richmediaBidAdapter.js +1 -1
  24. package/dist/bluebillywigBidAdapter.js +1 -1
  25. package/dist/bridgewellBidAdapter.js +1 -1
  26. package/dist/brightMountainMediaBidAdapter.js +1 -1
  27. package/dist/brightcomBidAdapter.js +1 -1
  28. package/dist/brightcomSSPBidAdapter.js +1 -0
  29. package/dist/carodaBidAdapter.js +1 -1
  30. package/dist/chtnwBidAdapter.js +1 -1
  31. package/dist/concertBidAdapter.js +1 -1
  32. package/dist/connectadBidAdapter.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/dependencies.json +3 -0
  39. package/dist/dspxBidAdapter.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/freewheel-sspBidAdapter.js +1 -1
  44. package/dist/glimpseBidAdapter.js +1 -1
  45. package/dist/gmosspBidAdapter.js +1 -1
  46. package/dist/goldbachBidAdapter.js +1 -1
  47. package/dist/gridBidAdapter.js +1 -1
  48. package/dist/gridNMBidAdapter.js +1 -1
  49. package/dist/gumgumBidAdapter.js +1 -1
  50. package/dist/h12mediaBidAdapter.js +1 -1
  51. package/dist/id5IdSystem.js +1 -1
  52. package/dist/impactifyBidAdapter.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/jixieBidAdapter.js +1 -1
  58. package/dist/justpremiumBidAdapter.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/limelightDigitalBidAdapter.js +1 -1
  65. package/dist/liveIntentIdSystem.js +1 -1
  66. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  67. package/dist/logicadBidAdapter.js +1 -1
  68. package/dist/loglyliftBidAdapter.js +1 -1
  69. package/dist/magniteAnalyticsAdapter.js +1 -1
  70. package/dist/malltvAnalyticsAdapter.js +1 -1
  71. package/dist/marsmediaBidAdapter.js +1 -1
  72. package/dist/mediafuseBidAdapter.js +1 -1
  73. package/dist/mediakeysBidAdapter.js +1 -1
  74. package/dist/mediasquareBidAdapter.js +1 -1
  75. package/dist/mgidBidAdapter.js +1 -1
  76. package/dist/minutemediaBidAdapter.js +1 -1
  77. package/dist/neuwoRtdProvider.js +1 -0
  78. package/dist/nexx360BidAdapter.js +1 -1
  79. package/dist/not-for-prod/prebid.js +132 -129
  80. package/dist/oguryBidAdapter.js +1 -1
  81. package/dist/onetagBidAdapter.js +1 -1
  82. package/dist/ooloAnalyticsAdapter.js +1 -1
  83. package/dist/outbrainBidAdapter.js +1 -1
  84. package/dist/parrableIdSystem.js +1 -1
  85. package/dist/pixfutureBidAdapter.js +1 -1
  86. package/dist/prebid-core.js +1 -1
  87. package/dist/publinkIdSystem.js +1 -1
  88. package/dist/pubmaticBidAdapter.js +1 -1
  89. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  90. package/dist/pxyzBidAdapter.js +1 -1
  91. package/dist/quantcastBidAdapter.js +1 -1
  92. package/dist/readpeakBidAdapter.js +1 -1
  93. package/dist/relaidoBidAdapter.js +1 -1
  94. package/dist/rhythmoneBidAdapter.js +1 -1
  95. package/dist/riseBidAdapter.js +1 -1
  96. package/dist/rubiconAnalyticsAdapter.js +1 -1
  97. package/dist/rubiconBidAdapter.js +1 -1
  98. package/dist/scatteredBidAdapter.js +1 -0
  99. package/dist/seedingAllianceBidAdapter.js +1 -1
  100. package/dist/seedtagBidAdapter.js +1 -1
  101. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  102. package/dist/sharethroughBidAdapter.js +1 -1
  103. package/dist/shinezBidAdapter.js +1 -1
  104. package/dist/sirdataRtdProvider.js +1 -1
  105. package/dist/smaatoBidAdapter.js +1 -1
  106. package/dist/smartadserverBidAdapter.js +1 -1
  107. package/dist/smartxBidAdapter.js +1 -1
  108. package/dist/smilewantedBidAdapter.js +1 -1
  109. package/dist/sonobiBidAdapter.js +1 -1
  110. package/dist/sovrnAnalyticsAdapter.js +1 -1
  111. package/dist/sovrnBidAdapter.js +1 -1
  112. package/dist/sspBCBidAdapter.js +1 -1
  113. package/dist/sublimeBidAdapter.js +1 -1
  114. package/dist/synacormediaBidAdapter.js +1 -1
  115. package/dist/targetVideoBidAdapter.js +1 -1
  116. package/dist/teadsBidAdapter.js +1 -1
  117. package/dist/trionBidAdapter.js +1 -1
  118. package/dist/tripleliftBidAdapter.js +1 -1
  119. package/dist/ttdBidAdapter.js +1 -1
  120. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  121. package/dist/uid2IdSystem.js +1 -1
  122. package/dist/underdogmediaBidAdapter.js +1 -1
  123. package/dist/undertoneBidAdapter.js +1 -1
  124. package/dist/userId.js +1 -1
  125. package/dist/vidazooBidAdapter.js +1 -1
  126. package/dist/videobyteBidAdapter.js +1 -1
  127. package/dist/visxBidAdapter.js +1 -1
  128. package/dist/vuukleBidAdapter.js +1 -1
  129. package/dist/widespaceBidAdapter.js +1 -1
  130. package/dist/winrBidAdapter.js +1 -1
  131. package/dist/yahoosspBidAdapter.js +1 -1
  132. package/dist/yieldmoBidAdapter.js +1 -1
  133. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  134. package/integrationExamples/gpt/neuwoRtdProvider_example.html +190 -0
  135. package/modules/33acrossBidAdapter.js +13 -4
  136. package/modules/admaruBidAdapter.js +19 -1
  137. package/modules/aidemBidAdapter.js +90 -65
  138. package/modules/aidemBidAdapter.md +10 -7
  139. package/modules/ajaBidAdapter.js +6 -1
  140. package/modules/amxIdSystem.md +2 -10
  141. package/modules/aolBidAdapter.js +1 -1
  142. package/modules/appnexusBidAdapter.js +45 -48
  143. package/modules/brightcomBidAdapter.js +1 -0
  144. package/modules/brightcomSSPBidAdapter.js +323 -0
  145. package/modules/brightcomSSPBidAdapter.md +46 -0
  146. package/modules/feedadBidAdapter.js +35 -15
  147. package/modules/fpdModule/index.md +5 -2
  148. package/modules/freewheel-sspBidAdapter.js +5 -1
  149. package/modules/gridBidAdapter.js +3 -1
  150. package/modules/ixBidAdapter.js +318 -175
  151. package/modules/limelightDigitalBidAdapter.js +6 -1
  152. package/modules/limelightDigitalBidAdapter.md +12 -2
  153. package/modules/liveIntentIdSystem.js +1 -1
  154. package/modules/neuwoRtdProvider.js +171 -0
  155. package/modules/neuwoRtdProvider.md +40 -0
  156. package/modules/nexx360BidAdapter.js +1 -1
  157. package/modules/pubmaticBidAdapter.js +4 -0
  158. package/modules/scatteredBidAdapter.js +72 -0
  159. package/modules/scatteredBidAdapter.md +36 -0
  160. package/modules/sirdataRtdProvider.js +262 -284
  161. package/modules/smartxBidAdapter.js +2 -0
  162. package/modules/smilewantedBidAdapter.js +5 -0
  163. package/modules/topicsFpdModule.md +62 -0
  164. package/modules/userId/eids.js +1 -1
  165. package/modules/vidazooBidAdapter.js +3 -1
  166. package/modules/yahoosspBidAdapter.js +1 -1
  167. package/package.json +2 -2
  168. package/test/spec/modules/33acrossBidAdapter_spec.js +51 -18
  169. package/test/spec/modules/admaruBidAdapter_spec.js +48 -0
  170. package/test/spec/modules/aidemBidAdapter_spec.js +77 -10
  171. package/test/spec/modules/ajaBidAdapter_spec.js +21 -1
  172. package/test/spec/modules/aolBidAdapter_spec.js +2 -2
  173. package/test/spec/modules/appnexusBidAdapter_spec.js +123 -16
  174. package/test/spec/modules/brightcomSSPBidAdapter_spec.js +411 -0
  175. package/test/spec/modules/eids_spec.js +1 -1
  176. package/test/spec/modules/feedadBidAdapter_spec.js +47 -77
  177. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +1 -1
  178. package/test/spec/modules/ixBidAdapter_spec.js +24 -54
  179. package/test/spec/modules/limelightDigitalBidAdapter_spec.js +35 -5
  180. package/test/spec/modules/neuwoRtdProvider_spec.js +123 -0
  181. package/test/spec/modules/pubmaticBidAdapter_spec.js +15 -0
  182. package/test/spec/modules/scatteredBidAdapter_spec.js +210 -0
  183. package/test/spec/modules/sirdataRtdProvider_spec.js +116 -22
  184. package/test/spec/modules/smilewantedBidAdapter_spec.js +54 -3
  185. package/test/spec/modules/tripleliftBidAdapter_spec.js +2 -2
  186. package/test/spec/modules/userId_spec.js +1 -1
  187. package/test/spec/modules/vidazooBidAdapter_spec.js +4 -1
  188. package/test/spec/modules/yahoosspBidAdapter_spec.js +1 -1
@@ -0,0 +1,210 @@
1
+ import { spec, converter } from 'modules/scatteredBidAdapter.js';
2
+ import { assert } from 'chai';
3
+ import { config } from 'src/config.js';
4
+ import { deepClone, mergeDeep } from '../../../src/utils';
5
+ describe('Scattered adapter', function () {
6
+ describe('isBidRequestValid', function () {
7
+ // A valid bid
8
+ let validBid = {
9
+ bidder: 'scattered',
10
+ mediaTypes: {
11
+ banner: {
12
+ sizes: [[300, 250], [760, 400]]
13
+ }
14
+ },
15
+ params: {
16
+ bidderDomain: 'https://prebid.scattered.eu',
17
+ test: 0
18
+ }
19
+ };
20
+
21
+ // Because this valid bid is modified to create invalid bids in following tests we first check it.
22
+ // We must be sure it is a valid one, not to get false negatives.
23
+ it('should accept a valid bid', function () {
24
+ assert.isTrue(spec.isBidRequestValid(validBid));
25
+ });
26
+
27
+ it('should skip if bidderDomain info is missing', function () {
28
+ let bid = deepClone(validBid);
29
+
30
+ delete bid.params.bidderDomain;
31
+ assert.isFalse(spec.isBidRequestValid(bid));
32
+ });
33
+
34
+ it('should expect at least one banner size', function () {
35
+ let bid = deepClone(validBid);
36
+
37
+ delete bid.mediaTypes.banner;
38
+ assert.isFalse(spec.isBidRequestValid(bid));
39
+
40
+ // empty sizes array
41
+ bid.mediaTypes = {
42
+ banner: {
43
+ sizes: []
44
+ }
45
+ };
46
+ assert.isFalse(spec.isBidRequestValid(bid));
47
+ });
48
+ });
49
+
50
+ describe('buildRequests', function () {
51
+ let arrayOfValidBidRequests, validBidderRequest;
52
+
53
+ beforeEach(function () {
54
+ arrayOfValidBidRequests = [{
55
+ bidder: 'scattered',
56
+ params: {
57
+ bidderDomain: 'https://prebid.scattered.eu',
58
+ test: 0
59
+ },
60
+ mediaTypes: {
61
+ banner: {
62
+ sizes: [[300, 250], [760, 400]]
63
+ },
64
+ adUnitCode: 'test-div',
65
+ transactionId: '32d09c47-c6b8-40b0-9605-2e251a472ea4',
66
+ bidId: '21adc5d8765aa1',
67
+ bidderRequestId: '130728f7662afc',
68
+ auctionId: 'b4a45a23-8371-4d87-9308-39146b29ca32',
69
+ },
70
+ }];
71
+
72
+ validBidderRequest = {
73
+ bidderCode: 'scattered',
74
+ auctionId: 'b4a45a23-8371-4d87-9308-39146b29ca32',
75
+ gdprConsent: { consentString: 'BOtmiBKOtmiBKABABAENAFAAAAACeAAA', gdprApplies: true },
76
+ refererInfo: {
77
+ domain: 'localhost',
78
+ page: 'http://localhost:9999/integrationExamples/gpt/hello_world.html?pbjs_debug=true',
79
+ },
80
+ ortb2: {
81
+ site: {
82
+ publisher: {
83
+ name: 'publisher1 INC.'
84
+ }
85
+ }
86
+ }
87
+ };
88
+ });
89
+
90
+ it('should validate request format', function () {
91
+ let request = spec.buildRequests(arrayOfValidBidRequests, validBidderRequest);
92
+ assert.equal(request.method, 'POST');
93
+ assert.deepEqual(request.options, { contentType: 'application/json' });
94
+ assert.ok(request.data);
95
+ });
96
+
97
+ it('has the right fields filled', function () {
98
+ let request = spec.buildRequests(arrayOfValidBidRequests, validBidderRequest);
99
+ const bidderRequest = request.data;
100
+ assert.equal(bidderRequest.id, validBidderRequest.auctionId);
101
+ assert.ok(bidderRequest.site);
102
+ assert.ok(bidderRequest.source);
103
+ assert.lengthOf(bidderRequest.imp, 1);
104
+ });
105
+
106
+ it('should configure the site object', function () {
107
+ let request = spec.buildRequests(arrayOfValidBidRequests, validBidderRequest);
108
+ const site = request.data.site;
109
+ assert.equal(site.publisher.name, validBidderRequest.ortb2.site.publisher.name)
110
+ });
111
+
112
+ it('should configure site with ortb2', function () {
113
+ const req = mergeDeep({}, validBidderRequest, {
114
+ ortb2: {
115
+ site: {
116
+ id: '876',
117
+ publisher: {
118
+ domain: 'publisher1.eu'
119
+ }
120
+ }
121
+ }
122
+ });
123
+
124
+ let request = spec.buildRequests(arrayOfValidBidRequests, req);
125
+ const site = request.data.site;
126
+ assert.deepEqual(site, {
127
+ id: '876',
128
+ publisher: {
129
+ domain: 'publisher1.eu',
130
+ name: 'publisher1 INC.'
131
+ }
132
+ });
133
+ });
134
+
135
+ it('should send device info', function () {
136
+ it('should send info about device', function () {
137
+ config.setConfig({
138
+ device: { w: 375, h: 273 }
139
+ });
140
+
141
+ let request = spec.buildRequests(arrayOfValidBidRequests, validBidderRequest);
142
+
143
+ assert.equal(request.device.ua, navigator.userAgent);
144
+ assert.equal(request.device.w, 375);
145
+ assert.equal(request.device.h, 273);
146
+ });
147
+ })
148
+ })
149
+ })
150
+
151
+ describe('interpretResponse', function () {
152
+ const serverResponse = {
153
+ body: {
154
+ id: 'b4a45a23-8371-4d87-9308-39146b29ca32',
155
+ bidid: '11111111-2222-2222-2222-333333333333',
156
+ cur: 'PLN',
157
+ seatbid: [{
158
+ bid: [
159
+ {
160
+ id: '234234-234234-234234', // bidder generated
161
+ impid: '123',
162
+ price: '34.2',
163
+ nurl: 'https://scattered.eu/nurl',
164
+ adm: '<html><img src="https://some_banner.jpeg></img></html>',
165
+ cid: '99877',
166
+ crid: '2345-2345-23',
167
+ w: 345,
168
+ h: 456
169
+ }
170
+ ]
171
+ }],
172
+ }
173
+ };
174
+
175
+ let bidderRequest = {
176
+ bids: [
177
+ {
178
+ bidId: '123',
179
+ netRevenue: 'net',
180
+ }
181
+ ]
182
+
183
+ };
184
+
185
+ let request;
186
+ beforeEach(() => {
187
+ request = { data: converter.toORTB({ bidderRequest }) };
188
+ });
189
+
190
+ it('should return if no body in response', function () {
191
+ assert.ok(!spec.interpretResponse({}, request));
192
+ });
193
+
194
+ it('should set proper values', function () {
195
+ const results = spec.interpretResponse(serverResponse, request);
196
+ const expected = {
197
+ ad: '<html><img src="https://some_banner.jpeg></img></html><div style="position:absolute;left:0px;top:0px;visibility:hidden;"><img src="https://scattered.eu/nurl"></div>',
198
+ cpm: '34.2',
199
+ creativeId: '2345-2345-23',
200
+ currency: 'PLN',
201
+ height: 456,
202
+ width: 345,
203
+ mediaType: 'banner',
204
+ requestId: '123',
205
+ ttl: 360,
206
+ };
207
+ expect(results.length).to.equal(1);
208
+ sinon.assert.match(results[0], expected);
209
+ });
210
+ });
@@ -1,17 +1,17 @@
1
- import { addSegmentData, getSegmentsAndCategories, sirdataSubmodule } from 'modules/sirdataRtdProvider.js';
2
- import { server } from 'test/mocks/xhr.js';
1
+ import {addSegmentData, getSegmentsAndCategories, sirdataSubmodule} from 'modules/sirdataRtdProvider.js';
2
+ import {server} from 'test/mocks/xhr.js';
3
3
 
4
4
  const responseHeader = {'Content-Type': 'application/json'};
5
5
 
6
- describe('sirdataRtdProvider', function() {
7
- describe('sirdataSubmodule', function() {
6
+ describe('sirdataRtdProvider', function () {
7
+ describe('sirdataSubmodule', function () {
8
8
  it('successfully instantiates', function () {
9
- expect(sirdataSubmodule.init()).to.equal(true);
9
+ expect(sirdataSubmodule.init()).to.equal(true);
10
10
  });
11
11
  });
12
12
 
13
- describe('Add Segment Data', function() {
14
- it('adds segment data', function() {
13
+ describe('Add Segment Data', function () {
14
+ it('adds segment data', function () {
15
15
  const config = {
16
16
  params: {
17
17
  setGptKeyValues: false,
@@ -42,23 +42,34 @@ describe('sirdataRtdProvider', function() {
42
42
  contextual_categories: {'333333': 100}
43
43
  };
44
44
 
45
- addSegmentData({adUnits}, data, config, () => {});
45
+ addSegmentData({adUnits}, data, config, () => {
46
+ });
46
47
  expect(adUnits[0].bids[0].params.keywords).to.have.deep.property('sd_rtd', ['111111', '222222', '333333']);
47
- expect(adUnits[0].bids[1].ortb2.site.ext.data).to.have.deep.property('sd_rtd', ['333333']);
48
- expect(adUnits[0].bids[1].ortb2.user.ext.data).to.have.deep.property('sd_rtd', ['111111', '222222']);
49
48
  });
50
49
  });
51
50
 
52
- describe('Get Segments And Categories', function() {
53
- it('gets data from async request and adds segment data', function() {
51
+ describe('Get Segments And Categories', function () {
52
+ it('gets data from async request and adds segment data', function () {
53
+ const overrideAppnexus = function (adUnit, list, data, bid) {
54
+ deepSetValue(bid, 'params.keywords.custom', list);
55
+ }
56
+
54
57
  const config = {
55
58
  params: {
56
59
  setGptKeyValues: false,
57
60
  contextualMinRelevancyScore: 50,
58
61
  bidders: [{
59
- bidder: 'appnexus'
62
+ bidder: 'appnexus',
63
+ customFunction: overrideAppnexus
60
64
  }, {
61
- bidder: 'other'
65
+ bidder: 'smartadserver'
66
+ }, {
67
+ bidder: 'ix',
68
+ sizeLimit: 1200,
69
+ }, {
70
+ bidder: 'rubicon',
71
+ }, {
72
+ bidder: 'proxistore',
62
73
  }]
63
74
  }
64
75
  };
@@ -71,24 +82,107 @@ describe('sirdataRtdProvider', function() {
71
82
  placementId: 13144370
72
83
  }
73
84
  }, {
74
- bidder: 'other'
85
+ bidder: 'smartadserver',
86
+ params: {
87
+ siteId: 207435,
88
+ pageId: 896536,
89
+ formatId: 62913
90
+ }
91
+ }, {
92
+ bidder: 'proxistore',
93
+ params: {website: 'demo.sirdata.com', language: 'fr'},
94
+ adUnitCode: 'HALFPAGE_CENTER_LOADER',
95
+ transactionId: '92ac333a-a569-4827-abf1-01fc9d19278a',
96
+ sizes: [[300, 600]],
97
+ mediaTypes: {
98
+ banner: {
99
+ filteredSizeConfig: [
100
+ {minViewPort: [1600, 0], sizes: [[300, 600]]},
101
+ ],
102
+ sizeConfig: [
103
+ {minViewPort: [0, 0], sizes: [[300, 600]]},
104
+ {minViewPort: [768, 0], sizes: [[300, 600]]},
105
+ {minViewPort: [1200, 0], sizes: [[300, 600]]},
106
+ {minViewPort: [1600, 0], sizes: [[300, 600]]},
107
+ ],
108
+ sizes: [[300, 600]],
109
+ },
110
+ },
111
+ bidId: '190bab495bc5f6e',
112
+ bidderRequestId: '18c0b0f0c91cd88',
113
+ auctionId: '9bdd917b-908d-4d9f-8f2f-d443277a62fc',
114
+ src: 'client',
115
+ bidRequestsCount: 1,
116
+ bidderRequestsCount: 1,
117
+ bidderWinsCount: 0,
118
+ }, {
119
+ bidder: 'ix',
120
+ params: {
121
+ siteId: '12345',
122
+ size: [300, 600]
123
+ }
124
+ }, {
125
+ bidder: 'rubicon',
126
+ params: {
127
+ accountId: 14062,
128
+ siteId: 70608,
129
+ zoneId: 498816
130
+ }
75
131
  }]
76
- }]
132
+ }],
133
+ ortb2Fragments: {
134
+ global: {}
135
+ }
77
136
  };
78
137
 
79
138
  let data = {
80
- segments: [111111, 222222],
81
- contextual_categories: {'333333': 100}
139
+ 'segments': [111111, 222222],
140
+ 'segtaxid': null,
141
+ 'cattaxid': null,
142
+ 'contextual_categories': {'333333': 100},
143
+ 'shared_taxonomy': {
144
+ '27440': {
145
+ 'segments': [444444, 555555],
146
+ 'segtaxid': 552,
147
+ 'cattaxid': 553,
148
+ 'contextual_categories': {'666666': 100}
149
+ }
150
+ },
151
+ 'global_taxonomy': {
152
+ '9998': {
153
+ 'segments': [123, 234],
154
+ 'segtaxid': 4,
155
+ 'cattaxid': 7,
156
+ 'contextual_categories': {'345': 100, '456': 100}
157
+ }
158
+ }
82
159
  };
83
160
 
84
- getSegmentsAndCategories(reqBidsConfigObj, () => {}, config, {});
161
+ getSegmentsAndCategories(reqBidsConfigObj, () => {
162
+ }, config, {});
85
163
 
86
164
  let request = server.requests[0];
87
165
  request.respond(200, responseHeader, JSON.stringify(data));
88
166
 
89
- expect(reqBidsConfigObj.adUnits[0].bids[0].params.keywords).to.have.deep.property('sd_rtd', ['111111', '222222', '333333']);
90
- expect(reqBidsConfigObj.adUnits[0].bids[1].ortb2.site.ext.data).to.have.deep.property('sd_rtd', ['333333']);
91
- expect(reqBidsConfigObj.adUnits[0].bids[1].ortb2.user.ext.data).to.have.deep.property('sd_rtd', ['111111', '222222']);
167
+ expect(reqBidsConfigObj.adUnits[0].bids[1].params).to.have.deep.property('target', 'sd_rtd=111111;sd_rtd=222222;sd_rtd=333333;sd_rtd=444444;sd_rtd=555555;sd_rtd=666666');
168
+
169
+ expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].name).to.equal(
170
+ 'sirdata.com'
171
+ );
172
+ expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].segment).to.eql([
173
+ {id: '345'},
174
+ {id: '456'}
175
+ ]);
176
+ expect(reqBidsConfigObj.ortb2Fragments.global.site.content.data[0].ext.segtax).to.equal(7);
177
+
178
+ expect(reqBidsConfigObj.ortb2Fragments.global.user.data[0].name).to.equal(
179
+ 'sirdata.com'
180
+ );
181
+ expect(reqBidsConfigObj.ortb2Fragments.global.user.data[0].segment).to.eql([
182
+ {id: '123'},
183
+ {id: '234'}
184
+ ]);
185
+ expect(reqBidsConfigObj.ortb2Fragments.global.user.data[0].ext.segtax).to.equal(4);
92
186
  });
93
187
  });
94
188
  });
@@ -1,9 +1,6 @@
1
1
  import { expect } from 'chai';
2
2
  import { spec } from 'modules/smilewantedBidAdapter.js';
3
- import { newBidder } from 'src/adapters/bidderFactory.js';
4
3
  import { config } from 'src/config.js';
5
- import * as utils from 'src/utils.js';
6
- import { requestBidsHook } from 'modules/consentManagement.js';
7
4
 
8
5
  const DISPLAY_REQUEST = [{
9
6
  adUnitCode: 'sw_300x250',
@@ -20,6 +17,37 @@ const DISPLAY_REQUEST = [{
20
17
  transactionId: 'trans_abcd1234'
21
18
  }];
22
19
 
20
+ const DISPLAY_REQUEST_WITH_EIDS = [{
21
+ adUnitCode: 'sw_300x250',
22
+ bidId: '12345',
23
+ sizes: [
24
+ [300, 250],
25
+ [300, 200]
26
+ ],
27
+ bidder: 'smilewanted',
28
+ params: {
29
+ zoneId: 1
30
+ },
31
+ requestId: 'request_abcd1234',
32
+ transactionId: 'trans_abcd1234',
33
+ userIdAsEids: [{
34
+ source: 'pubcid.org',
35
+ uids: [{
36
+ id: 'some-random-id-value',
37
+ atype: 1
38
+ }]
39
+ }, {
40
+ source: 'adserver.org',
41
+ uids: [{
42
+ id: 'some-random-id-value',
43
+ atype: 1,
44
+ ext: {
45
+ rtiPartner: 'TDID'
46
+ }
47
+ }]
48
+ }]
49
+ }];
50
+
23
51
  const DISPLAY_REQUEST_WITH_POSITION_TYPE = [{
24
52
  adUnitCode: 'sw_300x250',
25
53
  bidId: '12345',
@@ -170,6 +198,29 @@ describe('smilewantedBidAdapterTests', function () {
170
198
  expect(requestContent).to.have.property('pageDomain').and.to.equal('https://localhost/Prebid.js/integrationExamples/gpt/hello_world.html');
171
199
  });
172
200
 
201
+ it('Verify external ids in request and ids found', function () {
202
+ config.setConfig({
203
+ 'currency': {
204
+ 'adServerCurrency': 'EUR'
205
+ }
206
+ });
207
+ const request = spec.buildRequests(DISPLAY_REQUEST_WITH_EIDS, {});
208
+ const requestContent = JSON.parse(request[0].data);
209
+
210
+ expect(requestContent).to.have.property('eids');
211
+ expect(requestContent.eids).to.not.equal(null).and.to.not.be.undefined;
212
+ expect(requestContent.eids.length).to.greaterThan(0);
213
+ for (let index in requestContent.eids) {
214
+ let eid = requestContent.eids[index];
215
+ expect(eid.source).to.not.equal(null).and.to.not.be.undefined;
216
+ expect(eid.uids).to.not.equal(null).and.to.not.be.undefined;
217
+ for (let uidsIndex in eid.uids) {
218
+ let uid = eid.uids[uidsIndex];
219
+ expect(uid.id).to.not.equal(null).and.to.not.be.undefined;
220
+ }
221
+ }
222
+ });
223
+
173
224
  describe('gdpr tests', function () {
174
225
  afterEach(function () {
175
226
  config.resetConfig();
@@ -725,11 +725,11 @@ describe('triplelift adapter', function () {
725
725
 
726
726
  it('should add amxRtbId to the payload if included', function () {
727
727
  const id = 'Ok9JQkBM-UFlAXEZQ-UUNBQlZOQzgrUFhW-UUNBQkRQTUBPQVpVWVxNXlZUUF9AUFhAUF9PXFY/';
728
- bidRequests[0].userIdAsEids = [{ source: 'amxrtb.com', uids: [{ id }] }];
728
+ bidRequests[0].userIdAsEids = [{ source: 'amxdt.net', uids: [{ id }] }];
729
729
  const request = tripleliftAdapterSpec.buildRequests(bidRequests, bidderRequest);
730
730
  const payload = request.data;
731
731
  expect(payload).to.exist;
732
- expect(payload.user).to.deep.equal({ext: {eids: [{source: 'amxrtb.com', uids: [{id, ext: {rtiPartner: 'amxrtb.com'}}]}]}});
732
+ expect(payload.user).to.deep.equal({ext: {eids: [{source: 'amxdt.net', uids: [{id, ext: {rtiPartner: 'amxdt.net'}}]}]}});
733
733
  });
734
734
 
735
735
  it('should add tdid, idl_env and criteoId to the payload if both are included', function () {
@@ -1298,7 +1298,7 @@ describe('User ID', function () {
1298
1298
  expect(bid).to.have.deep.nested.property('userId.amxId');
1299
1299
  expect(bid.userId.amxId).to.equal('test_amxid_id');
1300
1300
  expect(bid.userIdAsEids[0]).to.deep.equal({
1301
- source: 'amxrtb.com',
1301
+ source: 'amxdt.net',
1302
1302
  uids: [{
1303
1303
  id: 'test_amxid_id',
1304
1304
  atype: 1,
@@ -13,6 +13,7 @@ import {
13
13
  getUniqueDealId,
14
14
  getNextDealId,
15
15
  getVidazooSessionId,
16
+ webSessionId
16
17
  } from 'modules/vidazooBidAdapter.js';
17
18
  import * as utils from 'src/utils.js';
18
19
  import {version} from 'package.json';
@@ -283,6 +284,7 @@ describe('VidazooBidAdapter', function () {
283
284
  uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
284
285
  uqs: getTopWindowQueryParams(),
285
286
  isStorageAllowed: true,
287
+ webSessionId: webSessionId,
286
288
  mediaTypes: {
287
289
  video: {
288
290
  api: [2],
@@ -350,7 +352,8 @@ describe('VidazooBidAdapter', function () {
350
352
  isStorageAllowed: true,
351
353
  gpid: '1234567890',
352
354
  cat: ['IAB2'],
353
- pagecat: ['IAB2-2']
355
+ pagecat: ['IAB2-2'],
356
+ webSessionId: webSessionId
354
357
  }
355
358
  });
356
359
  });
@@ -872,7 +872,7 @@ describe('YahooSSP Bid Adapter:', () => {
872
872
  expect(data.user.ext.eids).to.deep.equal([
873
873
  {source: 'admixer.net', uids: [{id: 'admixerId_FROM_USER_ID_MODULE', atype: 3}]},
874
874
  {source: 'adtelligent.com', uids: [{id: 'adtelligentId_FROM_USER_ID_MODULE', atype: 3}]},
875
- {source: 'amxrtb.com', uids: [{id: 'amxId_FROM_USER_ID_MODULE', atype: 1}]},
875
+ {source: 'amxdt.net', uids: [{id: 'amxId_FROM_USER_ID_MODULE', atype: 1}]},
876
876
  {source: 'britepool.com', uids: [{id: 'britepoolid_FROM_USER_ID_MODULE', atype: 3}]},
877
877
  {source: 'deepintent.com', uids: [{id: 'deepintentId_FROM_USER_ID_MODULE', atype: 3}]},
878
878
  {source: 'epsilon.com', uids: [{id: 'publinkId_FROM_USER_ID_MODULE', atype: 3}]},