prebid.js 8.3.0 → 8.4.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 (203) 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/admanBidAdapter.js +1 -1
  7. package/dist/adqueryBidAdapter.js +1 -1
  8. package/dist/adrelevantisBidAdapter.js +1 -1
  9. package/dist/adtrgtmeBidAdapter.js +1 -1
  10. package/dist/adxcgBidAdapter.js +1 -1
  11. package/dist/adyoulikeBidAdapter.js +1 -1
  12. package/dist/ajaBidAdapter.js +1 -1
  13. package/dist/amxBidAdapter.js +1 -1
  14. package/dist/amxIdSystem.js +1 -1
  15. package/dist/appierAnalyticsAdapter.js +1 -1
  16. package/dist/appnexusBidAdapter.js +1 -1
  17. package/dist/asoBidAdapter.js +1 -1
  18. package/dist/axonixBidAdapter.js +1 -1
  19. package/dist/bidglassBidAdapter.js +1 -1
  20. package/dist/big-richmediaBidAdapter.js +1 -1
  21. package/dist/brandmetricsRtdProvider.js +1 -1
  22. package/dist/bridBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/carodaBidAdapter.js +1 -1
  26. package/dist/chtnwBidAdapter.js +1 -1
  27. package/dist/concertBidAdapter.js +1 -1
  28. package/dist/connectadBidAdapter.js +1 -1
  29. package/dist/consumableBidAdapter.js +1 -1
  30. package/dist/conversantAnalyticsAdapter.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/cwireBidAdapter.js +1 -1
  35. package/dist/dependencies.json +3 -0
  36. package/dist/dspxBidAdapter.js +1 -1
  37. package/dist/eplanningBidAdapter.js +1 -1
  38. package/dist/euidIdSystem.js +1 -1
  39. package/dist/feedadBidAdapter.js +1 -1
  40. package/dist/finativeBidAdapter.js +1 -1
  41. package/dist/freewheel-sspBidAdapter.js +1 -1
  42. package/dist/gdprEnforcement.js +1 -1
  43. package/dist/gmosspBidAdapter.js +1 -1
  44. package/dist/goldbachBidAdapter.js +1 -1
  45. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  46. package/dist/greenbidsRtdProvider.js +1 -1
  47. package/dist/gridBidAdapter.js +1 -1
  48. package/dist/gumgumBidAdapter.js +1 -1
  49. package/dist/h12mediaBidAdapter.js +1 -1
  50. package/dist/hypelabBidAdapter.js +1 -1
  51. package/dist/id5IdSystem.js +1 -1
  52. package/dist/imdsBidAdapter.js +1 -1
  53. package/dist/improvedigitalBidAdapter.js +1 -1
  54. package/dist/insticatorBidAdapter.js +1 -1
  55. package/dist/ixBidAdapter.js +1 -1
  56. package/dist/justpremiumBidAdapter.js +1 -1
  57. package/dist/kargoBidAdapter.js +1 -1
  58. package/dist/konduitAnalyticsAdapter.js +1 -1
  59. package/dist/kueezBidAdapter.js +1 -1
  60. package/dist/kueezRtbBidAdapter.js +1 -1
  61. package/dist/kulturemediaBidAdapter.js +1 -1
  62. package/dist/lassoBidAdapter.js +1 -1
  63. package/dist/lifestreetBidAdapter.js +1 -1
  64. package/dist/logicadBidAdapter.js +1 -1
  65. package/dist/loglyliftBidAdapter.js +1 -1
  66. package/dist/magniteAnalyticsAdapter.js +1 -1
  67. package/dist/malltvAnalyticsAdapter.js +1 -1
  68. package/dist/marsmediaBidAdapter.js +1 -1
  69. package/dist/mediafuseBidAdapter.js +1 -1
  70. package/dist/mediasquareBidAdapter.js +1 -1
  71. package/dist/mgidBidAdapter.js +1 -1
  72. package/dist/minutemediaBidAdapter.js +1 -1
  73. package/dist/minutemediaplusBidAdapter.js +1 -1
  74. package/dist/nexx360BidAdapter.js +1 -1
  75. package/dist/not-for-prod/prebid.js +135 -135
  76. package/dist/oguryBidAdapter.js +1 -1
  77. package/dist/onetagBidAdapter.js +1 -1
  78. package/dist/ooloAnalyticsAdapter.js +1 -1
  79. package/dist/optidigitalBidAdapter.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 +2 -2
  84. package/dist/publinkIdSystem.js +1 -1
  85. package/dist/pubmaticBidAdapter.js +1 -1
  86. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  87. package/dist/pulsepointBidAdapter.js +1 -1
  88. package/dist/pxyzBidAdapter.js +1 -1
  89. package/dist/quantcastBidAdapter.js +1 -1
  90. package/dist/readpeakBidAdapter.js +1 -1
  91. package/dist/relaidoBidAdapter.js +1 -1
  92. package/dist/retailspotBidAdapter.js +1 -1
  93. package/dist/rhythmoneBidAdapter.js +1 -1
  94. package/dist/riseBidAdapter.js +1 -1
  95. package/dist/rubiconBidAdapter.js +1 -1
  96. package/dist/seedingAllianceBidAdapter.js +1 -1
  97. package/dist/seedtagBidAdapter.js +1 -1
  98. package/dist/sharedIdSystem.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/stroeerCoreBidAdapter.js +1 -1
  111. package/dist/stvBidAdapter.js +1 -1
  112. package/dist/sublimeBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/topicsFpdModule.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/userId.js +1 -1
  124. package/dist/vidazooBidAdapter.js +1 -1
  125. package/dist/videobyteBidAdapter.js +1 -1
  126. package/dist/visxBidAdapter.js +1 -1
  127. package/dist/voxBidAdapter.js +1 -1
  128. package/dist/vuukleBidAdapter.js +1 -1
  129. package/dist/widespaceBidAdapter.js +1 -1
  130. package/dist/winrBidAdapter.js +1 -1
  131. package/dist/yahoosspBidAdapter.js +1 -1
  132. package/dist/yandexBidAdapter.js +1 -1
  133. package/dist/yieldmoBidAdapter.js +1 -1
  134. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  135. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  136. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  137. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  138. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  139. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  140. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  141. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  142. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  143. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  144. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  145. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  146. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  147. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  148. package/modules/33acrossBidAdapter.js +24 -14
  149. package/modules/33acrossIdSystem.js +15 -4
  150. package/modules/adagioBidAdapter.js +0 -1
  151. package/modules/admanBidAdapter.js +4 -0
  152. package/modules/brandmetricsRtdProvider.js +36 -2
  153. package/modules/brandmetricsRtdProvider.md +17 -2
  154. package/modules/gdprEnforcement.js +27 -22
  155. package/modules/gridBidAdapter.js +19 -0
  156. package/modules/ixBidAdapter.js +40 -2
  157. package/modules/kargoBidAdapter.js +4 -0
  158. package/modules/minutemediaBidAdapter.js +17 -2
  159. package/modules/oguryBidAdapter.js +29 -16
  160. package/modules/pubmaticBidAdapter.js +16 -1
  161. package/modules/pulsepointBidAdapter.js +63 -424
  162. package/modules/pulsepointBidAdapter.md +39 -45
  163. package/modules/sharedIdSystem.js +1 -1
  164. package/modules/sovrnBidAdapter.js +5 -1
  165. package/modules/stroeerCoreBidAdapter.js +2 -3
  166. package/modules/teadsBidAdapter.js +2 -0
  167. package/modules/topicsFpdModule.js +4 -1
  168. package/modules/topicsFpdModule.md +4 -0
  169. package/modules/userId/index.js +2 -2
  170. package/modules/vidazooBidAdapter.js +5 -7
  171. package/modules/voxBidAdapter.js +16 -5
  172. package/modules/yahoosspBidAdapter.js +38 -33
  173. package/modules/yahoosspBidAdapter.md +96 -95
  174. package/modules/yandexBidAdapter.js +12 -15
  175. package/package.json +1 -1
  176. package/src/activities/redactor.js +1 -1
  177. package/src/auction.js +24 -2
  178. package/src/constants.json +3 -1
  179. package/src/fpd/sua.js +8 -2
  180. package/test/spec/auctionmanager_spec.js +29 -1
  181. package/test/spec/fpd/enrichment_spec.js +7 -1
  182. package/test/spec/fpd/sua_spec.js +12 -0
  183. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  184. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  185. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  186. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  187. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  188. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  189. package/test/spec/modules/ixBidAdapter_spec.js +72 -0
  190. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  191. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  192. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  193. package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
  194. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  195. package/test/spec/modules/sovrnBidAdapter_spec.js +24 -4
  196. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  197. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  198. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  199. package/test/spec/modules/vidazooBidAdapter_spec.js +0 -5
  200. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  201. package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
  202. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  203. package/integrationExamples/gpt/inskin_example.html +0 -100
@@ -220,6 +220,7 @@ function buildRequestObject(bid) {
220
220
  let placementId = getValue(bid.params, 'placementId');
221
221
  let pageId = getValue(bid.params, 'pageId');
222
222
  const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid');
223
+ const videoPlcmt = deepAccess(bid, 'mediaTypes.video.plcmt');
223
224
 
224
225
  reqObj.sizes = getSizes(bid);
225
226
  reqObj.bidId = getBidIdParameter('bidId', bid);
@@ -229,6 +230,7 @@ function buildRequestObject(bid) {
229
230
  reqObj.adUnitCode = getBidIdParameter('adUnitCode', bid);
230
231
  reqObj.transactionId = bid.ortb2Imp?.ext?.tid || '';
231
232
  if (gpid) { reqObj.gpid = gpid; }
233
+ if (videoPlcmt) { reqObj.videoPlcmt = videoPlcmt; }
232
234
  return reqObj;
233
235
  }
234
236
 
@@ -15,10 +15,13 @@ let LOAD_TOPICS_INITIALISE = false;
15
15
  const HAS_DEVICE_ACCESS = hasDeviceAccess();
16
16
 
17
17
  const bidderIframeList = {
18
- maxTopicCaller: 1,
18
+ maxTopicCaller: 2,
19
19
  bidders: [{
20
20
  bidder: 'pubmatic',
21
21
  iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
22
+ }, {
23
+ bidder: 'rtbhouse',
24
+ iframeURL: 'https://topics.authorizedvault.com/topicsapi.html'
22
25
  }]
23
26
  }
24
27
  export const coreStorage = getCoreStorageManager(MODULE_NAME);
@@ -36,6 +36,10 @@ pbjs.setConfig({
36
36
  bidder: 'pubmatic',
37
37
  iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html',
38
38
  expiry: 7 // Configurable expiry days
39
+ },{
40
+ bidder: 'rtbhouse',
41
+ iframeURL: 'https://topics.authorizedvault.com/topicsapi.html',
42
+ expiry: 7 // Configurable expiry days
39
43
  },{
40
44
  bidder: 'rubicon',
41
45
  iframeURL: 'https://rubicon.com:8080/topics/fpd/topic.html', // dummy URL
@@ -743,14 +743,14 @@ function registerSignalSources() {
743
743
  if (!isGptPubadsDefined()) {
744
744
  return;
745
745
  }
746
- window.googletag.encryptedSignalProviders = window.googletag.encryptedSignalProviders || [];
746
+ window.googletag.secureSignalProviders = window.googletag.secureSignalProviders || [];
747
747
  const encryptedSignalSources = config.getConfig('userSync.encryptedSignalSources');
748
748
  if (encryptedSignalSources) {
749
749
  const registerDelay = encryptedSignalSources.registerDelay || 0;
750
750
  setTimeout(() => {
751
751
  encryptedSignalSources['sources'] && encryptedSignalSources['sources'].forEach(({ source, encrypt, customFunc }) => {
752
752
  source.forEach((src) => {
753
- window.googletag.encryptedSignalProviders.push({
753
+ window.googletag.secureSignalProviders.push({
754
754
  id: src,
755
755
  collectorFunction: () => getEncryptedEidsForSource(src, encrypt, customFunc)
756
756
  });
@@ -56,7 +56,6 @@ function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout
56
56
  adUnitCode,
57
57
  schain,
58
58
  mediaTypes,
59
- auctionId,
60
59
  ortb2Imp,
61
60
  bidderRequestId,
62
61
  bidRequestsCount,
@@ -112,8 +111,6 @@ function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout
112
111
  gpid: gpid,
113
112
  cat: cat,
114
113
  pagecat: pagecat,
115
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
116
- auctionId: auctionId,
117
114
  transactionId: ortb2Imp?.ext?.tid,
118
115
  bidderRequestId: bidderRequestId,
119
116
  bidRequestsCount: bidRequestsCount,
@@ -179,9 +176,9 @@ function buildSingleRequest(bidRequests, bidderRequest, topWindowUrl, bidderTime
179
176
  const sizes = parseSizesInput(bid.sizes);
180
177
  return buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout)
181
178
  });
182
- const CHUNK_SIZE = Math.min(10, config.getConfig('vidazoo.chunkSize') || 10);
179
+ const chunkSize = Math.min(20, config.getConfig('vidazoo.chunkSize') || 10);
183
180
 
184
- const chunkedData = chunk(data, CHUNK_SIZE);
181
+ const chunkedData = chunk(data, chunkSize);
185
182
  return chunkedData.map(chunk => {
186
183
  return {
187
184
  method: 'POST',
@@ -226,14 +223,15 @@ function buildRequests(validBidRequests, bidderRequest) {
226
223
  const requests = [];
227
224
 
228
225
  if (singleRequestMode) {
229
- // We need to split the requests into banner and video requests
226
+ // banner bids are sent as a single request
230
227
  const bannerBidRequests = validBidRequests.filter(bid => isArray(bid.mediaTypes) ? bid.mediaTypes.includes(BANNER) : bid.mediaTypes[BANNER] !== undefined);
231
228
  if (bannerBidRequests.length > 0) {
232
229
  const singleRequests = buildSingleRequest(bannerBidRequests, bidderRequest, topWindowUrl, bidderTimeout);
233
230
  requests.push(...singleRequests);
234
231
  }
235
232
 
236
- // Video Logic
233
+ // video bids are sent as a single request for each bid
234
+
237
235
  const videoBidRequests = validBidRequests.filter(bid => bid.mediaTypes[VIDEO] !== undefined);
238
236
  videoBidRequests.forEach(validBidRequest => {
239
237
  const sizes = parseSizesInput(validBidRequest.sizes);
@@ -4,6 +4,9 @@ import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
4
  import {find} from '../src/polyfill.js';
5
5
  import {auctionManager} from '../src/auctionManager.js';
6
6
  import {Renderer} from '../src/Renderer.js';
7
+ import {config} from '../src/config.js'
8
+
9
+ const { getConfig } = config;
7
10
 
8
11
  const BIDDER_CODE = 'vox';
9
12
  const SSP_ENDPOINT = 'https://ssp.hybrid.ai/auction/prebid';
@@ -11,13 +14,21 @@ const VIDEO_RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVi
11
14
  const TTL = 60;
12
15
 
13
16
  function buildBidRequests(validBidRequests) {
14
- return _map(validBidRequests, function(validBidRequest) {
15
- const params = validBidRequest.params;
17
+ return _map(validBidRequests, function(bid) {
18
+ const currency = getConfig('currency.adServerCurrency');
19
+ const floorInfo = bid.getFloor ? bid.getFloor({
20
+ currency: currency || 'USD'
21
+ }) : {};
22
+
23
+ const params = bid.params;
16
24
  const bidRequest = {
17
- bidId: validBidRequest.bidId,
25
+ floorInfo,
26
+ schain: bid.schain,
27
+ userId: bid.userId,
28
+ bidId: bid.bidId,
18
29
  // TODO: fix transactionId leak: https://github.com/prebid/Prebid.js/issues/9781
19
- transactionId: validBidRequest.transactionId,
20
- sizes: validBidRequest.sizes,
30
+ transactionId: bid.transactionId,
31
+ sizes: bid.sizes,
21
32
  placement: params.placement,
22
33
  placeId: params.placementId,
23
34
  imageUrl: params.imageUrl
@@ -6,9 +6,10 @@ import { Renderer } from '../src/Renderer.js';
6
6
  import {hasPurpose1Consent} from '../src/utils/gpdr.js';
7
7
 
8
8
  const INTEGRATION_METHOD = 'prebid.js';
9
- const BIDDER_CODE = 'yahoossp';
9
+ const BIDDER_CODE = 'yahooAds';
10
+ const BIDDER_ALIASES = ['yahoossp', 'yahooAdvertising']
10
11
  const GVLID = 25;
11
- const ADAPTER_VERSION = '1.0.2';
12
+ const ADAPTER_VERSION = '1.1.0';
12
13
  const PREBID_VERSION = '$prebid.version$';
13
14
  const DEFAULT_BID_TTL = 300;
14
15
  const TEST_MODE_DCN = '8a969516017a7a396ec539d97f540011';
@@ -49,13 +50,17 @@ const SUPPORTED_USER_ID_SOURCES = [
49
50
  'quantcast.com',
50
51
  'tapad.com',
51
52
  'uidapi.com',
52
- 'verizonmedia.com',
53
53
  'yahoo.com',
54
54
  'zeotap.com'
55
55
  ];
56
56
 
57
57
  /* Utility functions */
58
58
 
59
+ function getConfigValue(bid, key) {
60
+ const bidderCode = bid.bidder || bid.bidderCode;
61
+ return config.getConfig(`${bidderCode}.${key}`);
62
+ }
63
+
59
64
  function getSize(size) {
60
65
  return {
61
66
  w: parseInt(size[0]),
@@ -114,11 +119,12 @@ function extractUserSyncUrls(syncOptions, pixels) {
114
119
  */
115
120
  function updateConsentQueryParams(url, consentData) {
116
121
  const parameterMap = {
117
- 'gdpr_consent': consentData.gdpr.consentString,
118
- 'gdpr': consentData.gdpr.gdprApplies ? '1' : '0',
119
- 'us_privacy': consentData.uspConsent,
120
- 'gpp': consentData.gpp.gppString,
121
- 'gpp_sid': consentData.gpp.applicableSections ? consentData.gpp.applicableSections.join(',') : ''
122
+ 'gdpr_consent': consentData.gdpr ? consentData.gdpr.consentString : '',
123
+ 'gdpr': consentData.gdpr && consentData.gdpr.gdprApplies ? '1' : '0',
124
+ 'us_privacy': consentData.uspConsent ? consentData.uspConsent : '',
125
+ 'gpp': consentData.gpp ? consentData.gpp.gppString : '',
126
+ 'gpp_sid': consentData.gpp && Array.isArray(consentData.gpp.applicableSections)
127
+ ? consentData.gpp.applicableSections.join(',') : ''
122
128
  }
123
129
 
124
130
  const existingUrl = new URL(url);
@@ -155,8 +161,8 @@ function getPubIdMode(bid) {
155
161
  return pubIdMode;
156
162
  };
157
163
 
158
- function getAdapterMode() {
159
- let adapterMode = config.getConfig('yahoossp.mode');
164
+ function getAdapterMode(bid) {
165
+ let adapterMode = getConfigValue(bid, 'mode');
160
166
  adapterMode = adapterMode ? adapterMode.toLowerCase() : undefined;
161
167
  if (typeof adapterMode === 'undefined' || adapterMode === BANNER) {
162
168
  return BANNER;
@@ -177,7 +183,7 @@ function getResponseFormat(bid) {
177
183
  };
178
184
 
179
185
  function getFloorModuleData(bid) {
180
- const adapterMode = getAdapterMode();
186
+ const adapterMode = getAdapterMode(bid);
181
187
  const getFloorRequestObject = {
182
188
  currency: deepAccess(bid, 'params.bidOverride.cur') || DEFAULT_CURRENCY,
183
189
  mediaType: adapterMode,
@@ -187,7 +193,7 @@ function getFloorModuleData(bid) {
187
193
  };
188
194
 
189
195
  function filterBidRequestByMode(validBidRequests) {
190
- const mediaTypesMode = getAdapterMode();
196
+ const mediaTypesMode = getAdapterMode(validBidRequests[0]);
191
197
  let result = [];
192
198
  if (mediaTypesMode === BANNER) {
193
199
  result = validBidRequests.filter(bid => {
@@ -244,7 +250,7 @@ function validateAppendObject(validationType, allowedKeys, inputObject, appendTo
244
250
  };
245
251
 
246
252
  function getTtl(bidderRequest) {
247
- const globalTTL = config.getConfig('yahoossp.ttl');
253
+ const globalTTL = getConfigValue(bidderRequest, 'ttl');
248
254
  return globalTTL ? validateTTL(globalTTL) : validateTTL(deepAccess(bidderRequest, 'params.ttl'));
249
255
  };
250
256
 
@@ -276,8 +282,8 @@ function generateOpenRtbObject(bidderRequest, bid) {
276
282
  ext: {
277
283
  'us_privacy': bidderRequest.uspConsent ? bidderRequest.uspConsent : '',
278
284
  gdpr: bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? 1 : 0,
279
- gpp: bidderRequest.gppConsent.gppString,
280
- gpp_sid: bidderRequest.gppConsent.applicableSections
285
+ gpp: bidderRequest.gppConsent ? bidderRequest.gppConsent.gppString : '',
286
+ gpp_sid: bidderRequest.gppConsent ? bidderRequest.gppConsent.applicableSections : []
281
287
  }
282
288
  },
283
289
  source: {
@@ -332,7 +338,7 @@ function generateOpenRtbObject(bidderRequest, bid) {
332
338
  };
333
339
 
334
340
  function appendImpObject(bid, openRtbObject) {
335
- const mediaTypeMode = getAdapterMode();
341
+ const mediaTypeMode = getAdapterMode(bid);
336
342
 
337
343
  if (openRtbObject && bid) {
338
344
  const impObject = {
@@ -494,20 +500,21 @@ function appendFirstPartyData(outBoundBidRequest, bid) {
494
500
 
495
501
  function generateServerRequest({payload, requestOptions, bidderRequest}) {
496
502
  const pubIdMode = getPubIdMode(bidderRequest);
497
- let sspEndpoint = config.getConfig('yahoossp.endpoint') || SSP_ENDPOINT_DCN_POS;
503
+ const overrideEndpoint = getConfigValue(bidderRequest, 'endpoint');
504
+ let sspEndpoint = overrideEndpoint || SSP_ENDPOINT_DCN_POS;
498
505
 
499
506
  if (pubIdMode === true) {
500
- sspEndpoint = config.getConfig('yahoossp.endpoint') || SSP_ENDPOINT_PUBID;
507
+ sspEndpoint = overrideEndpoint || SSP_ENDPOINT_PUBID;
501
508
  };
502
509
 
503
510
  if (deepAccess(bidderRequest, 'params.testing.e2etest') === true) {
504
- logInfo('yahoossp adapter e2etest mode is active');
511
+ logInfo('Adapter e2etest mode is active');
505
512
  requestOptions.withCredentials = false;
506
513
 
507
514
  if (pubIdMode === true) {
508
515
  payload.site.id = TEST_MODE_PUBID_DCN;
509
516
  } else {
510
- const mediaTypeMode = getAdapterMode();
517
+ const mediaTypeMode = getAdapterMode(bidderRequest);
511
518
  payload.site.id = TEST_MODE_DCN;
512
519
  payload.imp.forEach(impObject => {
513
520
  impObject.ext.e2eTestMode = true;
@@ -516,8 +523,9 @@ function generateServerRequest({payload, requestOptions, bidderRequest}) {
516
523
  } else if (mediaTypeMode === VIDEO) {
517
524
  impObject.tagid = TEST_MODE_VIDEO_POS; // video passback
518
525
  } else {
519
- logWarn('yahoossp adapter e2etest mode does not support yahoossp.mode="all". \n Please specify either "banner" or "video"');
520
- logWarn('yahoossp adapter e2etest mode: Please make sure your adUnit matches the yahoossp.mode video or banner');
526
+ const bidderCode = bidderRequest.bidderCode;
527
+ logWarn(`e2etest mode does not support ${bidderCode}.mode="all". \n Please specify either "banner" or "video"`);
528
+ logWarn(`Adapter e2etest mode: Please make sure your adUnit matches the ${bidderCode}.mode video or banner`);
521
529
  }
522
530
  });
523
531
  }
@@ -528,7 +536,7 @@ function generateServerRequest({payload, requestOptions, bidderRequest}) {
528
536
  method: 'POST',
529
537
  data: payload,
530
538
  options: requestOptions,
531
- bidderRequest: bidderRequest
539
+ bidderRequest // Additional data for use in interpretResponse()
532
540
  };
533
541
  };
534
542
 
@@ -547,7 +555,7 @@ function createRenderer(bidderRequest, bidResponse) {
547
555
  }, deepAccess(bidderRequest, 'params.testing.renderer.setTimeout') || DEFAULT_RENDERER_TIMEOUT);
548
556
  });
549
557
  } catch (error) {
550
- logWarn('yahoossp renderer error: setRender() failed', error);
558
+ logWarn('Renderer error: setRender() failed', error);
551
559
  }
552
560
  return renderer;
553
561
  }
@@ -557,7 +565,7 @@ function createRenderer(bidderRequest, bidResponse) {
557
565
  export const spec = {
558
566
  code: BIDDER_CODE,
559
567
  gvlid: GVLID,
560
- aliases: [],
568
+ aliases: BIDDER_ALIASES,
561
569
  supportedMediaTypes: [BANNER, VIDEO],
562
570
 
563
571
  isBidRequestValid: function(bid) {
@@ -570,14 +578,14 @@ export const spec = {
570
578
  ) {
571
579
  return true;
572
580
  } else {
573
- logWarn('yahoossp bidder params missing or incorrect, please pass object with either: dcn & pos OR pubId');
581
+ logWarn('Bidder params missing or incorrect, please pass object with either: dcn & pos OR pubId');
574
582
  return false;
575
583
  }
576
584
  },
577
585
 
578
586
  buildRequests: function(validBidRequests, bidderRequest) {
579
587
  if (isEmpty(validBidRequests) || isEmpty(bidderRequest)) {
580
- logWarn('yahoossp Adapter: buildRequests called with either empty "validBidRequests" or "bidderRequest"');
588
+ logWarn('buildRequests called with either empty "validBidRequests" or "bidderRequest"');
581
589
  return undefined;
582
590
  };
583
591
 
@@ -592,13 +600,12 @@ export const spec = {
592
600
 
593
601
  const filteredBidRequests = filterBidRequestByMode(validBidRequests);
594
602
 
595
- if (config.getConfig('yahoossp.singleRequestMode') === true) {
603
+ if (getConfigValue(bidderRequest, 'singleRequestMode') === true) {
596
604
  const payload = generateOpenRtbObject(bidderRequest, filteredBidRequests[0]);
597
605
  filteredBidRequests.forEach(bid => {
598
606
  appendImpObject(bid, payload);
599
607
  });
600
-
601
- return generateServerRequest({payload, requestOptions, bidderRequest});
608
+ return [generateServerRequest({payload, requestOptions, bidderRequest})];
602
609
  }
603
610
 
604
611
  return filteredBidRequests.map(bid => {
@@ -608,12 +615,11 @@ export const spec = {
608
615
  });
609
616
  },
610
617
 
611
- interpretResponse: function(serverResponse, { data, bidderRequest }) {
618
+ interpretResponse: function(serverResponse, { bidderRequest }) {
612
619
  const response = [];
613
620
  if (!serverResponse.body || !Array.isArray(serverResponse.body.seatbid)) {
614
621
  return response;
615
622
  }
616
-
617
623
  let seatbids = serverResponse.body.seatbid;
618
624
  seatbids.forEach(seatbid => {
619
625
  let bid;
@@ -628,7 +634,6 @@ export const spec = {
628
634
 
629
635
  let bidResponse = {
630
636
  adId: deepAccess(bid, 'adId') ? bid.adId : bid.impid || bid.crid,
631
- adUnitCode: bidderRequest.adUnitCode,
632
637
  requestId: bid.impid,
633
638
  cpm: cpm,
634
639
  width: bid.w,