prebid.js 7.32.0 → 7.34.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 (180) hide show
  1. package/.github/workflows/issue_tracker.yml +26 -15
  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/admaticBidAdapter.js +1 -1
  8. package/dist/admixerBidAdapter.js +1 -1
  9. package/dist/adnuntiusBidAdapter.js +1 -1
  10. package/dist/adrelevantisBidAdapter.js +1 -1
  11. package/dist/adtrgtmeBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.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/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/arcspanRtdProvider.js +1 -0
  19. package/dist/asoBidAdapter.js +1 -1
  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/bliinkBidAdapter.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/connectadBidAdapter.js +1 -1
  30. package/dist/consentManagementUsp.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantBidAdapter.js +1 -1
  33. package/dist/craftBidAdapter.js +1 -1
  34. package/dist/criteoBidAdapter.js +1 -1
  35. package/dist/dspxBidAdapter.js +1 -1
  36. package/dist/emx_digitalBidAdapter.js +1 -1
  37. package/dist/eplanningBidAdapter.js +1 -1
  38. package/dist/feedadBidAdapter.js +1 -1
  39. package/dist/finativeBidAdapter.js +1 -1
  40. package/dist/glimpseBidAdapter.js +1 -1
  41. package/dist/gmosspBidAdapter.js +1 -1
  42. package/dist/goldbachBidAdapter.js +1 -1
  43. package/dist/gridBidAdapter.js +1 -1
  44. package/dist/gridNMBidAdapter.js +1 -1
  45. package/dist/gumgumBidAdapter.js +1 -1
  46. package/dist/h12mediaBidAdapter.js +1 -1
  47. package/dist/holidBidAdapter.js +1 -1
  48. package/dist/id5IdSystem.js +1 -1
  49. package/dist/improvedigitalBidAdapter.js +1 -1
  50. package/dist/inmarBidAdapter.js +1 -1
  51. package/dist/insticatorBidAdapter.js +1 -1
  52. package/dist/ixBidAdapter.js +1 -1
  53. package/dist/justpremiumBidAdapter.js +1 -1
  54. package/dist/kargoBidAdapter.js +1 -1
  55. package/dist/konduitAnalyticsAdapter.js +1 -1
  56. package/dist/kueezBidAdapter.js +1 -1
  57. package/dist/kueezRtbBidAdapter.js +1 -1
  58. package/dist/lassoBidAdapter.js +1 -1
  59. package/dist/lifestreetBidAdapter.js +1 -1
  60. package/dist/liveIntentIdSystem.js +1 -1
  61. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  62. package/dist/logicadBidAdapter.js +1 -1
  63. package/dist/loglyliftBidAdapter.js +1 -1
  64. package/dist/lotamePanoramaIdSystem.js +1 -1
  65. package/dist/magniteAnalyticsAdapter.js +1 -1
  66. package/dist/malltvAnalyticsAdapter.js +1 -1
  67. package/dist/marsmediaBidAdapter.js +1 -1
  68. package/dist/mediafuseBidAdapter.js +1 -1
  69. package/dist/mediasquareBidAdapter.js +1 -1
  70. package/dist/mgidBidAdapter.js +1 -1
  71. package/dist/minutemediaBidAdapter.js +1 -1
  72. package/dist/nextMillenniumBidAdapter.js +1 -1
  73. package/dist/nexx360BidAdapter.js +1 -1
  74. package/dist/not-for-prod/prebid.js +129 -128
  75. package/dist/oguryBidAdapter.js +1 -1
  76. package/dist/onetagBidAdapter.js +1 -1
  77. package/dist/ooloAnalyticsAdapter.js +1 -1
  78. package/dist/openxBidAdapter.js +1 -1
  79. package/dist/ortbConverter.js +1 -1
  80. package/dist/outbrainBidAdapter.js +1 -1
  81. package/dist/parrableIdSystem.js +1 -1
  82. package/dist/pixfutureBidAdapter.js +1 -1
  83. package/dist/prebid-core.js +1 -1
  84. package/dist/prebidServerBidAdapter.js +1 -1
  85. package/dist/priceFloors.js +1 -1
  86. package/dist/publinkIdSystem.js +1 -1
  87. package/dist/pubmaticBidAdapter.js +1 -1
  88. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  89. package/dist/pxyzBidAdapter.js +1 -1
  90. package/dist/quantcastBidAdapter.js +1 -1
  91. package/dist/readpeakBidAdapter.js +1 -1
  92. package/dist/relaidoBidAdapter.js +1 -1
  93. package/dist/rhythmoneBidAdapter.js +1 -1
  94. package/dist/riseBidAdapter.js +1 -1
  95. package/dist/rubiconAnalyticsAdapter.js +1 -1
  96. package/dist/rubiconBidAdapter.js +1 -1
  97. package/dist/seedingAllianceBidAdapter.js +1 -1
  98. package/dist/seedtagBidAdapter.js +1 -1
  99. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  100. package/dist/sharethroughBidAdapter.js +1 -1
  101. package/dist/shinezBidAdapter.js +1 -1
  102. package/dist/smaatoBidAdapter.js +1 -1
  103. package/dist/smartadserverBidAdapter.js +1 -1
  104. package/dist/smartxBidAdapter.js +1 -1
  105. package/dist/smilewantedBidAdapter.js +1 -1
  106. package/dist/sonobiBidAdapter.js +1 -1
  107. package/dist/sovrnAnalyticsAdapter.js +1 -1
  108. package/dist/sovrnBidAdapter.js +1 -1
  109. package/dist/sspBCBidAdapter.js +1 -1
  110. package/dist/sublimeBidAdapter.js +1 -1
  111. package/dist/synacormediaBidAdapter.js +1 -1
  112. package/dist/targetVideoBidAdapter.js +1 -1
  113. package/dist/teadsBidAdapter.js +1 -1
  114. package/dist/trionBidAdapter.js +1 -1
  115. package/dist/tripleliftBidAdapter.js +1 -1
  116. package/dist/ttdBidAdapter.js +1 -1
  117. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  118. package/dist/uid2IdSystem.js +1 -1
  119. package/dist/underdogmediaBidAdapter.js +1 -1
  120. package/dist/undertoneBidAdapter.js +1 -1
  121. package/dist/vidazooBidAdapter.js +1 -1
  122. package/dist/videobyteBidAdapter.js +1 -1
  123. package/dist/visxBidAdapter.js +1 -1
  124. package/dist/vuukleBidAdapter.js +1 -1
  125. package/dist/widespaceBidAdapter.js +1 -1
  126. package/dist/winrBidAdapter.js +1 -1
  127. package/dist/yahoosspBidAdapter.js +1 -1
  128. package/dist/yieldmoBidAdapter.js +1 -1
  129. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  130. package/libraries/ortbConverter/processors/default.js +19 -1
  131. package/modules/.submodules.json +1 -0
  132. package/modules/admaticBidAdapter.js +2 -1
  133. package/modules/admixerBidAdapter.js +26 -4
  134. package/modules/adnuntiusBidAdapter.js +36 -38
  135. package/modules/arcspanRtdProvider.js +73 -0
  136. package/modules/arcspanRtdProvider.md +11 -0
  137. package/modules/bliinkBidAdapter.js +1 -1
  138. package/modules/consentManagementUsp.js +10 -10
  139. package/modules/consumableBidAdapter.js +20 -2
  140. package/modules/criteoBidAdapter.js +1 -1
  141. package/modules/emx_digitalBidAdapter.js +9 -2
  142. package/modules/holidBidAdapter.js +9 -4
  143. package/modules/id5IdSystem.js +3 -1
  144. package/modules/ixBidAdapter.js +25 -6
  145. package/modules/kargoBidAdapter.js +5 -1
  146. package/modules/lotamePanoramaIdSystem.js +9 -1
  147. package/modules/nextMillenniumBidAdapter.js +19 -9
  148. package/modules/nexx360BidAdapter.js +2 -1
  149. package/modules/openxBidAdapter.js +5 -0
  150. package/modules/prebidServerBidAdapter/index.js +14 -1
  151. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
  152. package/modules/priceFloors.js +11 -5
  153. package/modules/seedingAllianceBidAdapter.js +129 -116
  154. package/modules/seedtagBidAdapter.js +20 -6
  155. package/modules/targetVideoBidAdapter.js +1 -1
  156. package/modules/tripleliftBidAdapter.js +4 -0
  157. package/package.json +2 -2
  158. package/src/adloader.js +2 -1
  159. package/src/utils/promise.js +8 -0
  160. package/test/spec/modules/admixerBidAdapter_spec.js +140 -60
  161. package/test/spec/modules/adnuntiusBidAdapter_spec.js +120 -120
  162. package/test/spec/modules/arcspanRtdProvider_spec.js +187 -0
  163. package/test/spec/modules/bliinkBidAdapter_spec.js +7 -7
  164. package/test/spec/modules/consentManagementUsp_spec.js +15 -2
  165. package/test/spec/modules/consumableBidAdapter_spec.js +46 -0
  166. package/test/spec/modules/emx_digitalBidAdapter_spec.js +30 -1
  167. package/test/spec/modules/holidBidAdapter_spec.js +29 -0
  168. package/test/spec/modules/ixBidAdapter_spec.js +117 -6
  169. package/test/spec/modules/kargoBidAdapter_spec.js +32 -0
  170. package/test/spec/modules/lotamePanoramaIdSystem_spec.js +16 -10
  171. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +14 -2
  172. package/test/spec/modules/openxBidAdapter_spec.js +41 -0
  173. package/test/spec/modules/openxOrtbBidAdapter_spec.js +41 -0
  174. package/test/spec/modules/prebidServerBidAdapter_spec.js +138 -0
  175. package/test/spec/modules/priceFloors_spec.js +155 -0
  176. package/test/spec/modules/seedingAllianceAdapter_spec.js +66 -23
  177. package/test/spec/modules/seedtagBidAdapter_spec.js +58 -17
  178. package/test/spec/modules/targetVideoBidAdapter_spec.js +2 -2
  179. package/test/spec/modules/tripleliftBidAdapter_spec.js +13 -0
  180. package/test/spec/ortbConverter/default_processors_spec.js +23 -0
@@ -180,12 +180,26 @@ export const spec = {
180
180
  return bidResponses;
181
181
  },
182
182
 
183
- getUserSyncs: function(syncOptions, serverResponses) {
183
+ getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
184
+ let syncUrl = 'https://sync.serverbid.com/ss/' + siteId + '.html';
185
+
184
186
  if (syncOptions.iframeEnabled) {
187
+ if (gdprConsent && gdprConsent.consentString) {
188
+ if (typeof gdprConsent.gdprApplies === 'boolean') {
189
+ syncUrl = appendUrlParam(syncUrl, `gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`);
190
+ } else {
191
+ syncUrl = appendUrlParam(syncUrl, `gdpr=0&gdpr_consent=${gdprConsent.consentString}`);
192
+ }
193
+ }
194
+
195
+ if (uspConsent && uspConsent.consentString) {
196
+ syncUrl = appendUrlParam(syncUrl, `us_privacy=${uspConsent.consentString}`);
197
+ }
198
+
185
199
  if (!serverResponses || serverResponses.length === 0 || !serverResponses[0].body.bdr || serverResponses[0].body.bdr !== 'cx') {
186
200
  return [{
187
201
  type: 'iframe',
188
- url: 'https://sync.serverbid.com/ss/' + siteId + '.html'
202
+ url: syncUrl
189
203
  }];
190
204
  }
191
205
  }
@@ -294,4 +308,8 @@ function getBidFloor(bid, sizes) {
294
308
  return floor;
295
309
  }
296
310
 
311
+ function appendUrlParam(url, queryString) {
312
+ return `${url}${url.indexOf('?') > -1 ? '&' : '?'}${queryString}`;
313
+ }
314
+
297
315
  registerBidder(spec);
@@ -27,7 +27,7 @@ const LOG_PREFIX = 'Criteo: ';
27
27
  Unminified source code can be found in the privately shared repo: https://github.com/Prebid-org/prebid-js-external-js-criteo/blob/master/dist/prod.js
28
28
  */
29
29
  const FAST_BID_VERSION_PLACEHOLDER = '%FAST_BID_VERSION%';
30
- export const FAST_BID_VERSION_CURRENT = 132;
30
+ export const FAST_BID_VERSION_CURRENT = 134;
31
31
  const FAST_BID_VERSION_LATEST = 'latest';
32
32
  const FAST_BID_VERSION_NONE = 'none';
33
33
  const PUBLISHER_TAG_URL_TEMPLATE = 'https://static.criteo.net/js/ld/publishertag.prebid' + FAST_BID_VERSION_PLACEHOLDER + '.js';
@@ -354,16 +354,23 @@ export const spec = {
354
354
  },
355
355
  getUserSyncs: function (syncOptions, responses, gdprConsent, uspConsent) {
356
356
  const syncs = [];
357
+ const consentParams = [];
357
358
  if (syncOptions.iframeEnabled) {
358
359
  let url = 'https://biddr.brealtime.com/check.html';
359
360
  if (gdprConsent && typeof gdprConsent.consentString === 'string') {
360
361
  // add 'gdpr' only if 'gdprApplies' is defined
361
362
  if (typeof gdprConsent.gdprApplies === 'boolean') {
362
- url += `?gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
363
+ consentParams.push(`gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`);
363
364
  } else {
364
- url += `?gdpr_consent=${gdprConsent.consentString}`;
365
+ consentParams.push(`?gdpr_consent=${gdprConsent.consentString}`);
365
366
  }
366
367
  }
368
+ if (uspConsent && typeof uspConsent.consentString === 'string') {
369
+ consentParams.push(`usp=${uspConsent.consentString}`);
370
+ }
371
+ if (consentParams.length > 0) {
372
+ url = url + '?' + consentParams.join('&');
373
+ }
367
374
  syncs.push({
368
375
  type: 'iframe',
369
376
  url: url
@@ -85,11 +85,12 @@ export const spec = {
85
85
  }
86
86
 
87
87
  const syncs = []
88
+ const bidders = getBidders(serverResponse)
88
89
 
89
- if (optionsType.iframeEnabled) {
90
+ if (optionsType.iframeEnabled && bidders) {
90
91
  const queryParams = []
91
92
 
92
- queryParams.push('bidders=' + getBidders(serverResponse))
93
+ queryParams.push('bidders=' + bidders)
93
94
  queryParams.push('gdpr=' + +gdprConsent.gdprApplies)
94
95
  queryParams.push('gdpr_consent=' + gdprConsent.consentString)
95
96
  queryParams.push('usp_consent=' + (uspConsent || ''))
@@ -107,6 +108,8 @@ export const spec = {
107
108
 
108
109
  return syncs
109
110
  }
111
+
112
+ return []
110
113
  },
111
114
  }
112
115
 
@@ -136,10 +139,12 @@ function getImp(bid) {
136
139
 
137
140
  function getBidders(serverResponse) {
138
141
  const bidders = serverResponse
139
- .map((res) => Object.keys(res.body.ext.responsetimemillis))
142
+ .map((res) => Object.keys(res.body.ext.responsetimemillis || []))
140
143
  .flat(1)
141
144
 
142
- return encodeURIComponent(JSON.stringify([...new Set(bidders)]))
145
+ if (bidders.length) {
146
+ return encodeURIComponent(JSON.stringify([...new Set(bidders)]))
147
+ }
143
148
  }
144
149
 
145
150
  function addWurl(auctionId, adId, wurl) {
@@ -247,7 +247,9 @@ class IdFetchFlow {
247
247
  'gdpr': hasGdpr,
248
248
  'nbPage': nbPage,
249
249
  'o': 'pbjs',
250
- 'rf': referer.topmostLocation,
250
+ 'tml': referer.topmostLocation,
251
+ 'ref': referer.ref,
252
+ 'cu': referer.canonicalUrl,
251
253
  'top': referer.reachedTop ? 1 : 0,
252
254
  'u': referer.stack[0] || window.location.href,
253
255
  'v': '$prebid.version$',
@@ -380,8 +380,8 @@ function parseBid(rawBid, currency, bidRequest) {
380
380
  bid.netRevenue = NET_REVENUE;
381
381
  bid.currency = currency;
382
382
  bid.creativeId = rawBid.hasOwnProperty('crid') ? rawBid.crid : '-';
383
-
384
- if (rawBid.mtype == MEDIA_TYPES.Video) {
383
+ // If mtype = video is passed and vastURl is not set, set vastxml
384
+ if (rawBid.mtype == MEDIA_TYPES.Video && ((rawBid.ext && !rawBid.ext.vasturl) || !rawBid.ext)) {
385
385
  bid.vastXml = rawBid.adm;
386
386
  } else if (rawBid.ext && rawBid.ext.vasturl) {
387
387
  bid.vastUrl = rawBid.ext.vasturl;
@@ -425,7 +425,6 @@ function parseBid(rawBid, currency, bidRequest) {
425
425
  if (rawBid.adomain && rawBid.adomain.length > 0) {
426
426
  bid.meta.advertiserDomains = rawBid.adomain;
427
427
  }
428
-
429
428
  return bid;
430
429
  }
431
430
 
@@ -629,8 +628,7 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
629
628
  }
630
629
 
631
630
  const r = {};
632
- const tmax = config.getConfig('bidderTimeout');
633
-
631
+ const tmax = deepAccess(bidderRequest, 'timeout');
634
632
  // Since bidderRequestId are the same for different bid request, just use the first one.
635
633
  r.id = validBidRequests[0].bidderRequestId.toString();
636
634
  r.site = {};
@@ -720,6 +718,11 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
720
718
  if (pageUrl) {
721
719
  r.site.page = pageUrl;
722
720
  }
721
+
722
+ if (bidderRequest.gppConsent) {
723
+ deepSetValue(r, 'regs.gpp', bidderRequest.gppConsent.gppString);
724
+ deepSetValue(r, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
725
+ }
723
726
  }
724
727
 
725
728
  if (config.getConfig('coppa')) {
@@ -856,7 +859,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
856
859
  currentRequestSize += currentImpressionSize;
857
860
 
858
861
  const fpd = deepAccess(bidderRequest, 'ortb2') || {};
859
-
860
862
  if (!isEmpty(fpd) && !isFpdAdded) {
861
863
  r.ext.ixdiag.fpd = true;
862
864
 
@@ -876,6 +878,23 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
876
878
  }
877
879
  });
878
880
 
881
+ if (fpd.device) {
882
+ const sua = {...fpd.device.sua};
883
+ if (!isEmpty(sua)) {
884
+ deepSetValue(r, 'device.sua', sua);
885
+ }
886
+ }
887
+
888
+ if (fpd.hasOwnProperty('regs') && !bidderRequest.gppConsent) {
889
+ if (fpd.regs.hasOwnProperty('gpp') && typeof fpd.regs.gpp == 'string') {
890
+ deepSetValue(r, 'regs.gpp', fpd.regs.gpp)
891
+ }
892
+
893
+ if (fpd.regs.hasOwnProperty('gpp_sid') && Array.isArray(fpd.regs.gpp_sid)) {
894
+ deepSetValue(r, 'regs.gpp_sid', fpd.regs.gpp_sid)
895
+ }
896
+ }
897
+
879
898
  const clonedRObject = deepClone(r);
880
899
 
881
900
  clonedRObject.site = mergeDeep({}, clonedRObject.site, site);
@@ -116,7 +116,11 @@ export const spec = {
116
116
  };
117
117
 
118
118
  if (meta.mediaType == VIDEO) {
119
- bidResponse.vastXml = adUnit.adm;
119
+ if (adUnit.admUrl) {
120
+ bidResponse.vastUrl = adUnit.admUrl;
121
+ } else {
122
+ bidResponse.vastXml = adUnit.adm;
123
+ }
120
124
  }
121
125
 
122
126
  bidResponses.push(bidResponse);
@@ -29,6 +29,7 @@ const DAY_MS = 60 * 60 * 24 * 1000;
29
29
  const MISSING_CORE_CONSENT = 111;
30
30
  const GVLID = 95;
31
31
  const ID_HOST = 'id.crwdcntrl.net';
32
+ const ID_HOST_COOKIELESS = 'c.ltmsphrcl.net';
32
33
 
33
34
  export const storage = getStorageManager({gvlid: GVLID, moduleName: MODULE_NAME});
34
35
  let cookieDomain;
@@ -252,6 +253,13 @@ export const lotamePanoramaIdSubmodule = {
252
253
  usPrivacy = getFromStorage('us_privacy');
253
254
  }
254
255
 
256
+ const getRequestHost = function() {
257
+ if (navigator.userAgent && navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
258
+ return ID_HOST_COOKIELESS;
259
+ }
260
+ return ID_HOST;
261
+ }
262
+
255
263
  const resolveIdFunction = function (callback) {
256
264
  let queryParams = {};
257
265
  if (storedUserId) {
@@ -288,7 +296,7 @@ export const lotamePanoramaIdSubmodule = {
288
296
 
289
297
  const url = buildUrl({
290
298
  protocol: 'https',
291
- host: ID_HOST,
299
+ host: getRequestHost(),
292
300
  pathname: '/id',
293
301
  search: isEmpty(queryParams) ? undefined : queryParams,
294
302
  });
@@ -271,15 +271,25 @@ export const spec = {
271
271
  };
272
272
 
273
273
  function replaceUsersyncMacros(url, gdprConsent, uspConsent) {
274
- const { consentString, gdprApplies } = gdprConsent;
275
-
276
- return url.replace(
277
- '{{.GDPR}}', Number(gdprApplies)
278
- ).replace(
279
- '{{.GDPRConsent}}', consentString
280
- ).replace(
281
- '{{.USPrivacy}}', uspConsent
282
- );
274
+ const { consentString, gdprApplies } = gdprConsent || {};
275
+
276
+ if (gdprApplies) {
277
+ const gdpr = Number(gdprApplies);
278
+ url = url.replace('{{.GDPR}}', gdpr);
279
+
280
+ if (gdpr == 1 && consentString && consentString.length > 0) {
281
+ url = url.replace('{{.GDPRConsent}}', consentString);
282
+ }
283
+ } else {
284
+ url = url.replace('{{.GDPR}}', 0);
285
+ url = url.replace('{{.GDPRConsent}}', '');
286
+ }
287
+
288
+ if (uspConsent) {
289
+ url = url.replace('{{.USPrivacy}}', uspConsent);
290
+ }
291
+
292
+ return url;
283
293
  };
284
294
 
285
295
  function getAdEl(bid) {
@@ -21,7 +21,8 @@ export const spec = {
21
21
  gvlid: GVLID,
22
22
  aliases: [
23
23
  { code: 'revenuemaker' },
24
- { code: 'firstid-ssp' },
24
+ { code: 'first-id', gvlid: 1178 },
25
+ { code: 'adwebone' },
25
26
  ],
26
27
  supportedMediaTypes: [BANNER, VIDEO],
27
28
  isBidRequestValid,
@@ -268,6 +268,11 @@ function buildCommonQueryParamsFromBids(bids, bidderRequest) {
268
268
  nocache: new Date().getTime()
269
269
  };
270
270
 
271
+ const userAgentClientHints = deepAccess(bidderRequest, 'ortb2.device.sua');
272
+ if (userAgentClientHints) {
273
+ defaultParams.sua = JSON.stringify(userAgentClientHints);
274
+ }
275
+
271
276
  const userDataSegments = buildFpdQueryParams('user.data', bidderRequest.ortb2);
272
277
  if (userDataSegments.length > 0) {
273
278
  defaultParams.sm = userDataSegments;
@@ -222,10 +222,23 @@ function queueSync(bidderCodes, gdprConsent, uspConsent, gppConsent, s2sConfig)
222
222
  }
223
223
  _syncCount++;
224
224
 
225
+ let filterSettings = {};
226
+ const userSyncFilterSettings = getConfig('userSync.filterSettings');
227
+
228
+ if (userSyncFilterSettings) {
229
+ const { all, iframe, image } = userSyncFilterSettings;
230
+ const ifrm = iframe || all;
231
+ const img = image || all;
232
+
233
+ if (ifrm) filterSettings = Object.assign({ iframe: ifrm }, filterSettings);
234
+ if (img) filterSettings = Object.assign({ image: img }, filterSettings);
235
+ }
236
+
225
237
  const payload = {
226
238
  uuid: generateUUID(),
227
239
  bidders: bidderCodes,
228
- account: s2sConfig.accountId
240
+ account: s2sConfig.accountId,
241
+ filterSettings
229
242
  };
230
243
 
231
244
  let userSyncLimit = s2sConfig.userSyncLimit;
@@ -47,7 +47,7 @@ const PBS_CONVERTER = ortbConverter({
47
47
  request.tmax = s2sBidRequest.s2sConfig.timeout;
48
48
  deepSetValue(request, 'source.tid', proxyBidderRequest.auctionId);
49
49
 
50
- [request.app, request.site].forEach(section => {
50
+ [request.app, request.dooh, request.site].forEach(section => {
51
51
  if (section && !section.publisher?.id) {
52
52
  deepSetValue(section, 'publisher.id', s2sBidRequest.s2sConfig.accountId);
53
53
  }
@@ -179,10 +179,10 @@ function generatePossibleEnumerations(arrayOfFields, delimiter) {
179
179
  /**
180
180
  * @summary If a the input bidder has a registered cpmadjustment it returns the input CPM after being adjusted
181
181
  */
182
- export function getBiddersCpmAdjustment(bidderName, inputCpm, bid = {}) {
182
+ export function getBiddersCpmAdjustment(bidderName, inputCpm, bid, bidRequest) {
183
183
  const adjustmentFunction = bidderSettings.get(bidderName, 'bidCpmAdjustment');
184
184
  if (adjustmentFunction) {
185
- return parseFloat(adjustmentFunction(inputCpm, {...bid, cpm: inputCpm}));
185
+ return parseFloat(adjustmentFunction(inputCpm, { ...bid, cpm: inputCpm }, bidRequest));
186
186
  }
187
187
  return parseFloat(inputCpm);
188
188
  }
@@ -249,8 +249,14 @@ export function getFloor(requestParams = {currency: 'USD', mediaType: '*', size:
249
249
 
250
250
  // if cpmAdjustment flag is true and we have a valid floor then run the adjustment on it
251
251
  if (floorData.enforcement.bidAdjustment && floorInfo.matchingFloor) {
252
- let cpmAdjustment = getBiddersCpmAdjustment(bidRequest.bidder, floorInfo.matchingFloor);
253
- floorInfo.matchingFloor = cpmAdjustment ? calculateAdjustedFloor(floorInfo.matchingFloor, cpmAdjustment) : floorInfo.matchingFloor;
252
+ // pub provided inverse function takes precedence, otherwise do old adjustment stuff
253
+ const inverseFunction = bidderSettings.get(bidRequest.bidder, 'inverseBidAdjustment');
254
+ if (inverseFunction) {
255
+ floorInfo.matchingFloor = inverseFunction(floorInfo.matchingFloor, bidRequest);
256
+ } else {
257
+ let cpmAdjustment = getBiddersCpmAdjustment(bidRequest.bidder, floorInfo.matchingFloor, {}, bidRequest);
258
+ floorInfo.matchingFloor = cpmAdjustment ? calculateAdjustedFloor(floorInfo.matchingFloor, cpmAdjustment) : floorInfo.matchingFloor;
259
+ }
254
260
  }
255
261
 
256
262
  if (floorInfo.matchingFloor) {
@@ -731,7 +737,7 @@ export const addBidResponseHook = timedBidResponseHook('priceFloors', function a
731
737
  }
732
738
 
733
739
  // ok we got the bid response cpm in our desired currency. Now we need to run the bidders CPMAdjustment function if it exists
734
- adjustedCpm = getBiddersCpmAdjustment(bid.bidderCode, adjustedCpm, bid);
740
+ adjustedCpm = getBiddersCpmAdjustment(bid.bidderCode, adjustedCpm, bid, matchingBidRequest);
735
741
 
736
742
  // add necessary data information for analytics adapters / floor providers would possibly need
737
743
  addFloorDataToBid(floorData, floorInfo, bid, adjustedCpm);