prebid.js 9.5.0 → 9.6.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 (197) hide show
  1. package/dist/33acrossAnalyticsAdapter.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/BTBidAdapter.js +1 -1
  5. package/dist/adagioAnalyticsAdapter.js +1 -1
  6. package/dist/adagioBidAdapter.js +1 -1
  7. package/dist/adagioUtils.js +1 -1
  8. package/dist/addefendBidAdapter.js +1 -1
  9. package/dist/adgenerationBidAdapter.js +1 -1
  10. package/dist/adkernelBidAdapter.js +1 -1
  11. package/dist/adlooxRtdProvider.js +1 -1
  12. package/dist/adqueryBidAdapter.js +1 -1
  13. package/dist/adrelevantisBidAdapter.js +1 -1
  14. package/dist/adstirBidAdapter.js +1 -1
  15. package/dist/adtrgtmeBidAdapter.js +1 -1
  16. package/dist/adxcgAnalyticsAdapter.js +1 -1
  17. package/dist/adxcgBidAdapter.js +1 -1
  18. package/dist/adyoulikeBidAdapter.js +1 -1
  19. package/dist/agmaAnalyticsAdapter.js +1 -1
  20. package/dist/aidemBidAdapter.js +1 -1
  21. package/dist/ajaBidAdapter.js +1 -1
  22. package/dist/amxBidAdapter.js +1 -1
  23. package/dist/amxIdSystem.js +1 -1
  24. package/dist/appierAnalyticsAdapter.js +1 -1
  25. package/dist/appnexusBidAdapter.js +1 -1
  26. package/dist/asoBidAdapter.js +1 -1
  27. package/dist/axonixBidAdapter.js +1 -1
  28. package/dist/bidglassBidAdapter.js +1 -1
  29. package/dist/big-richmediaBidAdapter.js +1 -1
  30. package/dist/bridBidAdapter.js +1 -1
  31. package/dist/bridgewellBidAdapter.js +1 -1
  32. package/dist/brightMountainMediaBidAdapter.js +1 -1
  33. package/dist/carodaBidAdapter.js +1 -1
  34. package/dist/chtnwBidAdapter.js +1 -1
  35. package/dist/chunk-core.js +1 -1
  36. package/dist/concertBidAdapter.js +1 -1
  37. package/dist/connectIdSystem.js +1 -1
  38. package/dist/connectadBidAdapter.js +1 -1
  39. package/dist/consumableBidAdapter.js +1 -1
  40. package/dist/conversantAnalyticsAdapter.js +1 -1
  41. package/dist/conversantBidAdapter.js +1 -1
  42. package/dist/craftBidAdapter.js +1 -1
  43. package/dist/criteoBidAdapter.js +1 -1
  44. package/dist/cwireBidAdapter.js +1 -1
  45. package/dist/dailymotionBidAdapter.js +1 -1
  46. package/dist/dependencies.json +26 -1
  47. package/dist/dspxBidAdapter.js +1 -1
  48. package/dist/dxkultureBidAdapter.js +1 -1
  49. package/dist/eplanningBidAdapter.js +1 -1
  50. package/dist/euidIdSystem.js +1 -1
  51. package/dist/exadsBidAdapter.js +1 -1
  52. package/dist/feedadBidAdapter.js +1 -1
  53. package/dist/finativeBidAdapter.js +1 -1
  54. package/dist/freewheel-sspBidAdapter.js +1 -1
  55. package/dist/gmosspBidAdapter.js +1 -1
  56. package/dist/goldbachBidAdapter.js +1 -1
  57. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  58. package/dist/greenbidsRtdProvider.js +1 -1
  59. package/dist/gridBidAdapter.js +1 -1
  60. package/dist/gumgumBidAdapter.js +1 -1
  61. package/dist/h12mediaBidAdapter.js +1 -1
  62. package/dist/hypelabBidAdapter.js +1 -1
  63. package/dist/id5AnalyticsAdapter.js +1 -1
  64. package/dist/id5IdSystem.js +1 -1
  65. package/dist/imdsBidAdapter.js +1 -1
  66. package/dist/improvedigitalBidAdapter.js +1 -1
  67. package/dist/insticatorBidAdapter.js +1 -1
  68. package/dist/intentIqAnalyticsAdapter.js +1 -1
  69. package/dist/ixBidAdapter.js +1 -1
  70. package/dist/jixieBidAdapter.js +1 -1
  71. package/dist/justpremiumBidAdapter.js +1 -1
  72. package/dist/kargoBidAdapter.js +1 -1
  73. package/dist/kimberliteBidAdapter.js +1 -1
  74. package/dist/konduitAnalyticsAdapter.js +1 -1
  75. package/dist/kueezBidAdapter.js +1 -1
  76. package/dist/lassoBidAdapter.js +1 -1
  77. package/dist/lifestreetBidAdapter.js +1 -1
  78. package/dist/liveIntentIdSystem.js +1 -1
  79. package/dist/logicadBidAdapter.js +1 -1
  80. package/dist/loglyliftBidAdapter.js +1 -1
  81. package/dist/luceadBidAdapter.js +1 -1
  82. package/dist/mabidderBidAdapter.js +1 -1
  83. package/dist/magniteAnalyticsAdapter.js +1 -1
  84. package/dist/malltvAnalyticsAdapter.js +1 -1
  85. package/dist/marsmediaBidAdapter.js +1 -1
  86. package/dist/mediafuseBidAdapter.js +1 -1
  87. package/dist/medianetAnalyticsAdapter.js +1 -1
  88. package/dist/medianetBidAdapter.js +1 -1
  89. package/dist/mediasquareBidAdapter.js +1 -1
  90. package/dist/mgidBidAdapter.js +1 -1
  91. package/dist/minutemediaBidAdapter.js +1 -1
  92. package/dist/missenaBidAdapter.js +1 -1
  93. package/dist/nexx360BidAdapter.js +1 -1
  94. package/dist/nobidAnalyticsAdapter.js +1 -1
  95. package/dist/nobidBidAdapter.js +1 -1
  96. package/dist/not-for-prod/prebid.js +163 -162
  97. package/dist/oguryBidAdapter.js +1 -1
  98. package/dist/onetagBidAdapter.js +1 -1
  99. package/dist/ooloAnalyticsAdapter.js +1 -1
  100. package/dist/openwebBidAdapter.js +1 -1
  101. package/dist/openxBidAdapter.js +1 -1
  102. package/dist/optidigitalBidAdapter.js +1 -1
  103. package/dist/orbidderBidAdapter.js +1 -1
  104. package/dist/outbrainBidAdapter.js +1 -1
  105. package/dist/pixfutureBidAdapter.js +1 -1
  106. package/dist/publinkIdSystem.js +1 -1
  107. package/dist/publirBidAdapter.js +1 -1
  108. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  109. package/dist/pubmaticBidAdapter.js +1 -1
  110. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  111. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  112. package/dist/pxyzBidAdapter.js +1 -1
  113. package/dist/quantcastBidAdapter.js +1 -1
  114. package/dist/readpeakBidAdapter.js +1 -1
  115. package/dist/relaidoBidAdapter.js +1 -1
  116. package/dist/retailspotBidAdapter.js +1 -1
  117. package/dist/rhythmoneBidAdapter.js +1 -1
  118. package/dist/riseBidAdapter.js +1 -1
  119. package/dist/riseUtils.js +1 -0
  120. package/dist/rubiconBidAdapter.js +1 -1
  121. package/dist/seedingAllianceBidAdapter.js +1 -1
  122. package/dist/seedtagBidAdapter.js +1 -1
  123. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  124. package/dist/sharethroughBidAdapter.js +1 -1
  125. package/dist/shinezBidAdapter.js +1 -1
  126. package/dist/smaatoBidAdapter.js +1 -1
  127. package/dist/smartadserverBidAdapter.js +1 -1
  128. package/dist/smarthubBidAdapter.js +1 -1
  129. package/dist/smartxBidAdapter.js +1 -1
  130. package/dist/smilewantedBidAdapter.js +1 -1
  131. package/dist/snigelBidAdapter.js +1 -1
  132. package/dist/sonobiBidAdapter.js +1 -1
  133. package/dist/sovrnBidAdapter.js +1 -1
  134. package/dist/sspBCBidAdapter.js +1 -1
  135. package/dist/stnBidAdapter.js +1 -1
  136. package/dist/stvBidAdapter.js +1 -1
  137. package/dist/sublimeBidAdapter.js +1 -1
  138. package/dist/taboolaBidAdapter.js +1 -1
  139. package/dist/tappxBidAdapter.js +1 -1
  140. package/dist/targetVideoBidAdapter.js +1 -1
  141. package/dist/teadsBidAdapter.js +1 -1
  142. package/dist/telariaBidAdapter.js +1 -1
  143. package/dist/teqblazeUtils.js +1 -1
  144. package/dist/terceptAnalyticsAdapter.js +1 -1
  145. package/dist/themoneytizerBidAdapter.js +1 -1
  146. package/dist/trionBidAdapter.js +1 -1
  147. package/dist/tripleliftBidAdapter.js +1 -1
  148. package/dist/ttdBidAdapter.js +1 -1
  149. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  150. package/dist/uid2IdSystem.js +1 -1
  151. package/dist/uid2IdSystem_shared.js +1 -1
  152. package/dist/underdogmediaBidAdapter.js +1 -1
  153. package/dist/undertoneBidAdapter.js +1 -1
  154. package/dist/unrulyBidAdapter.js +1 -1
  155. package/dist/vidazooUtils.js +1 -1
  156. package/dist/videobyteBidAdapter.js +1 -1
  157. package/dist/visxBidAdapter.js +1 -1
  158. package/dist/vuukleBidAdapter.js +1 -1
  159. package/dist/widespaceBidAdapter.js +1 -1
  160. package/dist/winrBidAdapter.js +1 -1
  161. package/dist/yahooAdsBidAdapter.js +1 -1
  162. package/dist/yieldmoBidAdapter.js +1 -1
  163. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  164. package/libraries/riseUtils/index.js +330 -0
  165. package/libraries/teqblazeUtils/bidderUtils.js +15 -11
  166. package/modules/adagioAnalyticsAdapter.js +101 -84
  167. package/modules/adagioAnalyticsAdapter.md +4 -0
  168. package/modules/adagioBidAdapter.js +4 -16
  169. package/modules/adkernelBidAdapter.js +2 -2
  170. package/modules/aidemBidAdapter.js +2 -0
  171. package/modules/connectIdSystem.js +5 -3
  172. package/modules/insticatorBidAdapter.js +35 -31
  173. package/modules/kargoBidAdapter.js +11 -14
  174. package/modules/kimberliteBidAdapter.js +24 -7
  175. package/modules/kimberliteBidAdapter.md +30 -1
  176. package/modules/minutemediaBidAdapter.js +21 -398
  177. package/modules/nexx360BidAdapter.js +3 -2
  178. package/modules/openwebBidAdapter.js +18 -396
  179. package/modules/publirBidAdapter.js +20 -273
  180. package/modules/resetdigitalBidAdapter.md +54 -45
  181. package/modules/riseBidAdapter.js +19 -400
  182. package/modules/shinezBidAdapter.js +17 -361
  183. package/modules/smarthubBidAdapter.js +45 -177
  184. package/modules/stnBidAdapter.js +22 -398
  185. package/modules/telariaBidAdapter.js +2 -32
  186. package/modules/uid2IdSystem_shared.js +51 -39
  187. package/package.json +1 -1
  188. package/src/prebid.js +4 -0
  189. package/test/spec/modules/adagioAnalyticsAdapter_spec.js +231 -141
  190. package/test/spec/modules/adagioBidAdapter_spec.js +32 -66
  191. package/test/spec/modules/connectIdSystem_spec.js +27 -28
  192. package/test/spec/modules/insticatorBidAdapter_spec.js +8 -1
  193. package/test/spec/modules/kargoBidAdapter_spec.js +7 -8
  194. package/test/spec/modules/kimberliteBidAdapter_spec.js +137 -65
  195. package/test/spec/modules/nexx360BidAdapter_spec.js +1 -1
  196. package/test/spec/modules/smarthubBidAdapter_spec.js +6 -4
  197. package/test/spec/unit/pbjs_api_spec.js +11 -0
@@ -20,11 +20,11 @@ import {
20
20
  import { getRefererInfo, parseDomain } from '../src/refererDetection.js';
21
21
  import { OUTSTREAM } from '../src/video.js';
22
22
  import { Renderer } from '../src/Renderer.js';
23
+ import { _ADAGIO } from '../libraries/adagioUtils/adagioUtils.js';
23
24
  import { config } from '../src/config.js';
24
25
  import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
25
26
  import { find } from '../src/polyfill.js';
26
27
  import { getGptSlotInfoForAdUnitCode } from '../libraries/gptUtils/gptUtils.js';
27
- import { _ADAGIO } from '../libraries/adagioUtils/adagioUtils.js';
28
28
  import { registerBidder } from '../src/adapters/bidderFactory.js';
29
29
  import { userSync } from '../src/userSync.js';
30
30
 
@@ -176,17 +176,6 @@ function _getUspConsent(bidderRequest) {
176
176
  return (deepAccess(bidderRequest, 'uspConsent')) ? { uspConsent: bidderRequest.uspConsent } : false;
177
177
  }
178
178
 
179
- function _getGppConsent(bidderRequest) {
180
- let gpp = deepAccess(bidderRequest, 'gppConsent.gppString')
181
- let gppSid = deepAccess(bidderRequest, 'gppConsent.applicableSections')
182
-
183
- if (!gpp || !gppSid) {
184
- gpp = deepAccess(bidderRequest, 'ortb2.regs.gpp', '')
185
- gppSid = deepAccess(bidderRequest, 'ortb2.regs.gpp_sid', [])
186
- }
187
- return { gpp, gppSid }
188
- }
189
-
190
179
  function _getSchain(bidRequest) {
191
180
  return deepAccess(bidRequest, 'schain');
192
181
  }
@@ -559,7 +548,7 @@ export const spec = {
559
548
  const gdprConsent = _getGdprConsent(bidderRequest) || {};
560
549
  const uspConsent = _getUspConsent(bidderRequest) || {};
561
550
  const coppa = _getCoppa();
562
- const gppConsent = _getGppConsent(bidderRequest)
551
+ const { gpp, gpp_sid: gppSid } = deepAccess(bidderRequest, 'ortb2.regs', {});
563
552
  const schain = _getSchain(validBidRequests[0]);
564
553
  const eids = _getEids(validBidRequests[0]) || [];
565
554
  const syncEnabled = deepAccess(config.getConfig('userSync'), 'syncEnabled')
@@ -724,7 +713,6 @@ export const spec = {
724
713
  // Those params are not sent to the server.
725
714
  // They are used for further operations on analytics adapter.
726
715
  validBidRequests.forEach(rawBidRequest => {
727
- rawBidRequest.params.adagioAuctionId = aucId
728
716
  rawBidRequest.params.pageviewId = pageviewId
729
717
  });
730
718
 
@@ -748,8 +736,8 @@ export const spec = {
748
736
  gdpr: gdprConsent,
749
737
  coppa: coppa,
750
738
  ccpa: uspConsent,
751
- gpp: gppConsent.gpp,
752
- gppSid: gppConsent.gppSid,
739
+ gpp: gpp || '',
740
+ gppSid: gppSid || [],
753
741
  dsa: dsa // populated if exists
754
742
  },
755
743
  schain: schain,
@@ -97,8 +97,8 @@ export const spec = {
97
97
  {code: 'digiad'},
98
98
  {code: 'monetix'},
99
99
  {code: 'hyperbrainz'},
100
- {code: 'globalsun'},
101
- {code: 'voisetech'}
100
+ {code: 'voisetech'},
101
+ {code: 'global_sun'}
102
102
  ],
103
103
  supportedMediaTypes: [BANNER, VIDEO, NATIVE],
104
104
 
@@ -10,6 +10,7 @@ const BIDDER_CODE = 'aidem';
10
10
  const BASE_URL = 'https://zero.aidemsrv.com';
11
11
  const LOCAL_BASE_URL = 'http://127.0.0.1:8787';
12
12
 
13
+ const GVLID = 1218
13
14
  const SUPPORTED_MEDIA_TYPES = [BANNER, VIDEO];
14
15
  const REQUIRED_VIDEO_PARAMS = [ 'mimes', 'protocols', 'context' ];
15
16
 
@@ -232,6 +233,7 @@ function hasValidParameters(bidRequest) {
232
233
 
233
234
  export const spec = {
234
235
  code: BIDDER_CODE,
236
+ gvlid: GVLID,
235
237
  supportedMediaTypes: SUPPORTED_MEDIA_TYPES,
236
238
  isBidRequestValid: function(bidRequest) {
237
239
  logInfo('bid: ', bidRequest);
@@ -318,9 +318,11 @@ export const connectIdSubmodule = {
318
318
  */
319
319
  userHasOptedOut() {
320
320
  try {
321
- // TODO FIX THIS RULES VIOLATION
322
- // eslint-disable-next-line
323
- return localStorage.getItem(OVERRIDE_OPT_OUT_KEY) === '1';
321
+ if (storage.localStorageIsEnabled()) {
322
+ return storage.getDataFromLocalStorage(OVERRIDE_OPT_OUT_KEY) === '1';
323
+ } else {
324
+ return true;
325
+ }
324
326
  } catch {
325
327
  return false;
326
328
  }
@@ -107,19 +107,8 @@ function buildVideo(bidRequest) {
107
107
  const playerSize = deepAccess(bidRequest, 'mediaTypes.video.playerSize');
108
108
  const context = deepAccess(bidRequest, 'mediaTypes.video.context');
109
109
 
110
- if (!w && playerSize) {
111
- if (Array.isArray(playerSize[0])) {
112
- w = parseInt(playerSize[0][0], 10);
113
- } else if (typeof playerSize[0] === 'number' && !isNaN(playerSize[0])) {
114
- w = parseInt(playerSize[0], 10);
115
- }
116
- }
117
- if (!h && playerSize) {
118
- if (Array.isArray(playerSize[0])) {
119
- h = parseInt(playerSize[0][1], 10);
120
- } else if (typeof playerSize[1] === 'number' && !isNaN(playerSize[1])) {
121
- h = parseInt(playerSize[1], 10);
122
- }
110
+ if (!h && !w && playerSize) {
111
+ ({w, h} = parsePlayerSizeToWidthHeight(playerSize, w, h));
123
112
  }
124
113
 
125
114
  const bidRequestVideo = deepAccess(bidRequest, 'mediaTypes.video');
@@ -173,6 +162,14 @@ function buildImpression(bidRequest) {
173
162
  },
174
163
  }
175
164
 
165
+ if (bidRequest?.params?.adUnitId) {
166
+ deepSetValue(imp, 'ext.prebid.bidder.insticator.adUnitId', bidRequest.params.adUnitId);
167
+ }
168
+
169
+ if (bidRequest?.params?.publisherId) {
170
+ deepSetValue(imp, 'ext.prebid.bidder.insticator.publisherId', bidRequest.params.publisherId);
171
+ }
172
+
176
173
  let bidFloor = parseFloat(deepAccess(bidRequest, 'params.floor'));
177
174
 
178
175
  if (!isNaN(bidFloor)) {
@@ -247,7 +244,7 @@ function buildDevice(bidRequest) {
247
244
  const device = {
248
245
  w: window.innerWidth,
249
246
  h: window.innerHeight,
250
- js: true,
247
+ js: 1,
251
248
  ext: {
252
249
  localStorage: storage.localStorageIsEnabled(),
253
250
  cookies: storage.cookiesAreEnabled(),
@@ -569,24 +566,12 @@ function validateVideo(bid) {
569
566
  let w = deepAccess(bid, 'mediaTypes.video.w');
570
567
  let h = deepAccess(bid, 'mediaTypes.video.h');
571
568
  const playerSize = deepAccess(bid, 'mediaTypes.video.playerSize');
572
- if (!w && playerSize) {
573
- if (Array.isArray(playerSize[0])) {
574
- w = parseInt(playerSize[0][0], 10);
575
- } else if (typeof playerSize[0] === 'number' && !isNaN(playerSize[0])) {
576
- w = parseInt(playerSize[0], 10);
577
- }
578
- }
579
- if (!h && playerSize) {
580
- if (Array.isArray(playerSize[0])) {
581
- h = parseInt(playerSize[0][1], 10);
582
- } else if (typeof playerSize[1] === 'number' && !isNaN(playerSize[1])) {
583
- h = parseInt(playerSize[1], 10);
584
- }
569
+
570
+ if (!h && !w && playerSize) {
571
+ ({w, h} = parsePlayerSizeToWidthHeight(playerSize, w, h));
585
572
  }
586
- const videoSize = [
587
- w,
588
- h,
589
- ];
573
+
574
+ const videoSize = [w, h];
590
575
 
591
576
  if (
592
577
  !validateSize(videoSize)
@@ -625,6 +610,25 @@ function validateVideo(bid) {
625
610
  return true;
626
611
  }
627
612
 
613
+ function parsePlayerSizeToWidthHeight(playerSize, w, h) {
614
+ if (!w && playerSize) {
615
+ if (Array.isArray(playerSize[0])) {
616
+ w = parseInt(playerSize[0][0], 10);
617
+ } else if (typeof playerSize[0] === 'number' && !isNaN(playerSize[0])) {
618
+ w = parseInt(playerSize[0], 10);
619
+ }
620
+ }
621
+ if (!h && playerSize) {
622
+ if (Array.isArray(playerSize[0])) {
623
+ h = parseInt(playerSize[0][1], 10);
624
+ } else if (typeof playerSize[1] === 'number' && !isNaN(playerSize[1])) {
625
+ h = parseInt(playerSize[1], 10);
626
+ }
627
+ }
628
+
629
+ return { w, h };
630
+ }
631
+
628
632
  export const spec = {
629
633
  code: BIDDER_CODE,
630
634
  gvlid: GVLID,
@@ -48,7 +48,7 @@ const SUA_ATTRIBUTES = [
48
48
 
49
49
  const CERBERUS = Object.freeze({
50
50
  KEY: 'krg_crb',
51
- SYNC_URL: 'https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&idx={INDEX}&gdpr={GDPR}&gdpr_consent={GDPR_CONSENT}&us_privacy={US_PRIVACY}&gpp={GPP_STRING}&gpp_sid={GPP_SID}',
51
+ SYNC_URL: 'https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&gdpr={GDPR}&gdpr_consent={GDPR_CONSENT}&us_privacy={US_PRIVACY}&gpp={GPP_STRING}&gpp_sid={GPP_SID}',
52
52
  SYNC_COUNT: 5,
53
53
  PAGE_VIEW_ID: 'pageViewId',
54
54
  PAGE_VIEW_TIMESTAMP: 'pageViewTimestamp',
@@ -274,19 +274,16 @@ function getUserSyncs(syncOptions, _, gdprConsent, usPrivacy, gppConsent) {
274
274
  return syncs;
275
275
  }
276
276
  if (syncOptions.iframeEnabled && seed && clientId) {
277
- for (let i = 0; i < CERBERUS.SYNC_COUNT; i++) {
278
- syncs.push({
279
- type: 'iframe',
280
- url: CERBERUS.SYNC_URL.replace('{UUID}', clientId)
281
- .replace('{SEED}', seed)
282
- .replace('{INDEX}', i)
283
- .replace('{GDPR}', gdpr)
284
- .replace('{GDPR_CONSENT}', gdprConsentString)
285
- .replace('{US_PRIVACY}', usPrivacy || '')
286
- .replace('{GPP_STRING}', gppString)
287
- .replace('{GPP_SID}', gppApplicableSections)
288
- });
289
- }
277
+ syncs.push({
278
+ type: 'iframe',
279
+ url: CERBERUS.SYNC_URL.replace('{UUID}', clientId)
280
+ .replace('{SEED}', seed)
281
+ .replace('{GDPR}', gdpr)
282
+ .replace('{GDPR_CONSENT}', gdprConsentString)
283
+ .replace('{US_PRIVACY}', usPrivacy || '')
284
+ .replace('{GPP_STRING}', gppString)
285
+ .replace('{GPP_SID}', gppApplicableSections)
286
+ })
290
287
  }
291
288
  return syncs;
292
289
  }
@@ -1,13 +1,14 @@
1
1
  import { registerBidder } from '../src/adapters/bidderFactory.js';
2
- import { BANNER } from '../src/mediaTypes.js';
2
+ import { BANNER, VIDEO } from '../src/mediaTypes.js';
3
3
  import { ortbConverter } from '../libraries/ortbConverter/converter.js'
4
4
  import { deepSetValue } from '../src/utils.js';
5
+ import {ORTB_MTYPES} from '../libraries/ortbConverter/processors/mediaType.js';
5
6
 
6
- const VERSION = '1.0.0';
7
+ const VERSION = '1.1.0';
7
8
 
8
9
  const BIDDER_CODE = 'kimberlite';
9
10
  const METHOD = 'POST';
10
- const ENDPOINT_URL = 'https://kimberlite.io/rtb/bid/pbjs';
11
+ export const ENDPOINT_URL = 'https://kimberlite.io/rtb/bid/pbjs';
11
12
 
12
13
  const VERSION_INFO = {
13
14
  ver: '$prebid.version$',
@@ -16,7 +17,6 @@ const VERSION_INFO = {
16
17
 
17
18
  const converter = ortbConverter({
18
19
  context: {
19
- mediaType: BANNER,
20
20
  netRevenue: true,
21
21
  ttl: 300
22
22
  },
@@ -35,18 +35,32 @@ const converter = ortbConverter({
35
35
  const imp = buildImp(bidRequest, context);
36
36
  imp.tagid = bidRequest.params.placementId;
37
37
  return imp;
38
- }
38
+ },
39
+
40
+ bidResponse: function (buildBidResponse, bid, context) {
41
+ if (!bid.price) return;
42
+
43
+ const [type] = Object.keys(context.bidRequest.mediaTypes);
44
+ if (Object.values(ORTB_MTYPES).includes(type)) {
45
+ context.mediaType = type;
46
+ }
47
+
48
+ const bidResponse = buildBidResponse(bid, context);
49
+ return bidResponse;
50
+ },
39
51
  });
40
52
 
41
53
  export const spec = {
42
54
  code: BIDDER_CODE,
43
- supportedMediaTypes: [BANNER],
55
+ supportedMediaTypes: [BANNER, VIDEO],
44
56
 
45
57
  isBidRequestValid: (bidRequest = {}) => {
46
58
  const { params, mediaTypes } = bidRequest;
47
59
  let isValid = Boolean(params && params.placementId);
48
60
  if (mediaTypes && mediaTypes[BANNER]) {
49
61
  isValid = isValid && Boolean(mediaTypes[BANNER].sizes);
62
+ } else if (mediaTypes && mediaTypes[VIDEO]) {
63
+ isValid = isValid && Boolean(mediaTypes[VIDEO].mimes);
50
64
  } else {
51
65
  isValid = false;
52
66
  }
@@ -58,7 +72,10 @@ export const spec = {
58
72
  return {
59
73
  method: METHOD,
60
74
  url: ENDPOINT_URL,
61
- data: converter.toORTB({ bidderRequest, bidRequests })
75
+ data: converter.toORTB({
76
+ bidRequests,
77
+ bidderRequest
78
+ })
62
79
  }
63
80
  },
64
81
 
@@ -20,7 +20,7 @@ var adUnits = [
20
20
  code: 'test-div',
21
21
  mediaTypes: {
22
22
  banner: {
23
- sizes: [[320, 250], [640, 480]],
23
+ sizes: [[320, 250], [640, 480]], // Required.
24
24
  }
25
25
  },
26
26
  bids: [
@@ -34,3 +34,32 @@ var adUnits = [
34
34
  }
35
35
  ]
36
36
  ```
37
+
38
+ ## Video AdUnit
39
+
40
+ ```javascript
41
+ var adUnits = [
42
+ {
43
+ code: 'test-div',
44
+ mediaTypes: {
45
+ video: {
46
+ // ORTB 2.5 options.
47
+ mimes: ['video/mp4'], // Required.
48
+ // Other options are optional.
49
+ placement: 1,
50
+ protocols: [3, 6],
51
+ linearity: 1,
52
+ startdelay: 0
53
+ }
54
+ },
55
+ bids: [
56
+ {
57
+ bidder: "kimberlite",
58
+ params: {
59
+ placementId: 'testVideo'
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ ```