prebid.js 8.6.0 → 8.7.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 (162) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/adqueryBidAdapter.js +1 -1
  7. package/dist/adrelevantisBidAdapter.js +1 -1
  8. package/dist/adsinteractiveBidAdapter.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/ajaBidAdapter.js +1 -1
  13. package/dist/alkimiBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/asoBidAdapter.js +1 -1
  19. package/dist/automatadAnalyticsAdapter.js +1 -0
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/bridBidAdapter.js +1 -1
  24. package/dist/bridgewellBidAdapter.js +1 -1
  25. package/dist/brightMountainMediaBidAdapter.js +1 -1
  26. package/dist/carodaBidAdapter.js +1 -1
  27. package/dist/chtnwBidAdapter.js +1 -1
  28. package/dist/concertBidAdapter.js +1 -1
  29. package/dist/connatixBidAdapter.js +1 -0
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dependencies.json +3 -0
  38. package/dist/dspxBidAdapter.js +1 -1
  39. package/dist/eplanningBidAdapter.js +1 -1
  40. package/dist/euidIdSystem.js +1 -1
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/freepassBidAdapter.js +1 -1
  44. package/dist/freewheel-sspBidAdapter.js +1 -1
  45. package/dist/gmosspBidAdapter.js +1 -1
  46. package/dist/goldbachBidAdapter.js +1 -1
  47. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  48. package/dist/greenbidsRtdProvider.js +1 -1
  49. package/dist/gridBidAdapter.js +1 -1
  50. package/dist/gumgumBidAdapter.js +1 -1
  51. package/dist/h12mediaBidAdapter.js +1 -1
  52. package/dist/hypelabBidAdapter.js +1 -1
  53. package/dist/id5IdSystem.js +1 -1
  54. package/dist/imdsBidAdapter.js +1 -1
  55. package/dist/improvedigitalBidAdapter.js +1 -1
  56. package/dist/insticatorBidAdapter.js +1 -1
  57. package/dist/ixBidAdapter.js +1 -1
  58. package/dist/justpremiumBidAdapter.js +1 -1
  59. package/dist/kargoBidAdapter.js +1 -1
  60. package/dist/konduitAnalyticsAdapter.js +1 -1
  61. package/dist/kueezBidAdapter.js +1 -1
  62. package/dist/kueezRtbBidAdapter.js +1 -1
  63. package/dist/kulturemediaBidAdapter.js +1 -1
  64. package/dist/lassoBidAdapter.js +1 -1
  65. package/dist/lifestreetBidAdapter.js +1 -1
  66. package/dist/logicadBidAdapter.js +1 -1
  67. package/dist/loglyliftBidAdapter.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/medianetBidAdapter.js +1 -1
  73. package/dist/mediasquareBidAdapter.js +1 -1
  74. package/dist/mgidBidAdapter.js +1 -1
  75. package/dist/minutemediaBidAdapter.js +1 -1
  76. package/dist/minutemediaplusBidAdapter.js +1 -1
  77. package/dist/nexx360BidAdapter.js +1 -1
  78. package/dist/not-for-prod/prebid.js +131 -129
  79. package/dist/oguryBidAdapter.js +1 -1
  80. package/dist/onetagBidAdapter.js +1 -1
  81. package/dist/ooloAnalyticsAdapter.js +1 -1
  82. package/dist/optidigitalBidAdapter.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/retailspotBidAdapter.js +1 -1
  95. package/dist/rhythmoneBidAdapter.js +1 -1
  96. package/dist/riseBidAdapter.js +1 -1
  97. package/dist/rubiconBidAdapter.js +1 -1
  98. package/dist/seedingAllianceBidAdapter.js +1 -1
  99. package/dist/seedtagBidAdapter.js +1 -1
  100. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  101. package/dist/sharethroughBidAdapter.js +1 -1
  102. package/dist/shinezBidAdapter.js +1 -1
  103. package/dist/smaatoBidAdapter.js +1 -1
  104. package/dist/smartadserverBidAdapter.js +1 -1
  105. package/dist/smartxBidAdapter.js +1 -1
  106. package/dist/smilewantedBidAdapter.js +1 -1
  107. package/dist/sonobiBidAdapter.js +1 -1
  108. package/dist/sovrnAnalyticsAdapter.js +1 -1
  109. package/dist/sovrnBidAdapter.js +1 -1
  110. package/dist/sspBCBidAdapter.js +1 -1
  111. package/dist/stvBidAdapter.js +1 -1
  112. package/dist/sublimeBidAdapter.js +1 -1
  113. package/dist/tappxBidAdapter.js +1 -1
  114. package/dist/targetVideoBidAdapter.js +1 -1
  115. package/dist/teadsBidAdapter.js +1 -1
  116. package/dist/trionBidAdapter.js +1 -1
  117. package/dist/tripleliftBidAdapter.js +1 -1
  118. package/dist/ttdBidAdapter.js +1 -1
  119. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  120. package/dist/uid2IdSystem.js +1 -1
  121. package/dist/underdogmediaBidAdapter.js +1 -1
  122. package/dist/undertoneBidAdapter.js +1 -1
  123. package/dist/vidazooBidAdapter.js +1 -1
  124. package/dist/videobyteBidAdapter.js +1 -1
  125. package/dist/visxBidAdapter.js +1 -1
  126. package/dist/vuukleBidAdapter.js +1 -1
  127. package/dist/widespaceBidAdapter.js +1 -1
  128. package/dist/winrBidAdapter.js +1 -1
  129. package/dist/yahoosspBidAdapter.js +1 -1
  130. package/dist/yieldmoBidAdapter.js +1 -1
  131. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  132. package/modules/adagioBidAdapter.js +15 -1
  133. package/modules/adgenerationBidAdapter.js +4 -3
  134. package/modules/adsinteractiveBidAdapter.js +2 -0
  135. package/modules/alkimiBidAdapter.js +19 -7
  136. package/modules/automatadAnalyticsAdapter.js +325 -0
  137. package/modules/automatadAnalyticsAdapter.md +23 -0
  138. package/modules/connatixBidAdapter.js +185 -0
  139. package/modules/connatixBidAdapter.md +37 -0
  140. package/modules/criteoBidAdapter.js +7 -7
  141. package/modules/freepassBidAdapter.js +20 -1
  142. package/modules/freepassBidAdapter.md +4 -1
  143. package/modules/gridBidAdapter.js +1 -8
  144. package/modules/medianetBidAdapter.js +7 -4
  145. package/modules/mediasquareBidAdapter.js +3 -0
  146. package/modules/optidigitalBidAdapter.js +25 -16
  147. package/modules/tappxBidAdapter.js +17 -14
  148. package/modules/undertoneBidAdapter.md +1 -1
  149. package/modules/userId/eids.md +7 -0
  150. package/package.json +1 -1
  151. package/test/spec/modules/adagioBidAdapter_spec.js +89 -0
  152. package/test/spec/modules/adgenerationBidAdapter_spec.js +6 -6
  153. package/test/spec/modules/alkimiBidAdapter_spec.js +3 -9
  154. package/test/spec/modules/automatadAnalyticsAdapter_spec.js +533 -0
  155. package/test/spec/modules/connatixBidAdapter_spec.js +366 -0
  156. package/test/spec/modules/criteoBidAdapter_spec.js +21 -0
  157. package/test/spec/modules/freepassBidAdapter_spec.js +44 -0
  158. package/test/spec/modules/gridBidAdapter_spec.js +68 -0
  159. package/test/spec/modules/medianetBidAdapter_spec.js +18 -18
  160. package/test/spec/modules/mediasquareBidAdapter_spec.js +5 -0
  161. package/test/spec/modules/optidigitalBidAdapter_spec.js +9 -2
  162. package/test/spec/modules/tappxBidAdapter_spec.js +19 -0
@@ -48,7 +48,7 @@ export const spec = {
48
48
 
49
49
  isBidRequestValid(bid) {
50
50
  logMessage('Validating bid: ', bid);
51
- return !!bid.adUnitCode;
51
+ return !(!bid.adUnitCode || !bid.params || !bid.params.publisherId);
52
52
  },
53
53
 
54
54
  buildRequests(validBidRequests, bidderRequest) {
@@ -72,6 +72,25 @@ export const spec = {
72
72
  data.user = prepareUserInfo(data.user, freepassId);
73
73
  data.device = prepareDeviceInfo(data.device, freepassId);
74
74
 
75
+ // set site.page & site.publisher
76
+ data.site = data.site || {};
77
+ data.site.publisher = data.site.publisher || {};
78
+ // set site.publisher.id. from params.publisherId required
79
+ data.site.publisher.id = validBidRequests[0].params.publisherId;
80
+ // set site.publisher.domain from params.publisherUrl. optional
81
+ data.site.publisher.domain = validBidRequests[0].params?.publisherUrl;
82
+
83
+ // set source
84
+ data.source = data.source || {};
85
+ data.source.fd = 0;
86
+ data.source.tid = validBidRequests.ortb2?.source?.tid;
87
+ data.source.pchain = '';
88
+
89
+ // set imp.ext
90
+ validBidRequests.forEach((bidRequest, index) => {
91
+ data.imp[index].tagId = bidRequest.adUnitCode;
92
+ });
93
+
75
94
  data.test = validBidRequests[0].test || 0;
76
95
 
77
96
  logMessage('FreePass BidAdapter augmented ORTB bid request user: ', data.user);
@@ -23,7 +23,10 @@ This BidAdapter requires the FreePass IdSystem to be configured. Please contact
23
23
  }
24
24
  },
25
25
  bids: [{
26
- bidder: 'freepass'
26
+ bidder: 'freepass',
27
+ params: {
28
+ publisherId: '12345'
29
+ }
27
30
  }]
28
31
  }
29
32
  ];
@@ -137,16 +137,9 @@ export const spec = {
137
137
  }
138
138
 
139
139
  if (ortb2Imp.ext) {
140
+ impObj.ext.gpid = ortb2Imp.ext.gpid?.toString() || ortb2Imp.ext.data?.pbadslot?.toString() || ortb2Imp.ext.data?.adserver?.adslot?.toString();
140
141
  if (ortb2Imp.ext.data) {
141
142
  impObj.ext.data = ortb2Imp.ext.data;
142
- if (impObj.ext.data.adserver && impObj.ext.data.adserver.adslot) {
143
- impObj.ext.gpid = impObj.ext.data.adserver.adslot.toString();
144
- } else if (ortb2Imp.ext.data.pbadslot) {
145
- impObj.ext.gpid = ortb2Imp.ext.data.pbadslot.toString();
146
- }
147
- }
148
- if (ortb2Imp.ext.gpid) {
149
- impObj.ext.gpid = ortb2Imp.ext.gpid.toString();
150
143
  }
151
144
  }
152
145
  }
@@ -20,7 +20,9 @@ import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
20
20
  import {getGlobal} from '../src/prebidGlobal.js';
21
21
 
22
22
  const BIDDER_CODE = 'medianet';
23
+ const TRUSTEDSTACK_CODE = 'trustedstack';
23
24
  const BID_URL = 'https://prebid.media.net/rtb/prebid';
25
+ const TRUSTEDSTACK_URL = 'https://prebid.trustedstack.com/rtb/trustedstack';
24
26
  const PLAYER_URL = 'https://prebid.media.net/video/bundle.js';
25
27
  const SLOT_VISIBILITY = {
26
28
  NOT_DETERMINED: 0,
@@ -49,7 +51,7 @@ mnData.urlData = {
49
51
  };
50
52
 
51
53
  const aliases = [
52
- { code: 'aax', gvlid: 720 },
54
+ { code: TRUSTEDSTACK_CODE },
53
55
  ];
54
56
 
55
57
  getGlobal().medianetGlobals = getGlobal().medianetGlobals || {};
@@ -323,8 +325,9 @@ function normalizeCoordinates(coordinates) {
323
325
  }
324
326
  }
325
327
 
326
- function getBidderURL(cid) {
327
- return BID_URL + '?cid=' + encodeURIComponent(cid);
328
+ function getBidderURL(bidderCode, cid) {
329
+ const url = (bidderCode === TRUSTEDSTACK_CODE) ? TRUSTEDSTACK_URL : BID_URL;
330
+ return url + '?cid=' + encodeURIComponent(cid);
328
331
  }
329
332
 
330
333
  function generatePayload(bidRequests, bidderRequests) {
@@ -463,7 +466,7 @@ export const spec = {
463
466
  let payload = generatePayload(bidRequests, bidderRequests);
464
467
  return {
465
468
  method: 'POST',
466
- url: getBidderURL(payload.ext.customer_id),
469
+ url: getBidderURL(bidderRequests.bidderCode, payload.ext.customer_id),
467
470
  data: JSON.stringify(payload)
468
471
  };
469
472
  },
@@ -179,6 +179,9 @@ export const spec = {
179
179
  paramsToSearchFor.forEach(param => {
180
180
  if (bid['mediasquare'].hasOwnProperty(param)) {
181
181
  params[param] = bid['mediasquare'][param];
182
+ if (typeof params[param] == 'number') {
183
+ params[param] = params[param].toString();
184
+ }
182
185
  }
183
186
  });
184
187
  };
@@ -7,6 +7,7 @@ const GVL_ID = 915;
7
7
  const ENDPOINT_URL = 'https://pbs.optidigital.com/bidder';
8
8
  const USER_SYNC_URL_IFRAME = 'https://scripts.opti-digital.com/js/presync.html?endpoint=optidigital';
9
9
  let CUR = 'USD';
10
+ let isSynced = false;
10
11
 
11
12
  export const spec = {
12
13
  code: BIDDER_CODE,
@@ -46,8 +47,6 @@ export const spec = {
46
47
  referrer: (bidderRequest.refererInfo && bidderRequest.refererInfo.page) ? bidderRequest.refererInfo.page : '',
47
48
  hb_version: '$prebid.version$',
48
49
  deviceWidth: document.documentElement.clientWidth,
49
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
50
- auctionId: deepAccess(validBidRequests[0], 'auctionId'),
51
50
  bidderRequestId: deepAccess(validBidRequests[0], 'bidderRequestId'),
52
51
  publisherId: deepAccess(validBidRequests[0], 'params.publisherId'),
53
52
  imp: validBidRequests.map(bidRequest => buildImp(bidRequest, ortb2)),
@@ -56,6 +55,10 @@ export const spec = {
56
55
  bapp: deepAccess(validBidRequests[0], 'params.bapp') || []
57
56
  }
58
57
 
58
+ if (validBidRequests[0].auctionId) {
59
+ payload.auctionId = validBidRequests[0].auctionId;
60
+ }
61
+
59
62
  if (validBidRequests[0].params.pageTemplate && validBidRequests[0].params.pageTemplate !== '') {
60
63
  payload.pageTemplate = validBidRequests[0].params.pageTemplate;
61
64
  }
@@ -136,21 +139,23 @@ export const spec = {
136
139
  */
137
140
  getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
138
141
  let syncurl = '';
142
+ if (!isSynced) {
143
+ // Attaching GDPR Consent Params in UserSync url
144
+ if (gdprConsent) {
145
+ syncurl += '&gdpr=' + (gdprConsent.gdprApplies ? 1 : 0);
146
+ syncurl += '&gdpr_consent=' + encodeURIComponent(gdprConsent.consentString || '');
147
+ }
148
+ if (uspConsent && uspConsent.consentString) {
149
+ syncurl += `&ccpa_consent=${uspConsent.consentString}`;
150
+ }
139
151
 
140
- // Attaching GDPR Consent Params in UserSync url
141
- if (gdprConsent) {
142
- syncurl += '&gdpr=' + (gdprConsent.gdprApplies ? 1 : 0);
143
- syncurl += '&gdpr_consent=' + encodeURIComponent(gdprConsent.consentString || '');
144
- }
145
- if (uspConsent && uspConsent.consentString) {
146
- syncurl += `&ccpa_consent=${uspConsent.consentString}`;
147
- }
148
-
149
- if (syncOptions.iframeEnabled) {
150
- return [{
151
- type: 'iframe',
152
- url: USER_SYNC_URL_IFRAME + syncurl
153
- }];
152
+ if (syncOptions.iframeEnabled) {
153
+ isSynced = true;
154
+ return [{
155
+ type: 'iframe',
156
+ url: USER_SYNC_URL_IFRAME + syncurl
157
+ }];
158
+ }
154
159
  }
155
160
  },
156
161
  };
@@ -218,4 +223,8 @@ function _getFloor (bid, sizes, currency) {
218
223
  return floor !== null ? floor : bid.params.floor;
219
224
  }
220
225
 
226
+ export function resetSync() {
227
+ isSynced = false;
228
+ }
229
+
221
230
  registerBidder(spec);
@@ -12,7 +12,7 @@ const BIDDER_CODE = 'tappx';
12
12
  const GVLID_CODE = 628;
13
13
  const TTL = 360;
14
14
  const CUR = 'USD';
15
- const TAPPX_BIDDER_VERSION = '0.1.2';
15
+ const TAPPX_BIDDER_VERSION = '0.1.3';
16
16
  const TYPE_CNN = 'prebidjs';
17
17
  const LOG_PREFIX = '[TAPPX]: ';
18
18
  const VIDEO_SUPPORT = ['instream', 'outstream'];
@@ -146,22 +146,22 @@ function validBasic(bid) {
146
146
  return false;
147
147
  }
148
148
 
149
- if (bid.params.tappxkey == null) {
149
+ if (!bid.params.tappxkey) {
150
150
  logWarn(LOG_PREFIX, 'Please review the mandatory Tappxkey parameter.');
151
151
  return false;
152
152
  }
153
153
 
154
- if (bid.params.host == null) {
154
+ if (!bid.params.host) {
155
155
  logWarn(LOG_PREFIX, 'Please review the mandatory Host parameter.');
156
156
  return false;
157
157
  }
158
158
 
159
- let classicEndpoint = true
159
+ let classicEndpoint = true;
160
160
  if ((new RegExp(`^(vz.*|zz.*)\\.*$`, 'i')).test(bid.params.host)) {
161
- classicEndpoint = false
161
+ classicEndpoint = false;
162
162
  }
163
163
 
164
- if (classicEndpoint && bid.params.endpoint == null) {
164
+ if (classicEndpoint && !bid.params.endpoint) {
165
165
  logWarn(LOG_PREFIX, 'Please review the mandatory endpoint Tappx parameters.');
166
166
  return false;
167
167
  }
@@ -191,7 +191,7 @@ function validMediaType(bid) {
191
191
  */
192
192
  function interpretBid(serverBid, request) {
193
193
  let bidReturned = {
194
- requestId: request.bids.bidId,
194
+ requestId: request.bids?.bidId,
195
195
  cpm: serverBid.price,
196
196
  currency: serverBid.cur ? serverBid.cur : CUR,
197
197
  width: serverBid.w,
@@ -206,7 +206,7 @@ function interpretBid(serverBid, request) {
206
206
  if (typeof serverBid.nurl != 'undefined') { bidReturned.nurl = serverBid.nurl }
207
207
  if (typeof serverBid.burl != 'undefined') { bidReturned.burl = serverBid.burl }
208
208
 
209
- if (typeof request.bids.mediaTypes !== 'undefined' && typeof request.bids.mediaTypes.video !== 'undefined') {
209
+ if (typeof request.bids?.mediaTypes !== 'undefined' && typeof request.bids?.mediaTypes.video !== 'undefined') {
210
210
  bidReturned.vastXml = serverBid.adm;
211
211
  bidReturned.vastUrl = serverBid.lurl;
212
212
  bidReturned.ad = serverBid.adm;
@@ -214,13 +214,12 @@ function interpretBid(serverBid, request) {
214
214
  bidReturned.width = serverBid.w;
215
215
  bidReturned.height = serverBid.h;
216
216
 
217
- if (request.bids.mediaTypes.video.context === 'outstream') {
218
- const url = (serverBid.ext.purl) ? serverBid.ext.purl : false;
219
- if (typeof url === 'undefined') {
217
+ if (request.bids?.mediaTypes.video.context === 'outstream') {
218
+ if (!serverBid.ext.purl) {
220
219
  logWarn(LOG_PREFIX, 'Error getting player outstream from tappx');
221
220
  return false;
222
221
  }
223
- bidReturned.renderer = createRenderer(bidReturned, request, url);
222
+ bidReturned.renderer = createRenderer(bidReturned, request, serverBid.ext.purl);
224
223
  }
225
224
  } else {
226
225
  bidReturned.ad = serverBid.adm;
@@ -228,7 +227,7 @@ function interpretBid(serverBid, request) {
228
227
  }
229
228
 
230
229
  if (typeof bidReturned.adomain !== 'undefined' || bidReturned.adomain !== null) {
231
- bidReturned.meta = { advertiserDomains: request.bids.adomain };
230
+ bidReturned.meta = { advertiserDomains: request.bids?.adomain };
232
231
  }
233
232
 
234
233
  return bidReturned;
@@ -305,6 +304,8 @@ function buildOneRequest(validBidRequests, bidderRequest) {
305
304
  let h;
306
305
 
307
306
  if (bannerMediaType) {
307
+ if (!Array.isArray(bannerMediaType.sizes)) { logWarn(LOG_PREFIX, 'Banner sizes array not found.'); }
308
+
308
309
  let banner = {};
309
310
  w = bannerMediaType.sizes[0][0];
310
311
  h = bannerMediaType.sizes[0][1];
@@ -342,7 +343,9 @@ function buildOneRequest(validBidRequests, bidderRequest) {
342
343
  }
343
344
 
344
345
  if ((video.w === undefined || video.w == null || video.w <= 0) ||
345
- (video.h === undefined || video.h == null || video.h <= 0)) {
346
+ (video.h === undefined || video.h == null || video.h <= 0)) {
347
+ if (!Array.isArray(videoMediaType.playerSize)) { logWarn(LOG_PREFIX, 'Video playerSize array not found.'); }
348
+
346
349
  w = videoMediaType.playerSize[0][0];
347
350
  h = videoMediaType.playerSize[0][1];
348
351
  video.w = w;
@@ -23,7 +23,7 @@ Module that connects to Undertone's demand sources
23
23
  {
24
24
  bidder: "undertone",
25
25
  params: {
26
- placementId: '10433394',
26
+ placementId: 1234,
27
27
  publisherId: 12345
28
28
  }
29
29
  }
@@ -272,6 +272,13 @@ userIdAsEids = [
272
272
  id: 'some-random-id-value',
273
273
  atype: 3
274
274
  }]
275
+ },
276
+ {
277
+ source: 'euid.eu',
278
+ uids: [{
279
+ id: 'some-random-id-value',
280
+ atype: 3
281
+ }]
275
282
  }
276
283
  ]
277
284
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "8.6.0",
3
+ "version": "8.7.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
@@ -697,6 +697,95 @@ describe('Adagio bid adapter', () => {
697
697
  });
698
698
  });
699
699
 
700
+ describe('with GPP', function() {
701
+ const bid01 = new BidRequestBuilder().withParams().build();
702
+
703
+ const regsGpp = 'regs_gpp_consent_string';
704
+ const regsApplicableSections = [2];
705
+
706
+ const ortb2Gpp = 'ortb2_gpp_consent_string';
707
+ const ortb2GppSid = [1];
708
+
709
+ context('When GPP in regs module', function() {
710
+ it('send gpp and gppSid to the server', function() {
711
+ const bidderRequest = new BidderRequestBuilder({
712
+ gppConsent: {
713
+ gppString: regsGpp,
714
+ applicableSections: regsApplicableSections,
715
+ }
716
+ }).build();
717
+
718
+ const requests = spec.buildRequests([bid01], bidderRequest);
719
+
720
+ expect(requests[0].data.regs.gpp).to.equal(regsGpp);
721
+ expect(requests[0].data.regs.gppSid).to.equal(regsApplicableSections);
722
+ });
723
+ });
724
+
725
+ context('When GPP partially defined in regs module', function() {
726
+ it('send gpp and gppSid coming from ortb2 to the server', function() {
727
+ const bidderRequest = new BidderRequestBuilder({
728
+ gppConsent: {
729
+ gppString: regsGpp,
730
+ },
731
+ ortb2: {
732
+ regs: {
733
+ gpp: ortb2Gpp,
734
+ gpp_sid: ortb2GppSid,
735
+ }
736
+ }
737
+ }).build();
738
+
739
+ const requests = spec.buildRequests([bid01], bidderRequest);
740
+
741
+ expect(requests[0].data.regs.gpp).to.equal(ortb2Gpp);
742
+ expect(requests[0].data.regs.gppSid).to.equal(ortb2GppSid);
743
+ });
744
+
745
+ it('send empty gpp and gppSid if no ortb2 fields to the server', function() {
746
+ const bidderRequest = new BidderRequestBuilder({
747
+ gppConsent: {
748
+ gppString: regsGpp,
749
+ }
750
+ }).build();
751
+
752
+ const requests = spec.buildRequests([bid01], bidderRequest);
753
+
754
+ expect(requests[0].data.regs.gpp).to.equal('');
755
+ expect(requests[0].data.regs.gppSid).to.be.empty;
756
+ });
757
+ });
758
+
759
+ context('When GPP defined in ortb2 module', function() {
760
+ it('send gpp and gppSid coming from ortb2 to the server', function() {
761
+ const bidderRequest = new BidderRequestBuilder({
762
+ ortb2: {
763
+ regs: {
764
+ gpp: ortb2Gpp,
765
+ gpp_sid: ortb2GppSid,
766
+ }
767
+ }
768
+ }).build();
769
+
770
+ const requests = spec.buildRequests([bid01], bidderRequest);
771
+
772
+ expect(requests[0].data.regs.gpp).to.equal(ortb2Gpp);
773
+ expect(requests[0].data.regs.gppSid).to.equal(ortb2GppSid);
774
+ });
775
+ });
776
+
777
+ context('When GPP not defined in any modules', function() {
778
+ it('send empty gpp and gppSid', function() {
779
+ const bidderRequest = new BidderRequestBuilder({}).build();
780
+
781
+ const requests = spec.buildRequests([bid01], bidderRequest);
782
+
783
+ expect(requests[0].data.regs.gpp).to.equal('');
784
+ expect(requests[0].data.regs.gppSid).to.be.empty;
785
+ });
786
+ });
787
+ });
788
+
700
789
  describe('with userID modules', function() {
701
790
  const userIdAsEids = [{
702
791
  'source': 'pubcid.org',
@@ -184,12 +184,12 @@ describe('AdgenerationAdapter', function () {
184
184
  }
185
185
  };
186
186
  const data = {
187
- banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&imark=1&tp=https%3A%2F%2Fexample.com`,
188
- bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&imark=1&tp=https%3A%2F%2Fexample.com`,
189
- native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&tp=https%3A%2F%2Fexample.com`,
190
- bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
191
- bannerWithAdgextCriteoId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com`,
192
- bannerWithAdgextIds: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.1&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&adgext_imuid=i.KrAH6ZAZTJOnH5S4N2sogA&adgext_uid2=%5Bobject%20Object%5D&gpid=%2F1111%2Fhomepage%23300x250&uach=%7B%22source%22%3A2%2C%22platform%22%3A%7B%22brand%22%3A%22macOS%22%7D%2C%22browsers%22%3A%5B%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Not%3AA-Brand%22%2C%22version%22%3A%5B%2299%22%5D%7D%5D%2C%22mobile%22%3A0%7D&schain=%7B%22ver%22%3A%221.0%22%2C%22complete%22%3A1%2C%22nodes%22%3A%5B%7B%22asi%22%3A%22indirectseller.com%22%2C%22sid%22%3A%2200001%22%2C%22hp%22%3A1%7D%5D%7D&imark=1&tp=https%3A%2F%2Fexample.com`,
187
+ banner: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com`,
188
+ bannerUSD: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=300x250%2C320x100&currency=USD&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com`,
189
+ native: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=1x1&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&tp=https%3A%2F%2Fexample.com`,
190
+ bannerWithHyperId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&imark=1&tp=https%3A%2F%2Fexample.com&hyper_id=novatiqId`,
191
+ bannerWithAdgextCriteoId: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&adgext_criteo_id=criteo-id-test-1234567890&imark=1&tp=https%3A%2F%2Fexample.com`,
192
+ bannerWithAdgextIds: `posall=SSPLOC&id=58278&sdktype=0&hb=true&t=json3&sizes=320x100&currency=JPY&pbver=${prebid.version}&sdkname=prebidjs&adapterver=1.6.2&adgext_id5_id=id5-id-test-1234567890&adgext_id5_id_link_type=2&adgext_imuid=i.KrAH6ZAZTJOnH5S4N2sogA&adgext_uid2=AgAAAAVacu1uAxgAxH%2BHJ8%2BnWlS2H4uVqr6i%2BHBDCNREHD8WKsio%2Fx7D8xXFuq1cJycUU86yXfTH9Xe%2F4C8KkH%2B7UCiU7uQxhyD7Qxnv251pEs6K8oK%2BBPLYR%2B8BLY%2FsJKesa%2FkoKwx1FHgUzIBum582tSy2Oo%2B7C6wYUaaV4QcLr%2F4LPA%3D&gpid=%2F1111%2Fhomepage%23300x250&uach=%7B%22source%22%3A2%2C%22platform%22%3A%7B%22brand%22%3A%22macOS%22%7D%2C%22browsers%22%3A%5B%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%5B%22112%22%5D%7D%2C%7B%22brand%22%3A%22Not%3AA-Brand%22%2C%22version%22%3A%5B%2299%22%5D%7D%5D%2C%22mobile%22%3A0%7D&schain=%7B%22ver%22%3A%221.0%22%2C%22complete%22%3A1%2C%22nodes%22%3A%5B%7B%22asi%22%3A%22indirectseller.com%22%2C%22sid%22%3A%2200001%22%2C%22hp%22%3A1%7D%5D%7D&imark=1&tp=https%3A%2F%2Fexample.com`,
193
193
  };
194
194
  it('sends bid request to ENDPOINT via GET', function () {
195
195
  const request = spec.buildRequests(bidRequests, bidderRequest)[0];
@@ -14,8 +14,7 @@ const REQUEST = {
14
14
  },
15
15
  'params': {
16
16
  bidFloor: 0.1,
17
- token: 'e64782a4-8e68-4c38-965b-80ccf115d46f',
18
- pos: 7
17
+ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f'
19
18
  },
20
19
  'userIdAsEids': [{
21
20
  'source': 'criteo.com',
@@ -96,10 +95,6 @@ describe('alkimiBidAdapter', function () {
96
95
  delete bid.params.token
97
96
  expect(spec.isBidRequestValid(bid)).to.equal(false)
98
97
 
99
- bid = Object.assign({}, REQUEST)
100
- delete bid.params.bidFloor
101
- expect(spec.isBidRequestValid(bid)).to.equal(false)
102
-
103
98
  bid = Object.assign({}, REQUEST)
104
99
  delete bid.params
105
100
  expect(spec.isBidRequestValid(bid)).to.equal(false)
@@ -109,7 +104,6 @@ describe('alkimiBidAdapter', function () {
109
104
  describe('buildRequests', function () {
110
105
  let bidRequests = [REQUEST]
111
106
  let requestData = {
112
- auctionId: '123',
113
107
  refererInfo: {
114
108
  page: 'http://test.com/path.html'
115
109
  },
@@ -137,10 +131,10 @@ describe('alkimiBidAdapter', function () {
137
131
 
138
132
  it('sends bid request to ENDPOINT via POST', function () {
139
133
  expect(bidderRequest.method).to.equal('POST')
140
- expect(bidderRequest.data.requestId).to.equal('123')
134
+ expect(bidderRequest.data.requestId).to.not.equal(undefined)
141
135
  expect(bidderRequest.data.referer).to.equal('http://test.com/path.html')
142
136
  expect(bidderRequest.data.schain).to.deep.contains({ ver: '1.0', complete: 1, nodes: [{ asi: 'alkimi-onboarding.com', sid: '00001', hp: 1 }] })
143
- expect(bidderRequest.data.signRequest.bids).to.deep.contains({ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f', pos: 7, bidFloor: 0.1, sizes: [{width: 300, height: 250}], playerSizes: [], impMediaTypes: ['Banner'], adUnitCode: 'bannerAdUnitCode' })
137
+ expect(bidderRequest.data.signRequest.bids).to.deep.contains({ token: 'e64782a4-8e68-4c38-965b-80ccf115d46f', bidFloor: 0.1, sizes: [{ width: 300, height: 250 }], playerSizes: [], impMediaTypes: ['Banner'], adUnitCode: 'bannerAdUnitCode', instl: undefined, exp: undefined, banner: { sizes: [[300, 250]] }, video: undefined })
144
138
  expect(bidderRequest.data.signRequest.randomUUID).to.equal(undefined)
145
139
  expect(bidderRequest.data.bidIds).to.deep.contains('456')
146
140
  expect(bidderRequest.data.signature).to.equal(undefined)