prebid.js 7.4.0 → 7.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 (239) hide show
  1. package/.circleci/config.yml +11 -6
  2. package/dist/1plusXRtdProvider.js +1 -0
  3. package/dist/33acrossBidAdapter.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/adnuntiusBidAdapter.js +1 -1
  8. package/dist/adoceanBidAdapter.js +1 -1
  9. package/dist/adotBidAdapter.js +1 -1
  10. package/dist/adrelevantisBidAdapter.js +1 -1
  11. package/dist/adrinoBidAdapter.js +1 -1
  12. package/dist/adtelligentBidAdapter.js +1 -1
  13. package/dist/adxcgBidAdapter.js +1 -1
  14. package/dist/ajaBidAdapter.js +1 -1
  15. package/dist/amxBidAdapter.js +1 -1
  16. package/dist/amxIdSystem.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/atsAnalyticsAdapter.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/bliinkBidAdapter.js +1 -1
  25. package/dist/bridgewellBidAdapter.js +1 -1
  26. package/dist/brightMountainMediaBidAdapter.js +1 -1
  27. package/dist/byDataAnalyticsAdapter.js +1 -1
  28. package/dist/concertBidAdapter.js +1 -1
  29. package/dist/connectadBidAdapter.js +1 -1
  30. package/dist/consumableBidAdapter.js +1 -1
  31. package/dist/conversantBidAdapter.js +1 -1
  32. package/dist/craftBidAdapter.js +1 -1
  33. package/dist/criteoBidAdapter.js +1 -1
  34. package/dist/currency.js +1 -1
  35. package/dist/dspxBidAdapter.js +1 -1
  36. package/dist/eplanningBidAdapter.js +1 -1
  37. package/dist/finativeBidAdapter.js +1 -1
  38. package/dist/gdprEnforcement.js +1 -1
  39. package/dist/glimpseBidAdapter.js +1 -1
  40. package/dist/gmosspBidAdapter.js +1 -1
  41. package/dist/goldbachBidAdapter.js +1 -1
  42. package/dist/gridBidAdapter.js +1 -1
  43. package/dist/gridNMBidAdapter.js +1 -1
  44. package/dist/gumgumBidAdapter.js +1 -1
  45. package/dist/h12mediaBidAdapter.js +1 -1
  46. package/dist/hadronIdSystem.js +1 -1
  47. package/dist/hadronRtdProvider.js +1 -1
  48. package/dist/id5IdSystem.js +1 -1
  49. package/dist/imRtdProvider.js +1 -1
  50. package/dist/impactifyBidAdapter.js +1 -1
  51. package/dist/improvedigitalBidAdapter.js +1 -1
  52. package/dist/inmarBidAdapter.js +1 -1
  53. package/dist/insticatorBidAdapter.js +1 -1
  54. package/dist/ixBidAdapter.js +1 -1
  55. package/dist/jixieBidAdapter.js +1 -1
  56. package/dist/justpremiumBidAdapter.js +1 -1
  57. package/dist/kargoAnalyticsAdapter.js +1 -1
  58. package/dist/konduitAnalyticsAdapter.js +1 -1
  59. package/dist/kueezBidAdapter.js +1 -1
  60. package/dist/lassoBidAdapter.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/malltvAnalyticsAdapter.js +1 -1
  65. package/dist/marsmediaBidAdapter.js +1 -1
  66. package/dist/mediafuseBidAdapter.js +1 -1
  67. package/dist/mediasquareBidAdapter.js +1 -1
  68. package/dist/mgidBidAdapter.js +1 -1
  69. package/dist/minutemediaBidAdapter.js +1 -1
  70. package/dist/naveggIdSystem.js +1 -1
  71. package/dist/newspassidBidAdapter.js +1 -0
  72. package/dist/nextMillenniumBidAdapter.js +1 -1
  73. package/dist/not-for-prod/prebid.js +131 -128
  74. package/dist/oguryBidAdapter.js +1 -1
  75. package/dist/onetagBidAdapter.js +1 -1
  76. package/dist/ooloAnalyticsAdapter.js +1 -1
  77. package/dist/outbrainBidAdapter.js +1 -1
  78. package/dist/parrableIdSystem.js +1 -1
  79. package/dist/pixfutureBidAdapter.js +1 -1
  80. package/dist/prebid-core.js +1 -1
  81. package/dist/prebidServerBidAdapter.js +1 -1
  82. package/dist/priceFloors.js +1 -1
  83. package/dist/pubCommonId.js +1 -1
  84. package/dist/publinkIdSystem.js +1 -1
  85. package/dist/pubmaticBidAdapter.js +1 -1
  86. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  87. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  88. package/dist/pxyzBidAdapter.js +1 -1
  89. package/dist/quantcastBidAdapter.js +1 -1
  90. package/dist/rasBidAdapter.js +1 -0
  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/sharedIdSystem.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/sublimeBidAdapter.js +1 -1
  112. package/dist/synacormediaBidAdapter.js +1 -1
  113. package/dist/taboolaBidAdapter.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/underdogmediaBidAdapter.js +1 -1
  121. package/dist/undertoneBidAdapter.js +1 -1
  122. package/dist/userId.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/integrationExamples/gpt/1plusXRtdProviderExample.html +112 -0
  133. package/karma.conf.maker.js +3 -1
  134. package/modules/.submodules.json +2 -1
  135. package/modules/1plusXRtdProvider.js +251 -0
  136. package/modules/1plusXRtdProvider.md +65 -0
  137. package/modules/adgenerationBidAdapter.js +24 -1
  138. package/modules/adnuntiusBidAdapter.js +26 -8
  139. package/modules/adoceanBidAdapter.js +10 -3
  140. package/modules/adotBidAdapter.js +13 -4
  141. package/modules/adrinoBidAdapter.js +10 -2
  142. package/modules/adrinoBidAdapter.md +6 -0
  143. package/modules/adtelligentBidAdapter.js +2 -1
  144. package/modules/appnexusBidAdapter.js +3 -3
  145. package/modules/atsAnalyticsAdapter.js +4 -5
  146. package/modules/big-richmediaBidAdapter.js +3 -3
  147. package/modules/bliinkBidAdapter.js +120 -193
  148. package/modules/bliinkBidAdapter.md +2 -5
  149. package/modules/byDataAnalyticsAdapter.js +172 -74
  150. package/modules/byDataAnalyticsAdapter.md +5 -6
  151. package/modules/consumableBidAdapter.js +21 -1
  152. package/modules/criteoBidAdapter.js +7 -1
  153. package/modules/currency.js +2 -2
  154. package/modules/cwireBidAdapter.md +1 -1
  155. package/modules/eplanningBidAdapter.js +82 -97
  156. package/modules/gdprEnforcement.js +8 -14
  157. package/modules/gridNMBidAdapter.js +45 -4
  158. package/modules/hadronAnalyticsAdapter.md +5 -5
  159. package/modules/hadronIdSystem.js +18 -5
  160. package/modules/hadronIdSystem.md +15 -11
  161. package/modules/hadronRtdProvider.js +14 -1
  162. package/modules/hadronRtdProvider.md +17 -13
  163. package/modules/imRtdProvider.js +0 -8
  164. package/modules/impactifyBidAdapter.js +6 -2
  165. package/modules/ixBidAdapter.js +133 -23
  166. package/modules/ixBidAdapter.md +2 -5
  167. package/modules/jixieBidAdapter.js +10 -10
  168. package/modules/kargoAnalyticsAdapter.js +88 -6
  169. package/modules/kargoAnalyticsAdapter.md +33 -0
  170. package/modules/minutemediaBidAdapter.js +1 -0
  171. package/modules/naveggIdSystem.js +1 -12
  172. package/modules/newspassidBidAdapter.js +649 -0
  173. package/modules/nextMillenniumBidAdapter.js +17 -1
  174. package/modules/nextMillenniumBidAdapter.md +1 -1
  175. package/modules/oguryBidAdapter.js +2 -0
  176. package/modules/onetagBidAdapter.js +44 -7
  177. package/modules/prebidServerBidAdapter/index.js +7 -0
  178. package/modules/priceFloors.js +1 -1
  179. package/modules/pubCommonId.js +1 -2
  180. package/modules/pubxaiAnalyticsAdapter.js +6 -1
  181. package/modules/rasBidAdapter.js +149 -0
  182. package/modules/rasBidAdapter.md +50 -0
  183. package/modules/rubiconBidAdapter.js +5 -0
  184. package/modules/seedingAllianceBidAdapter.js +3 -0
  185. package/modules/seedtagBidAdapter.js +37 -1
  186. package/modules/sharedIdSystem.js +11 -5
  187. package/modules/sharethroughBidAdapter.js +9 -24
  188. package/modules/taboolaBidAdapter.js +1 -1
  189. package/modules/taboolaBidAdapter.md +3 -3
  190. package/modules/targetVideoBidAdapter.js +18 -0
  191. package/modules/userId/index.js +39 -21
  192. package/package.json +1 -1
  193. package/src/auction.js +6 -5
  194. package/src/consentHandler.js +11 -11
  195. package/src/debugging.js +5 -3
  196. package/src/hook.js +2 -2
  197. package/src/storageManager.js +4 -5
  198. package/src/utils/promise.js +96 -21
  199. package/src/utils.js +3 -2
  200. package/test/helpers/consentData.js +2 -1
  201. package/test/spec/auctionmanager_spec.js +1 -6
  202. package/test/spec/debugging_spec.js +2 -2
  203. package/test/spec/modules/1plusXRtdProvider_spec.js +430 -0
  204. package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
  205. package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
  206. package/test/spec/modules/adoceanBidAdapter_spec.js +4 -1
  207. package/test/spec/modules/adotBidAdapter_spec.js +12 -9
  208. package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
  209. package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
  210. package/test/spec/modules/bliinkBidAdapter_spec.js +323 -136
  211. package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
  212. package/test/spec/modules/consumableBidAdapter_spec.js +122 -1
  213. package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
  214. package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
  215. package/test/spec/modules/gdprEnforcement_spec.js +53 -100
  216. package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
  217. package/test/spec/modules/hadronIdSystem_spec.js +2 -2
  218. package/test/spec/modules/idxIdSystem_spec.js +1 -1
  219. package/test/spec/modules/imRtdProvider_spec.js +0 -1
  220. package/test/spec/modules/ixBidAdapter_spec.js +212 -5
  221. package/test/spec/modules/jixieBidAdapter_spec.js +8 -8
  222. package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
  223. package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
  224. package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
  225. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
  226. package/test/spec/modules/onetagBidAdapter_spec.js +53 -4
  227. package/test/spec/modules/parrableIdSystem_spec.js +2 -1
  228. package/test/spec/modules/prebidServerBidAdapter_spec.js +20 -0
  229. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
  230. package/test/spec/modules/rasBidAdapter_spec.js +190 -0
  231. package/test/spec/modules/rubiconBidAdapter_spec.js +27 -0
  232. package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
  233. package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
  234. package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
  235. package/test/spec/modules/targetVideoBidAdapter_spec.js +43 -0
  236. package/test/spec/modules/userId_spec.js +15 -2
  237. package/test/spec/unit/pbjs_api_spec.js +1 -5
  238. package/test/spec/unit/utils/promise_spec.js +283 -38
  239. package/test/helpers/syncPromise.js +0 -71
@@ -2,7 +2,7 @@
2
2
  ```
3
3
  Module Name: NextMillennium Bid Adapter
4
4
  Module Type: Bidder Adapter
5
- Maintainer: mihail.ivanchenko@nextmillennium.io
5
+ Maintainer: accountmanagers@nextmillennium.io
6
6
  ```
7
7
 
8
8
  # Description
@@ -6,6 +6,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js';
6
6
  import { ajax } from '../src/ajax.js'
7
7
 
8
8
  const BIDDER_CODE = 'ogury';
9
+ const GVLID = 31;
9
10
  const DEFAULT_TIMEOUT = 1000;
10
11
  const BID_HOST = 'https://mweb-hb.presage.io/api/header-bidding-request';
11
12
  const TIMEOUT_MONITORING_HOST = 'https://ms-ads-monitoring-events.presage.io';
@@ -198,6 +199,7 @@ function onTimeout(timeoutData) {
198
199
 
199
200
  export const spec = {
200
201
  code: BIDDER_CODE,
202
+ gvlid: GVLID,
201
203
  supportedMediaTypes: [BANNER],
202
204
  isBidRequestValid,
203
205
  getUserSyncs,
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
- import {INSTREAM, OUTSTREAM} from '../src/video.js';
5
- import {Renderer} from '../src/Renderer.js';
3
+ import { BANNER, VIDEO } from '../src/mediaTypes.js';
4
+ import { INSTREAM, OUTSTREAM } from '../src/video.js';
5
+ import { Renderer } from '../src/Renderer.js';
6
6
  import {find} from '../src/polyfill.js';
7
- import {getStorageManager} from '../src/storageManager.js';
8
- import {registerBidder} from '../src/adapters/bidderFactory.js';
9
- import {createEidsArray} from './userId/eids.js';
10
- import {deepClone} from '../src/utils.js';
7
+ import { getStorageManager } from '../src/storageManager.js';
8
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
9
+ import { createEidsArray } from './userId/eids.js';
10
+ import { deepClone, logError, deepAccess } from '../src/utils.js';
11
11
 
12
12
  const ENDPOINT = 'https://onetag-sys.com/prebid-request';
13
13
  const USER_SYNC_ENDPOINT = 'https://onetag-sys.com/usync/';
@@ -68,6 +68,9 @@ function buildRequests(validBidRequests, bidderRequest) {
68
68
  if (validBidRequests && validBidRequests.length !== 0 && validBidRequests[0].userId) {
69
69
  payload.userId = createEidsArray(validBidRequests[0].userId);
70
70
  }
71
+ if (validBidRequests && validBidRequests.length !== 0 && validBidRequests[0].schain && isSchainValid(validBidRequests[0].schain)) {
72
+ payload.schain = validBidRequests[0].schain;
73
+ }
71
74
  try {
72
75
  if (storage.hasLocalStorage()) {
73
76
  payload.onetagSid = storage.getDataFromLocalStorage('onetag_sid');
@@ -245,6 +248,7 @@ function requestsToBids(bidRequests) {
245
248
  // Other params
246
249
  videoObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.video);
247
250
  videoObj['type'] = VIDEO;
251
+ videoObj['priceFloors'] = getBidFloor(bidRequest, VIDEO, videoObj['playerSize']);
248
252
  return videoObj;
249
253
  });
250
254
  const bannerBidRequests = bidRequests.filter(bidRequest => isValid(BANNER, bidRequest)).map(bidRequest => {
@@ -253,6 +257,7 @@ function requestsToBids(bidRequests) {
253
257
  bannerObj['sizes'] = parseSizes(bidRequest);
254
258
  bannerObj['type'] = BANNER;
255
259
  bannerObj['mediaTypeInfo'] = deepClone(bidRequest.mediaTypes.banner);
260
+ bannerObj['priceFloors'] = getBidFloor(bidRequest, BANNER, bannerObj['sizes']);
256
261
  return bannerObj;
257
262
  });
258
263
  return videoBidRequests.concat(bannerBidRequests);
@@ -265,6 +270,7 @@ function setGeneralInfo(bidRequest) {
265
270
  this['bidderRequestId'] = bidRequest.bidderRequestId;
266
271
  this['auctionId'] = bidRequest.auctionId;
267
272
  this['transactionId'] = bidRequest.transactionId;
273
+ this['gpid'] = deepAccess(bidRequest, 'ortb2Imp.ext.gpid') || deepAccess(bidRequest, 'ortb2Imp.ext.data.pbadslot');
268
274
  this['pubId'] = params.pubId;
269
275
  this['ext'] = params.ext;
270
276
  if (params.pubClick) {
@@ -373,6 +379,37 @@ function getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent) {
373
379
  return syncs;
374
380
  }
375
381
 
382
+ function getBidFloor(bidRequest, mediaType, sizes) {
383
+ const priceFloors = [];
384
+ if (typeof bidRequest.getFloor === 'function') {
385
+ sizes.forEach(size => {
386
+ const floor = bidRequest.getFloor({
387
+ currency: 'EUR',
388
+ mediaType: mediaType || '*',
389
+ size: [size.width, size.height]
390
+ });
391
+ floor.size = deepClone(size);
392
+ if (!floor.floor) { floor.floor = null; }
393
+ priceFloors.push(floor);
394
+ });
395
+ }
396
+ return priceFloors;
397
+ }
398
+
399
+ export function isSchainValid(schain) {
400
+ let isValid = false;
401
+ const requiredFields = ['asi', 'sid', 'hp'];
402
+ if (!schain || !schain.nodes) return isValid;
403
+ isValid = schain.nodes.reduce((status, node) => {
404
+ if (!status) return status;
405
+ return requiredFields.every(field => node.hasOwnProperty(field));
406
+ }, true);
407
+ if (!isValid) {
408
+ logError('OneTag: required schain params missing');
409
+ }
410
+ return isValid;
411
+ }
412
+
376
413
  export const spec = {
377
414
  code: BIDDER_CODE,
378
415
  gvlid: GVLID,
@@ -984,6 +984,13 @@ Object.assign(ORTB2.prototype, {
984
984
  });
985
985
  bidObject.requestTimestamp = this.requestTimestamp;
986
986
  bidObject.cpm = cpm;
987
+ if (bid?.ext?.prebid?.meta?.adaptercode) {
988
+ bidObject.adapterCode = bid.ext.prebid.meta.adaptercode;
989
+ } else if (bidRequest?.bidder) {
990
+ bidObject.adapterCode = bidRequest.bidder;
991
+ } else {
992
+ bidObject.adapterCode = seatbid.seat;
993
+ }
987
994
 
988
995
  // temporarily leaving attaching it to each bidResponse so no breaking change
989
996
  // BUT: this is a flat map, so it should be only attached to bidderRequest, a the change above does
@@ -751,7 +751,7 @@ export function addBidResponseHook(fn, adUnitCode, bid) {
751
751
  flooredBid.status = CONSTANTS.BID_STATUS.BID_REJECTED;
752
752
  // if floor not met update bid with 0 cpm so it is not included downstream and marked as no-bid
753
753
  flooredBid.cpm = 0;
754
- logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met`, bid);
754
+ logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met (adjusted cpm: ${bid?.floorData?.cpmAfterAdjustments}, floor: ${floorInfo?.matchingFloor})`, bid);
755
755
  return fn.call(this, adUnitCode, flooredBid);
756
756
  }
757
757
  return fn.call(this, adUnitCode, bid);
@@ -9,8 +9,7 @@ import * as events from '../src/events.js';
9
9
  import CONSTANTS from '../src/constants.json';
10
10
  import { getStorageManager } from '../src/storageManager.js';
11
11
 
12
- const MODULE_TYPE = 'fpid-module';
13
- const storage = getStorageManager({moduleType: MODULE_TYPE});
12
+ const storage = getStorageManager();
14
13
 
15
14
  const ID_NAME = '_pubcid';
16
15
  const OPTOUT_NAME = '_pubcid_optout';
@@ -91,7 +91,12 @@ function mapBidResponse(bidResponse, status) {
91
91
  } else {
92
92
  Object.assign(bid, {
93
93
  bidId: bidResponse.requestId,
94
- floorProvider: events.floorDetail ? events.floorDetail.floorProvider : null,
94
+ floorProvider: events.floorDetail?.floorProvider || null,
95
+ floorFetchStatus: events.floorDetail?.fetchStatus || null,
96
+ floorLocation: events.floorDetail?.location || null,
97
+ floorModelVersion: events.floorDetail?.modelVersion || null,
98
+ floorSkipRate: events.floorDetail?.skipRate || 0,
99
+ isFloorSkipped: events.floorDetail?.skipped || false,
95
100
  isWinningBid: true,
96
101
  placementId: bidResponse.params ? deepAccess(bidResponse, 'params.0.placementId') : null,
97
102
  renderedSize: bidResponse.size,
@@ -0,0 +1,149 @@
1
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
2
+ import { BANNER } from '../src/mediaTypes.js';
3
+ import { isEmpty, getAdUnitSizes, parseSizesInput, deepAccess } from '../src/utils.js';
4
+
5
+ const BIDDER_CODE = 'ras';
6
+ const VERSION = '1.0';
7
+
8
+ const getEndpoint = (network) => `https://csr.onet.pl/${encodeURIComponent(network)}/csr-006/csr.json?`;
9
+
10
+ function parseParams(params, bidderRequest) {
11
+ const newParams = {};
12
+ const du = deepAccess(bidderRequest, 'refererInfo.page');
13
+ const dr = deepAccess(bidderRequest, 'refererInfo.ref');
14
+
15
+ if (du) {
16
+ newParams.du = du;
17
+ }
18
+ if (dr) {
19
+ newParams.dr = dr;
20
+ }
21
+ const pageContext = params.pageContext;
22
+ if (!pageContext) {
23
+ return newParams;
24
+ }
25
+ if (pageContext.du) {
26
+ newParams.du = pageContext.du;
27
+ }
28
+ if (pageContext.dr) {
29
+ newParams.dr = pageContext.dr;
30
+ }
31
+ if (pageContext.dv) {
32
+ newParams.DV = pageContext.dv;
33
+ }
34
+ if (pageContext.keyWords && Array.isArray(pageContext.keyWords)) {
35
+ newParams.kwrd = pageContext.keyWords.join('+');
36
+ }
37
+ if (pageContext.capping) {
38
+ newParams.local_capping = pageContext.capping;
39
+ }
40
+ if (pageContext.keyValues && typeof pageContext.keyValues === 'object') {
41
+ for (const param in pageContext.keyValues) {
42
+ if (pageContext.keyValues.hasOwnProperty(param)) {
43
+ const kvName = 'kv' + param;
44
+ newParams[kvName] = pageContext.keyValues[param];
45
+ }
46
+ }
47
+ }
48
+ return newParams;
49
+ }
50
+
51
+ const buildBid = (ad) => {
52
+ if (ad.type === 'empty') {
53
+ return null;
54
+ }
55
+ return {
56
+ requestId: ad.id,
57
+ cpm: ad.bid_rate ? ad.bid_rate.toFixed(2) : 0,
58
+ width: ad.width || 0,
59
+ height: ad.height || 0,
60
+ ttl: 300,
61
+ creativeId: ad.adid ? parseInt(ad.adid.split(',')[2], 10) : 0,
62
+ netRevenue: true,
63
+ currency: ad.currency || 'USD',
64
+ dealId: null,
65
+ meta: {
66
+ mediaType: BANNER
67
+ },
68
+ ad: ad.html || null
69
+ };
70
+ };
71
+
72
+ const getContextParams = (bidRequests, bidderRequest) => {
73
+ const bid = bidRequests[0];
74
+ const { params } = bid;
75
+ const requestParams = {
76
+ site: params.site,
77
+ area: params.area,
78
+ cre_format: 'html',
79
+ systems: 'das',
80
+ kvprver: VERSION,
81
+ ems_url: 1,
82
+ bid_rate: 1,
83
+ ...parseParams(params, bidderRequest)
84
+ };
85
+ return Object.keys(requestParams).map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(requestParams[key])).join('&');
86
+ };
87
+
88
+ const getSlots = (bidRequests) => {
89
+ let queryString = '';
90
+ const batchSize = bidRequests.length;
91
+ for (let i = 0; i < batchSize; i++) {
92
+ const adunit = bidRequests[i];
93
+ const sizes = parseSizesInput(getAdUnitSizes(adunit)).join(',');
94
+ queryString += `&slot${i}=${encodeURIComponent(adunit.params.slot)}&id${i}=${encodeURIComponent(adunit.bidId)}&composition${i}=CHILD`;
95
+ if (sizes.length) {
96
+ queryString += `&iusizes${i}=${encodeURIComponent(sizes)}`;
97
+ }
98
+ }
99
+ return queryString;
100
+ };
101
+
102
+ const getGdprParams = (bidderRequest) => {
103
+ const gdprApplies = deepAccess(bidderRequest, 'gdprConsent.gdprApplies');
104
+ let consentString = deepAccess(bidderRequest, 'gdprConsent.consentString');
105
+ let queryString = '';
106
+ if (gdprApplies !== undefined) {
107
+ queryString += `&gdpr_applies=${encodeURIComponent(gdprApplies)}`;
108
+ }
109
+ if (consentString !== undefined) {
110
+ queryString += `&euconsent=${encodeURIComponent(consentString)}`;
111
+ }
112
+ return queryString;
113
+ };
114
+
115
+ export const spec = {
116
+ code: BIDDER_CODE,
117
+ supportedMediaTypes: [BANNER],
118
+
119
+ isBidRequestValid: function (bidRequest) {
120
+ if (!bidRequest || !bidRequest.params || typeof bidRequest.params !== 'object') {
121
+ return;
122
+ }
123
+ const { params } = bidRequest;
124
+ return Boolean(params.network && params.site && params.area && params.slot);
125
+ },
126
+
127
+ buildRequests: function (bidRequests, bidderRequest) {
128
+ const slotsQuery = getSlots(bidRequests);
129
+ const contextQuery = getContextParams(bidRequests, bidderRequest);
130
+ const gdprQuery = getGdprParams(bidderRequest);
131
+ const bidIds = bidRequests.map((bid) => ({ slot: bid.params.slot, bidId: bid.bidId }));
132
+ const network = bidRequests[0].params.network;
133
+ return [{
134
+ method: 'GET',
135
+ url: getEndpoint(network) + contextQuery + slotsQuery + gdprQuery,
136
+ bidIds: bidIds
137
+ }];
138
+ },
139
+
140
+ interpretResponse: function (serverResponse, bidRequest) {
141
+ const response = serverResponse.body;
142
+ if (!response || !response.ads || response.ads.length === 0) {
143
+ return [];
144
+ }
145
+ return response.ads.map(buildBid).filter((bid) => !isEmpty(bid));
146
+ }
147
+ };
148
+
149
+ registerBidder(spec);
@@ -0,0 +1,50 @@
1
+ # Overview
2
+
3
+ ```
4
+ Module Name: Ringier Axel Springer Bidder Adapter
5
+ Module Type: Bidder Adapter
6
+ Maintainer: support@ringpublishing.com
7
+ ```
8
+
9
+ # Description
10
+
11
+ Module that connects to Ringer Axel Springer demand sources.
12
+ Only banner format is supported.
13
+
14
+ # Test Parameters
15
+ ```js
16
+ var adUnits = [{
17
+ code: 'test-div-ad',
18
+ mediaTypes: {
19
+ banner: {
20
+ sizes: [[300, 250], [300, 600]]
21
+ }
22
+ },
23
+ bids: [{
24
+ bidder: 'ras',
25
+ params: {
26
+ network: '4178463',
27
+ site: 'test',
28
+ area: 'areatest',
29
+ slot: 'slot'
30
+ }
31
+ }]
32
+ }];
33
+ ```
34
+
35
+ # Parameters
36
+
37
+ | Name | Scope | Type | Description | Example
38
+ | --- | --- | --- | --- | ---
39
+ | network | required | String | Specific identifier provided by RAS | `"4178463"`
40
+ | site | required | String | Specific identifier name (case-insensitive) that is associated with this ad unit and provided by RAS | `"example_com"`
41
+ | area | required | String | Ad unit category name; only case-insensitive alphanumeric with underscores and hyphens are allowed | `"sport"`
42
+ | slot | required | String | Ad unit placement name (case-insensitive) provided by RAS | `"slot"`
43
+ | pageContext | optional | Object | Web page context data | `{}`
44
+ | pageContext.dr | optional | String | Document referrer URL address | `"https://example.com/"`
45
+ | pageContext.du | optional | String | Document URL address | `"https://example.com/sport/football/article.html?id=932016a5-02fc-4d5c-b643-fafc2f270f06"`
46
+ | pageContext.dv | optional | String | Document virtual address as slash-separated path that may consist of any number of parts (case-insensitive alphanumeric with underscores and hyphens); first part should be the same as `site` value and second as `area` value; next parts may reflect website navigation | `"example_com/sport/football"`
47
+ | pageContext.keyWords | optional | String[] | List of keywords associated with this ad unit; only case-insensitive alphanumeric with underscores and hyphens are allowed | `["euro", "lewandowski"]`
48
+ | pageContext.keyValues | optional | Object | Key-values associated with this ad unit (case-insensitive); following characters are not allowed in the values: `" ' = ! + # * ~ ; ^ ( ) < > [ ] & @` | `{}`
49
+ | pageContext.keyValues.ci | optional | String | Content unique identifier | `"932016a5-02fc-4d5c-b643-fafc2f270f06"`
50
+ | pageContext.keyValues.adunit | optional | String | Ad unit name | `"example_com/sport"`
@@ -320,6 +320,11 @@ export const spec = {
320
320
  // set ext.prebid.auctiontimestamp using auction time
321
321
  deepSetValue(data.imp[0], 'ext.prebid.auctiontimestamp', bidderRequest.auctionStart);
322
322
 
323
+ // set storedrequests to undefined so not sent to PBS
324
+ // top level and imp level both 'ext.prebid' objects are set above so no exception thrown here
325
+ data.ext.prebid.storedrequest = undefined;
326
+ data.imp[0].ext.prebid.storedrequest = undefined;
327
+
323
328
  return {
324
329
  method: 'POST',
325
330
  url: `https://${rubiConf.videoHost || 'prebid-server'}.rubiconproject.com/openrtb2/auction`,
@@ -7,6 +7,7 @@ import { _map, deepSetValue, isEmpty, deepAccess } from '../src/utils.js';
7
7
  import { config } from '../src/config.js';
8
8
 
9
9
  const BIDDER_CODE = 'seedingAlliance';
10
+ const GVL_ID = 371;
10
11
  const DEFAULT_CUR = 'EUR';
11
12
  const ENDPOINT_URL = 'https://b.nativendo.de/cds/rtb/bid?format=openrtb2.5&ssp=pb';
12
13
 
@@ -52,6 +53,8 @@ const NATIVE_PARAMS = {
52
53
  export const spec = {
53
54
  code: BIDDER_CODE,
54
55
 
56
+ gvlid: GVL_ID,
57
+
55
58
  supportedMediaTypes: [NATIVE],
56
59
 
57
60
  isBidRequestValid: function(bid) {
@@ -147,6 +147,36 @@ function buildBidResponse(seedtagBid) {
147
147
  return bid;
148
148
  }
149
149
 
150
+ /**
151
+ *
152
+ * @returns Measure time to first byte implementation
153
+ * @see https://web.dev/ttfb/
154
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API
155
+ */
156
+ function ttfb() {
157
+ const ttfb = (() => {
158
+ // Timing API V2
159
+ try {
160
+ const entry = performance.getEntriesByType('navigation')[0];
161
+ return Math.round(entry.responseStart - entry.startTime);
162
+ } catch (e) {
163
+ // Timing API V1
164
+ try {
165
+ const entry = performance.timing;
166
+ return Math.round(entry.responseStart - entry.fetchStart);
167
+ } catch (e) {
168
+ // Timing API not available
169
+ return 0;
170
+ }
171
+ }
172
+ })();
173
+
174
+ // prevent negative or excessive value
175
+ // @see https://github.com/googleChrome/web-vitals/issues/162
176
+ // https://github.com/googleChrome/web-vitals/issues/137
177
+ return ttfb >= 0 && ttfb <= performance.now() ? ttfb : 0;
178
+ }
179
+
150
180
  export function getTimeoutUrl (data) {
151
181
  let queryParams = '';
152
182
  if (
@@ -195,7 +225,9 @@ export const spec = {
195
225
  timeout: bidderRequest.timeout,
196
226
  version: '$prebid.version$',
197
227
  connectionType: getConnectionType(),
198
- bidRequests: _map(validBidRequests, buildBidRequest)
228
+ auctionStart: bidderRequest.auctionStart || Date.now(),
229
+ ttfb: ttfb(),
230
+ bidRequests: _map(validBidRequests, buildBidRequest),
199
231
  };
200
232
 
201
233
  if (payload.cmp) {
@@ -204,6 +236,10 @@ export const spec = {
204
236
  payload['cd'] = bidderRequest.gdprConsent.consentString;
205
237
  }
206
238
 
239
+ if (bidderRequest.uspConsent) {
240
+ payload['uspConsent'] = bidderRequest.uspConsent
241
+ }
242
+
207
243
  const payloadString = JSON.stringify(payload)
208
244
  return {
209
245
  method: 'POST',
@@ -5,13 +5,13 @@
5
5
  * @requires module:modules/userId
6
6
  */
7
7
 
8
- import {buildUrl, generateUUID, hasDeviceAccess, logInfo, parseUrl, triggerPixel} from '../src/utils.js';
8
+ import { parseUrl, buildUrl, triggerPixel, logInfo, hasDeviceAccess, generateUUID } from '../src/utils.js';
9
9
  import {submodule} from '../src/hook.js';
10
- import {coppaDataHandler} from '../src/adapterManager.js';
10
+ import { coppaDataHandler } from '../src/adapterManager.js';
11
11
  import {getStorageManager} from '../src/storageManager.js';
12
12
 
13
- const MODULE_TYPE = 'fpid-module';
14
- export const storage = getStorageManager({moduleName: 'pubCommonId', moduleType: MODULE_TYPE});
13
+ const GVLID = 887;
14
+ export const storage = getStorageManager({gvlid: GVLID, moduleName: 'pubCommonId'});
15
15
  const COOKIE = 'cookie';
16
16
  const LOCAL_STORAGE = 'html5';
17
17
  const OPTOUT_NAME = '_pubcid_optout';
@@ -74,6 +74,11 @@ export const sharedIdSystemSubmodule = {
74
74
  */
75
75
  name: 'sharedId',
76
76
  aliasName: 'pubCommonId',
77
+ /**
78
+ * Vendor id of prebid
79
+ * @type {Number}
80
+ */
81
+ gvlid: GVLID,
77
82
 
78
83
  /**
79
84
  * decode the stored id value for passing to bid requests
@@ -88,7 +93,8 @@ export const sharedIdSystemSubmodule = {
88
93
  return undefined;
89
94
  }
90
95
  logInfo(' Decoded value PubCommonId ' + value);
91
- return {'pubcid': value};
96
+ const idObj = {'pubcid': value};
97
+ return idObj;
92
98
  },
93
99
  /**
94
100
  * performs action to obtain id
@@ -4,7 +4,7 @@ import { config } from '../src/config.js';
4
4
  import { BANNER, VIDEO } from '../src/mediaTypes.js';
5
5
  import { createEidsArray } from './userId/eids.js';
6
6
 
7
- const VERSION = '4.1.0';
7
+ const VERSION = '4.1.1';
8
8
  const BIDDER_CODE = 'sharethrough';
9
9
  const SUPPLY_ID = 'WYu2BXv1';
10
10
 
@@ -34,9 +34,8 @@ export const sharethroughAdapterSpec = {
34
34
  cur: ['USD'],
35
35
  tmax: timeout,
36
36
  site: {
37
- // TODO: do the fallbacks make sense here?
38
- domain: deepAccess(bidderRequest, 'refererInfo.domain') || window.location.hostname,
39
- page: deepAccess(bidderRequest, 'refererInfo.page') || window.location.href,
37
+ domain: deepAccess(bidderRequest, 'refererInfo.domain', window.location.hostname),
38
+ page: deepAccess(bidderRequest, 'refererInfo.page', window.location.href),
40
39
  ref: deepAccess(bidderRequest, 'refererInfo.ref'),
41
40
  ...firstPartyData.site,
42
41
  },
@@ -66,7 +65,7 @@ export const sharethroughAdapterSpec = {
66
65
 
67
66
  req.user = nullish(firstPartyData.user, {});
68
67
  if (!req.user.ext) req.user.ext = {};
69
- req.user.ext.eids = userIdAsEids(bidRequests[0]);
68
+ req.user.ext.eids = createEidsArray(deepAccess(bidRequests[0], 'userId')) || [];
70
69
 
71
70
  if (bidderRequest.gdprConsent) {
72
71
  const gdprApplies = bidderRequest.gdprConsent.gdprApplies === true;
@@ -181,21 +180,12 @@ export const sharethroughAdapterSpec = {
181
180
  });
182
181
  },
183
182
 
184
- getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
185
- const syncParams = uspConsent ? `&us_privacy=${uspConsent}` : '';
186
- const syncs = [];
187
- const shouldCookieSync = syncOptions.pixelEnabled &&
188
- serverResponses.length > 0 &&
189
- serverResponses[0].body &&
190
- serverResponses[0].body.cookieSyncUrls;
191
-
192
- if (shouldCookieSync) {
193
- serverResponses[0].body.cookieSyncUrls.forEach(url => {
194
- syncs.push({ type: 'image', url: url + syncParams });
195
- });
196
- }
183
+ getUserSyncs: (syncOptions, serverResponses) => {
184
+ const shouldCookieSync = syncOptions.pixelEnabled && deepAccess(serverResponses, '0.body.cookieSyncUrls') !== undefined;
197
185
 
198
- return syncs;
186
+ return shouldCookieSync
187
+ ? serverResponses[0].body.cookieSyncUrls.map(url => ({ type: 'image', url: url }))
188
+ : [];
199
189
  },
200
190
 
201
191
  // Empty implementation for prebid core to be able to find it
@@ -244,11 +234,6 @@ function getBidRequestFloor(bid) {
244
234
  return floor !== null ? floor : bid.params.floor;
245
235
  }
246
236
 
247
- function userIdAsEids(bidRequest) {
248
- const eids = createEidsArray(deepAccess(bidRequest, 'userId')) || [];
249
- return eids;
250
- }
251
-
252
237
  function getProtocol() {
253
238
  return window.location.protocol;
254
239
  }
@@ -233,7 +233,7 @@ function getBid(requestId, currency, bidResponse) {
233
233
 
234
234
  return {
235
235
  requestId,
236
- ttl: 360,
236
+ ttl: 60,
237
237
  mediaType: BANNER,
238
238
  cpm,
239
239
  creativeId,
@@ -40,10 +40,10 @@ The Taboola Bidding adapter requires setup before beginning. Please contact us o
40
40
 
41
41
  | Name | Scope | Description | Example | Type |
42
42
  |----------------|----------|---------------------------------------------------------|----------------------------|--------------|
43
- | `tagId` | required | Tag ID / Placement Name <br>(as provided by Taboola) | `'Below The Article'` | `String` |
44
- | `publisherId` | required | Alphabetic Publisher ID <br>(as provided by Taboola) | `'acme-publishing'` | `String` |
43
+ | `tagId` | required | Tag ID / Placement Name <br> | `'Below The Article'` | `String` |
44
+ | `publisherId` | required | Numeric Publisher ID <br>(as provided by Taboola) | `'1234567'` | `String` |
45
45
  | `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `Array` |
46
46
  | `badv` | optional | Blocked Advertiser Domains | `'example.com'` | `String Url` |
47
- | `bidfloor` | optional | CPM bid floor | `0.25` | `Integer` |
47
+ | `bidfloor` | optional | CPM bid floor | `0.25` | `Float` |
48
48
 
49
49
 
@@ -42,6 +42,24 @@ export const spec = {
42
42
  },
43
43
  schain: schain
44
44
  };
45
+
46
+ if (bidderRequest && bidderRequest.gdprConsent) {
47
+ payload.gdpr_consent = {
48
+ consent_string: bidderRequest.gdprConsent.consentString,
49
+ consent_required: bidderRequest.gdprConsent.gdprApplies
50
+ };
51
+
52
+ if (bidderRequest.gdprConsent.addtlConsent && bidderRequest.gdprConsent.addtlConsent.indexOf('~') !== -1) {
53
+ let ac = bidderRequest.gdprConsent.addtlConsent;
54
+ let acStr = ac.substring(ac.indexOf('~') + 1);
55
+ payload.gdpr_consent.addtl_consent = acStr.split('.').map(id => parseInt(id, 10));
56
+ }
57
+ }
58
+
59
+ if (bidderRequest && bidderRequest.uspConsent) {
60
+ payload.us_privacy = bidderRequest.uspConsent
61
+ }
62
+
45
63
  return formatRequest(payload, bidderRequest);
46
64
  },
47
65