prebid.js 8.2.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 (227) 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/adtelligentBidAdapter.js +1 -1
  10. package/dist/adtrgtmeBidAdapter.js +1 -1
  11. package/dist/adxcgBidAdapter.js +1 -1
  12. package/dist/adyoulikeBidAdapter.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/asoBidAdapter.js +1 -1
  19. package/dist/axonixBidAdapter.js +1 -1
  20. package/dist/beopBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/brandmetricsRtdProvider.js +1 -1
  24. package/dist/bridBidAdapter.js +1 -1
  25. package/dist/bridgewellBidAdapter.js +1 -1
  26. package/dist/brightMountainMediaBidAdapter.js +1 -1
  27. package/dist/carodaBidAdapter.js +1 -1
  28. package/dist/chtnwBidAdapter.js +1 -1
  29. package/dist/concertBidAdapter.js +1 -1
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dependencies.json +6 -0
  38. package/dist/discoveryBidAdapter.js +1 -1
  39. package/dist/dspxBidAdapter.js +1 -1
  40. package/dist/eplanningBidAdapter.js +1 -1
  41. package/dist/euidIdSystem.js +1 -1
  42. package/dist/feedadBidAdapter.js +1 -1
  43. package/dist/finativeBidAdapter.js +1 -1
  44. package/dist/freewheel-sspBidAdapter.js +1 -1
  45. package/dist/gdprEnforcement.js +1 -1
  46. package/dist/gmosspBidAdapter.js +1 -1
  47. package/dist/goldbachBidAdapter.js +1 -1
  48. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  49. package/dist/greenbidsRtdProvider.js +1 -1
  50. package/dist/gridBidAdapter.js +1 -1
  51. package/dist/gumgumBidAdapter.js +1 -1
  52. package/dist/h12mediaBidAdapter.js +1 -1
  53. package/dist/holidBidAdapter.js +1 -1
  54. package/dist/hypelabBidAdapter.js +1 -1
  55. package/dist/id5IdSystem.js +1 -1
  56. package/dist/imdsBidAdapter.js +1 -1
  57. package/dist/improvedigitalBidAdapter.js +1 -1
  58. package/dist/insticatorBidAdapter.js +1 -1
  59. package/dist/ixBidAdapter.js +1 -1
  60. package/dist/justpremiumBidAdapter.js +1 -1
  61. package/dist/kargoBidAdapter.js +1 -1
  62. package/dist/konduitAnalyticsAdapter.js +1 -1
  63. package/dist/kueezBidAdapter.js +1 -1
  64. package/dist/kueezRtbBidAdapter.js +1 -1
  65. package/dist/kulturemediaBidAdapter.js +1 -1
  66. package/dist/lassoBidAdapter.js +1 -1
  67. package/dist/lifestreetBidAdapter.js +1 -1
  68. package/dist/livewrappedAnalyticsAdapter.js +1 -1
  69. package/dist/logicadBidAdapter.js +1 -1
  70. package/dist/loglyliftBidAdapter.js +1 -1
  71. package/dist/magniteAnalyticsAdapter.js +1 -1
  72. package/dist/malltvAnalyticsAdapter.js +1 -1
  73. package/dist/marsmediaBidAdapter.js +1 -1
  74. package/dist/mediafuseBidAdapter.js +1 -1
  75. package/dist/mediagoBidAdapter.js +1 -1
  76. package/dist/mediasquareBidAdapter.js +1 -1
  77. package/dist/mgidBidAdapter.js +1 -1
  78. package/dist/minutemediaBidAdapter.js +1 -1
  79. package/dist/minutemediaplusBidAdapter.js +1 -1
  80. package/dist/nexx360BidAdapter.js +1 -1
  81. package/dist/not-for-prod/prebid.js +143 -143
  82. package/dist/oguryBidAdapter.js +1 -1
  83. package/dist/onetagBidAdapter.js +1 -1
  84. package/dist/ooloAnalyticsAdapter.js +1 -1
  85. package/dist/optidigitalBidAdapter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/parrableIdSystem.js +1 -1
  88. package/dist/pixfutureBidAdapter.js +1 -1
  89. package/dist/prebid-core.js +2 -2
  90. package/dist/publinkIdSystem.js +1 -1
  91. package/dist/pubmaticBidAdapter.js +1 -1
  92. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  93. package/dist/pulsepointBidAdapter.js +1 -1
  94. package/dist/pxyzBidAdapter.js +1 -1
  95. package/dist/quantcastBidAdapter.js +1 -1
  96. package/dist/readpeakBidAdapter.js +1 -1
  97. package/dist/relaidoBidAdapter.js +1 -1
  98. package/dist/retailspotBidAdapter.js +1 -1
  99. package/dist/rhythmoneBidAdapter.js +1 -1
  100. package/dist/riseBidAdapter.js +1 -1
  101. package/dist/rubiconBidAdapter.js +1 -1
  102. package/dist/seedingAllianceBidAdapter.js +1 -1
  103. package/dist/seedtagBidAdapter.js +1 -1
  104. package/dist/sharedIdSystem.js +1 -1
  105. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  106. package/dist/sharethroughBidAdapter.js +1 -1
  107. package/dist/shinezBidAdapter.js +1 -1
  108. package/dist/smaatoBidAdapter.js +1 -1
  109. package/dist/smartadserverBidAdapter.js +1 -1
  110. package/dist/smartxBidAdapter.js +1 -1
  111. package/dist/smartyadsBidAdapter.js +1 -1
  112. package/dist/smilewantedBidAdapter.js +1 -1
  113. package/dist/sonobiBidAdapter.js +1 -1
  114. package/dist/sovrnAnalyticsAdapter.js +1 -1
  115. package/dist/sovrnBidAdapter.js +1 -1
  116. package/dist/sspBCBidAdapter.js +1 -1
  117. package/dist/stroeerCoreBidAdapter.js +1 -1
  118. package/dist/stvBidAdapter.js +1 -1
  119. package/dist/sublimeBidAdapter.js +1 -1
  120. package/dist/targetVideoBidAdapter.js +1 -1
  121. package/dist/teadsBidAdapter.js +1 -1
  122. package/dist/topicsFpdModule.js +1 -1
  123. package/dist/trafficgateBidAdapter.js +1 -1
  124. package/dist/trionBidAdapter.js +1 -1
  125. package/dist/tripleliftBidAdapter.js +1 -1
  126. package/dist/ttdBidAdapter.js +1 -1
  127. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  128. package/dist/uid2IdSystem.js +1 -1
  129. package/dist/underdogmediaBidAdapter.js +1 -1
  130. package/dist/undertoneBidAdapter.js +1 -1
  131. package/dist/userId.js +1 -1
  132. package/dist/vidazooBidAdapter.js +1 -1
  133. package/dist/videobyteBidAdapter.js +1 -1
  134. package/dist/visxBidAdapter.js +1 -1
  135. package/dist/voxBidAdapter.js +1 -1
  136. package/dist/vuukleBidAdapter.js +1 -1
  137. package/dist/widespaceBidAdapter.js +1 -1
  138. package/dist/winrBidAdapter.js +1 -1
  139. package/dist/yahoosspBidAdapter.js +1 -1
  140. package/dist/yandexBidAdapter.js +1 -1
  141. package/dist/yieldmoBidAdapter.js +1 -1
  142. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  143. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  144. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  145. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  146. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  147. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  148. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  149. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  150. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  151. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  152. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  153. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  154. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  155. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  156. package/modules/33acrossBidAdapter.js +24 -14
  157. package/modules/33acrossIdSystem.js +15 -4
  158. package/modules/adagioBidAdapter.js +2 -2
  159. package/modules/admanBidAdapter.js +4 -0
  160. package/modules/adtelligentBidAdapter.js +8 -0
  161. package/modules/beopBidAdapter.js +6 -6
  162. package/modules/beopBidAdapter.md +35 -1
  163. package/modules/brandmetricsRtdProvider.js +36 -2
  164. package/modules/brandmetricsRtdProvider.md +17 -2
  165. package/modules/cadentApertureMXBidAdapter.md +2 -2
  166. package/modules/discoveryBidAdapter.js +1 -1
  167. package/modules/gdprEnforcement.js +27 -22
  168. package/modules/gridBidAdapter.js +19 -0
  169. package/modules/holidBidAdapter.js +49 -30
  170. package/modules/ixBidAdapter.js +41 -2
  171. package/modules/kargoBidAdapter.js +4 -0
  172. package/modules/livewrappedAnalyticsAdapter.js +33 -33
  173. package/modules/mediagoBidAdapter.js +1 -0
  174. package/modules/minutemediaBidAdapter.js +17 -2
  175. package/modules/oguryBidAdapter.js +29 -16
  176. package/modules/pubmaticBidAdapter.js +16 -1
  177. package/modules/pulsepointBidAdapter.js +63 -424
  178. package/modules/pulsepointBidAdapter.md +39 -45
  179. package/modules/sharedIdSystem.js +1 -1
  180. package/modules/smartyadsBidAdapter.js +6 -3
  181. package/modules/sovrnBidAdapter.js +10 -1
  182. package/modules/stroeerCoreBidAdapter.js +2 -3
  183. package/modules/teadsBidAdapter.js +2 -0
  184. package/modules/topicsFpdModule.js +4 -1
  185. package/modules/topicsFpdModule.md +4 -0
  186. package/modules/trafficgateBidAdapter.js +126 -72
  187. package/modules/userId/index.js +2 -2
  188. package/modules/vidazooBidAdapter.js +69 -19
  189. package/modules/voxBidAdapter.js +16 -5
  190. package/modules/yahoosspBidAdapter.js +38 -33
  191. package/modules/yahoosspBidAdapter.md +96 -95
  192. package/modules/yandexBidAdapter.js +12 -15
  193. package/package.json +1 -1
  194. package/src/activities/redactor.js +1 -1
  195. package/src/auction.js +24 -2
  196. package/src/constants.json +3 -1
  197. package/src/fpd/sua.js +8 -2
  198. package/test/spec/auctionmanager_spec.js +29 -1
  199. package/test/spec/fpd/enrichment_spec.js +7 -1
  200. package/test/spec/fpd/sua_spec.js +12 -0
  201. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  202. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  203. package/test/spec/modules/adagioBidAdapter_spec.js +2 -2
  204. package/test/spec/modules/adtelligentBidAdapter_spec.js +8 -0
  205. package/test/spec/modules/beopBidAdapter_spec.js +18 -2
  206. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  207. package/test/spec/modules/cadentApertureMXBidAdapter_spec.js +1 -1
  208. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  209. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  210. package/test/spec/modules/holidBidAdapter_spec.js +26 -6
  211. package/test/spec/modules/ixBidAdapter_spec.js +84 -6
  212. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  213. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  214. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  215. package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
  216. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  217. package/test/spec/modules/smartyadsBidAdapter_spec.js +1 -1
  218. package/test/spec/modules/sovrnBidAdapter_spec.js +58 -4
  219. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  220. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  221. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  222. package/test/spec/modules/trafficgateBidAdapter_spec.js +1349 -199
  223. package/test/spec/modules/vidazooBidAdapter_spec.js +130 -4
  224. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  225. package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
  226. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  227. package/integrationExamples/gpt/inskin_example.html +0 -100
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Module Name**: PulsePoint Bidder Adapter
4
4
  **Module Type**: Bidder Adapter
5
- **Maintainer**: ExchangeTeam@pulsepoint.com
5
+ **Maintainer**: ExchangeTeam@pulsepoint.com
6
6
 
7
7
  # Description
8
8
 
@@ -18,55 +18,49 @@ Please use ```pulsepoint``` as the bidder code.
18
18
  sizes: [[300, 250]],
19
19
  bids: [{
20
20
  bidder: 'pulsepoint',
21
- params: {
22
- cf: '300X250',
21
+ params: {
23
22
  cp: 512379,
24
23
  ct: 486653
25
24
  }
26
25
  }]
27
26
  },{
28
- code: 'native-ad-div',
29
- sizes: [[1, 1]],
30
- nativeParams: {
31
- title: { required: true, len: 75 },
32
- image: { required: true },
33
- body: { len: 200 },
34
- sponsoredBy: { len: 20 }
35
- },
36
- bids: [{
37
- bidder: 'pulsepoint',
38
- params: {
39
- cp: 512379,
40
- ct: 505642
41
- }
42
- }]
43
- },{
44
- code: 'outstream-div',
45
- mediaTypes: {
46
- video: {
47
- playerSize: [640, 480],
48
- context: 'outstream',
49
- h: 300,
50
- w: 400,
51
- minduration: 1,
52
- maxduration: 210,
53
- linearity: 1,
54
- mimes: ["video/mp4", "video/ogg", "video/webm"],
55
- pos: 3
56
- }
57
- },
58
- bids: [{
59
- bidder: 'pulsepoint',
60
- params: {
61
- cp: 512379,
62
- ct: 505642
63
- }
64
- }],
65
- renderer: {
66
- options: {
67
- text: "PulsePoint Outstream"
68
- }
69
- }
27
+ code: 'native-1-slot',
28
+ mediaTypes: {
29
+ native: {
30
+ ortb: {
31
+ assets: [{
32
+ id: 1,
33
+ required: 1,
34
+ img: {
35
+ type: 3,
36
+ w: 150,
37
+ h: 50,
38
+ }
39
+ },
40
+ {
41
+ id: 2,
42
+ required: 1,
43
+ title: {
44
+ len: 80
45
+ }
46
+ },
47
+ {
48
+ id: 3,
49
+ required: 1,
50
+ data: {
51
+ type: 1
52
+ }
53
+ }]
54
+ }
55
+ }
56
+ },
57
+ bids: [{
58
+ bidder: 'pulsepoint',
59
+ params: {
60
+ cp: 512379,
61
+ ct: 694973
62
+ }
63
+ }]
70
64
  },{
71
65
  code: 'instream',
72
66
  mediaTypes: {
@@ -13,7 +13,7 @@ import {VENDORLESS_GVLID} from '../src/consentHandler.js';
13
13
  import {MODULE_TYPE_UID} from '../src/activities/modules.js';
14
14
  import {domainOverrideToRootDomain} from '../libraries/domainOverrideToRootDomain/index.js';
15
15
 
16
- export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'pubCommonId'});
16
+ export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'sharedId'});
17
17
  const COOKIE = 'cookie';
18
18
  const LOCAL_STORAGE = 'html5';
19
19
  const OPTOUT_NAME = '_pubcid_optout';
@@ -66,6 +66,9 @@ export const spec = {
66
66
  if (bidderRequest.gdprConsent) {
67
67
  request.gdpr = bidderRequest.gdprConsent
68
68
  }
69
+ if (bidderRequest.gppConsent) {
70
+ request.gpp = bidderRequest.gppConsent;
71
+ }
69
72
  }
70
73
  const len = validBidRequests.length;
71
74
 
@@ -102,19 +105,19 @@ export const spec = {
102
105
  return response;
103
106
  },
104
107
 
105
- getUserSyncs: (syncOptions, serverResponses = [], gdprConsent = {}, uspConsent = '') => {
108
+ getUserSyncs: (syncOptions, serverResponses = [], gdprConsent = {}, uspConsent = '', gppConsent = '') => {
106
109
  let syncs = [];
107
110
  let { gdprApplies, consentString = '' } = gdprConsent;
108
111
 
109
112
  if (syncOptions.iframeEnabled) {
110
113
  syncs.push({
111
114
  type: 'iframe',
112
- url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=iframe&us_privacy=${uspConsent}`
115
+ url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=iframe&us_privacy=${uspConsent}&gpp=${gppConsent}`
113
116
  });
114
117
  } else {
115
118
  syncs.push({
116
119
  type: 'image',
117
- url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=image&us_privacy=${uspConsent}`
120
+ url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=image&us_privacy=${uspConsent}&gpp=${gppConsent}`
118
121
  });
119
122
  }
120
123
 
@@ -169,6 +169,11 @@ export const spec = {
169
169
  };
170
170
  }
171
171
 
172
+ const tid = deepAccess(bidderRequest, 'ortb2.source.tid')
173
+ if (tid) {
174
+ deepSetValue(sovrnBidReq, 'source.tid', tid)
175
+ }
176
+
172
177
  if (bidderRequest.gdprConsent) {
173
178
  deepSetValue(sovrnBidReq, 'regs.ext.gdpr', +bidderRequest.gdprConsent.gdprApplies);
174
179
  deepSetValue(sovrnBidReq, 'user.ext.consent', bidderRequest.gdprConsent.consentString)
@@ -243,7 +248,7 @@ export const spec = {
243
248
  }
244
249
  },
245
250
 
246
- getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
251
+ getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) {
247
252
  try {
248
253
  const tracks = []
249
254
  if (serverResponses && serverResponses.length !== 0) {
@@ -257,6 +262,10 @@ export const spec = {
257
262
  if (uspConsent) {
258
263
  params.push(['us_privacy', uspConsent]);
259
264
  }
265
+ if (gppConsent) {
266
+ params.push(['gpp', gppConsent.gppString]);
267
+ params.push(['gpp_sid', gppConsent.applicableSections])
268
+ }
260
269
 
261
270
  if (iidArr[0]) {
262
271
  params.push(['informer', iidArr[0]]);
@@ -1,4 +1,4 @@
1
- import {buildUrl, deepAccess, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn} from '../src/utils.js';
1
+ import { buildUrl, deepAccess, generateUUID, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn } from '../src/utils.js';
2
2
  import {registerBidder} from '../src/adapters/bidderFactory.js';
3
3
  import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
4
  import {find} from '../src/polyfill.js';
@@ -50,8 +50,7 @@ export const spec = {
50
50
  const refererInfo = bidderRequest.refererInfo;
51
51
 
52
52
  const basePayload = {
53
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
54
- id: bidderRequest.auctionId,
53
+ id: generateUUID(),
55
54
  ref: refererInfo.ref,
56
55
  ssl: isSecureWindow(),
57
56
  mpa: isMainPageAccessible(),
@@ -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
@@ -1,95 +1,149 @@
1
- import { getWindowLocation, deepAccess } from '../src/utils.js';
2
- import { registerBidder } from '../src/adapters/bidderFactory.js';
3
- import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
4
- import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
1
+ import {registerBidder} from '../src/adapters/bidderFactory.js';
2
+ import {BANNER, VIDEO} from '../src/mediaTypes.js';
3
+ import {ortbConverter} from '../libraries/ortbConverter/converter.js';
4
+ import {deepAccess, mergeDeep, convertTypes} from '../src/utils.js';
5
5
 
6
6
  const BIDDER_CODE = 'trafficgate';
7
- const URL = 'https://[HOST].bc-plugin.com/?c=o&m=multi'
7
+ const URL = 'https://[HOST].bc-plugin.com/prebidjs'
8
8
 
9
9
  export const spec = {
10
10
  code: BIDDER_CODE,
11
- supportedMediaTypes: [BANNER, VIDEO, NATIVE],
11
+ supportedMediaTypes: [BANNER, VIDEO],
12
+ isBidRequestValid,
13
+ buildRequests,
14
+ interpretResponse,
15
+ transformBidParams,
16
+ isBannerBid
17
+ };
12
18
 
13
- isBidRequestValid: function (bid) {
14
- return !!(bid.bidId && bid.params && parseInt(bid.params.placementId) && bid.params.host)
15
- },
16
- /**
17
- * Make a server request from the list of BidRequests.
18
- *
19
- * @param {BidRequest[]} validBidRequests A non-empty list of valid bid requests that should be sent to the Server.
20
- * @return ServerRequest Info describing the request to the server.
21
- */
22
- buildRequests: function (validBidRequests) {
23
- // convert Native ORTB definition to old-style prebid native definition
24
- validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
25
- if (validBidRequests && validBidRequests.length === 0) return [];
26
-
27
- const location = getWindowLocation()
28
- const placements = []
29
-
30
- validBidRequests.forEach((bidReq) => {
31
- placements.push({
32
- placementId: bidReq.params.placementId,
33
- bidId: bidReq.bidId,
34
- traffic: getMediatype(bidReq)
35
- })
36
- })
19
+ registerBidder(spec)
37
20
 
38
- return {
39
- method: 'POST',
40
- url: URL.replace('[HOST]', validBidRequests[0].params.host),
41
- data: {
42
- language: (navigator && navigator.language) ? navigator.language : '',
43
- secure: +(location.protocol === 'https:'),
44
- host: location.hostname,
45
- page: location.pathname,
46
- placements: placements
21
+ const converter = ortbConverter({
22
+ context: {
23
+ netRevenue: true,
24
+ ttl: 300
25
+ },
26
+ imp(buildImp, bidRequest, context) {
27
+ const imp = buildImp(bidRequest, context);
28
+ mergeDeep(imp, {
29
+ ext: {
30
+ bidder: {
31
+ placementId: bidRequest.params.placementId,
32
+ host: bidRequest.params.host
33
+ }
47
34
  }
35
+ });
36
+ if (bidRequest.params.customFloor && !imp.bidfloor) {
37
+ imp.bidfloor = bidRequest.params.customFloor;
48
38
  }
39
+ return imp;
49
40
  },
50
-
51
- interpretResponse: function (opts) {
52
- const body = opts.body
53
- const response = []
54
-
55
- for (let i = 0; i < body.length; i++) {
56
- const item = body[i]
57
- if (isBidResponseValid(item)) {
58
- response.push(item)
41
+ request(buildRequest, imps, bidderRequest, context) {
42
+ const req = buildRequest(imps, bidderRequest, context);
43
+ mergeDeep(req, {
44
+ at: 1,
45
+ })
46
+ const bid = context.bidRequests[0];
47
+ if (bid.params.test) {
48
+ req.test = 1
49
+ }
50
+ return req;
51
+ },
52
+ bidResponse(buildBidResponse, bid, context) {
53
+ const bidResponse = buildBidResponse(bid, context);
54
+ if (bid.ext) {
55
+ bidResponse.meta.networkId = bid.ext.networkId;
56
+ bidResponse.meta.advertiserDomains = bid.ext.advertiserDomains;
57
+ }
58
+ return bidResponse;
59
+ },
60
+ response(buildResponse, bidResponses, ortbResponse, context) {
61
+ const response = buildResponse(bidResponses, ortbResponse, context);
62
+ return response.bids
63
+ },
64
+ overrides: {
65
+ imp: {
66
+ bidfloor(setBidFloor, imp, bidRequest, context) {
67
+ const floor = {};
68
+ setBidFloor(floor, bidRequest, {...context, currency: 'USD'});
69
+ if (floor.bidfloorcur === 'USD') {
70
+ Object.assign(imp, floor);
71
+ }
72
+ },
73
+ video(orig, imp, bidRequest, context) {
74
+ if (FEATURES.VIDEO) {
75
+ let videoParams = bidRequest.mediaTypes[VIDEO];
76
+ if (videoParams) {
77
+ videoParams = Object.assign({}, videoParams, bidRequest.params.video);
78
+ bidRequest = {...bidRequest, mediaTypes: {[VIDEO]: videoParams}}
79
+ }
80
+ orig(imp, bidRequest, context);
81
+ if (imp.video && videoParams?.context === 'outstream') {
82
+ imp.video.placement = imp.video.placement || 4;
83
+ }
84
+ }
59
85
  }
60
86
  }
61
-
62
- return response
63
87
  }
64
- }
88
+ });
65
89
 
66
- registerBidder(spec)
90
+ function transformBidParams(params, isOpenRtb) {
91
+ return convertTypes({
92
+ 'customFloor': 'number',
93
+ 'placementId': 'number',
94
+ 'host': 'string'
95
+ }, params);
96
+ }
67
97
 
68
- function isBidResponseValid (bid) {
69
- if (!bid.requestId || !bid.cpm || !bid.creativeId ||
70
- !bid.ttl || !bid.currency) {
98
+ function isBidRequestValid(bidRequest) {
99
+ const isValid = bidRequest.params.placementId && bidRequest.params.host;
100
+ if (!isValid) {
71
101
  return false
72
102
  }
73
- switch (bid['mediaType']) {
74
- case BANNER:
75
- return Boolean(bid.width && bid.height && bid.ad)
76
- case VIDEO:
77
- return Boolean(bid.vastUrl)
78
- case NATIVE:
79
- return Boolean(bid.title && bid.image && bid.impressionTrackers)
80
- default:
81
- return false
103
+ if (isBannerBid(bidRequest)) {
104
+ return deepAccess(bidRequest, 'mediaTypes.banner.sizes.length') > 0;
82
105
  }
106
+ return true
83
107
  }
84
108
 
85
- function getMediatype(bidRequest) {
86
- if (deepAccess(bidRequest, 'mediaTypes.banner')) {
87
- return BANNER;
88
- }
89
- if (deepAccess(bidRequest, 'mediaTypes.video')) {
90
- return VIDEO;
109
+ function buildRequests(bids, bidderRequest) {
110
+ let videoBids = bids.filter(bid => isVideoBid(bid));
111
+ let bannerBids = bids.filter(bid => isBannerBid(bid));
112
+ let requests = bannerBids.length ? [createRequest(bannerBids, bidderRequest, BANNER)] : [];
113
+ videoBids.forEach(bid => {
114
+ requests.push(createRequest([bid], bidderRequest, VIDEO));
115
+ });
116
+ return requests;
117
+ }
118
+
119
+ function createRequest(bidRequests, bidderRequest, mediaType) {
120
+ return {
121
+ method: 'POST',
122
+ url: URL.replace('[HOST]', bidRequests[0].params.host),
123
+ data: converter.toORTB({bidRequests, bidderRequest, context: {mediaType}})
91
124
  }
92
- if (deepAccess(bidRequest, 'mediaTypes.native')) {
93
- return NATIVE;
125
+ }
126
+
127
+ function isVideoBid(bid) {
128
+ return !!deepAccess(bid, 'mediaTypes.video');
129
+ }
130
+
131
+ function isBannerBid(bid) {
132
+ return !!deepAccess(bid, 'mediaTypes.banner');
133
+ }
134
+
135
+ function interpretResponse(resp, req) {
136
+ if (!resp.body) {
137
+ resp.body = {nbr: 0};
94
138
  }
139
+ return converter.fromORTB({request: req.data, response: resp.body});
140
+ }
141
+
142
+ export const spec2 = {
143
+ code: BIDDER_CODE,
144
+ supportedMediaTypes: [BANNER, VIDEO],
145
+
146
+ isBidRequestValid: function (bid) {
147
+ return !!(bid.bidId && bid.params && parseInt(bid.params.placementId) && bid.params.host)
148
+ },
95
149
  }
@@ -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
  });
@@ -1,4 +1,4 @@
1
- import {_each, deepAccess, parseSizesInput, parseUrl, uniques, isFn} from '../src/utils.js';
1
+ import {_each, chunk, deepAccess, isFn, parseSizesInput, parseUrl, uniques, isArray} from '../src/utils.js';
2
2
  import {registerBidder} from '../src/adapters/bidderFactory.js';
3
3
  import {BANNER, VIDEO} from '../src/mediaTypes.js';
4
4
  import {getStorageManager} from '../src/storageManager.js';
@@ -48,7 +48,7 @@ function isBidRequestValid(bid) {
48
48
  return !!(extractCID(params) && extractPID(params));
49
49
  }
50
50
 
51
- function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
51
+ function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
52
52
  const {
53
53
  params,
54
54
  bidId,
@@ -56,7 +56,6 @@ function buildRequest(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,
@@ -69,9 +68,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
69
68
  const dealId = getNextDealId(hashUrl);
70
69
  const uniqueDealId = getUniqueDealId(hashUrl);
71
70
  const sId = getVidazooSessionId();
72
- const cId = extractCID(params);
73
71
  const pId = extractPID(params);
74
- const subDomain = extractSubDomain(params);
75
72
  const ptrace = getCacheOpt();
76
73
  const isStorageAllowed = bidderSettings.get(BIDDER_CODE, 'storageAllowed');
77
74
 
@@ -114,8 +111,6 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
114
111
  gpid: gpid,
115
112
  cat: cat,
116
113
  pagecat: pagecat,
117
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
118
- auctionId: auctionId,
119
114
  transactionId: ortb2Imp?.ext?.tid,
120
115
  bidderRequestId: bidderRequestId,
121
116
  bidRequestsCount: bidRequestsCount,
@@ -153,17 +148,46 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
153
148
  data.gppSid = bidderRequest.ortb2.regs.gpp_sid;
154
149
  }
155
150
 
151
+ _each(ext, (value, key) => {
152
+ data['ext.' + key] = value;
153
+ });
154
+
155
+ return data;
156
+ }
157
+
158
+ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
159
+ const {params} = bid;
160
+ const cId = extractCID(params);
161
+ const subDomain = extractSubDomain(params);
162
+ const data = buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout);
156
163
  const dto = {
157
164
  method: 'POST',
158
165
  url: `${createDomain(subDomain)}/prebid/multi/${cId}`,
159
166
  data: data
160
167
  };
168
+ return dto;
169
+ }
161
170
 
162
- _each(ext, (value, key) => {
163
- dto.data['ext.' + key] = value;
171
+ function buildSingleRequest(bidRequests, bidderRequest, topWindowUrl, bidderTimeout) {
172
+ const {params} = bidRequests[0];
173
+ const cId = extractCID(params);
174
+ const subDomain = extractSubDomain(params);
175
+ const data = bidRequests.map(bid => {
176
+ const sizes = parseSizesInput(bid.sizes);
177
+ return buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout)
178
+ });
179
+ const chunkSize = Math.min(20, config.getConfig('vidazoo.chunkSize') || 10);
180
+
181
+ const chunkedData = chunk(data, chunkSize);
182
+ return chunkedData.map(chunk => {
183
+ return {
184
+ method: 'POST',
185
+ url: `${createDomain(subDomain)}/prebid/multi/${cId}`,
186
+ data: {
187
+ bids: chunk
188
+ }
189
+ };
164
190
  });
165
-
166
- return dto;
167
191
  }
168
192
 
169
193
  function appendUserIdsToRequestPayload(payloadRef, userIds) {
@@ -193,12 +217,34 @@ function buildRequests(validBidRequests, bidderRequest) {
193
217
  // TODO: does the fallback make sense here?
194
218
  const topWindowUrl = bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation;
195
219
  const bidderTimeout = config.getConfig('bidderTimeout');
220
+
221
+ const singleRequestMode = config.getConfig('vidazoo.singleRequest');
222
+
196
223
  const requests = [];
197
- validBidRequests.forEach(validBidRequest => {
198
- const sizes = parseSizesInput(validBidRequest.sizes);
199
- const request = buildRequest(validBidRequest, topWindowUrl, sizes, bidderRequest, bidderTimeout);
200
- requests.push(request);
201
- });
224
+
225
+ if (singleRequestMode) {
226
+ // banner bids are sent as a single request
227
+ const bannerBidRequests = validBidRequests.filter(bid => isArray(bid.mediaTypes) ? bid.mediaTypes.includes(BANNER) : bid.mediaTypes[BANNER] !== undefined);
228
+ if (bannerBidRequests.length > 0) {
229
+ const singleRequests = buildSingleRequest(bannerBidRequests, bidderRequest, topWindowUrl, bidderTimeout);
230
+ requests.push(...singleRequests);
231
+ }
232
+
233
+ // video bids are sent as a single request for each bid
234
+
235
+ const videoBidRequests = validBidRequests.filter(bid => bid.mediaTypes[VIDEO] !== undefined);
236
+ videoBidRequests.forEach(validBidRequest => {
237
+ const sizes = parseSizesInput(validBidRequest.sizes);
238
+ const request = buildRequest(validBidRequest, topWindowUrl, sizes, bidderRequest, bidderTimeout);
239
+ requests.push(request);
240
+ });
241
+ } else {
242
+ validBidRequests.forEach(validBidRequest => {
243
+ const sizes = parseSizesInput(validBidRequest.sizes);
244
+ const request = buildRequest(validBidRequest, topWindowUrl, sizes, bidderRequest, bidderTimeout);
245
+ requests.push(request);
246
+ });
247
+ }
202
248
  return requests;
203
249
  }
204
250
 
@@ -206,13 +252,15 @@ function interpretResponse(serverResponse, request) {
206
252
  if (!serverResponse || !serverResponse.body) {
207
253
  return [];
208
254
  }
209
- const {bidId} = request.data;
255
+
256
+ const singleRequestMode = config.getConfig('vidazoo.singleRequest');
257
+ const reqBidId = deepAccess(request, 'data.bidId');
210
258
  const {results} = serverResponse.body;
211
259
 
212
260
  let output = [];
213
261
 
214
262
  try {
215
- results.forEach(result => {
263
+ results.forEach((result, i) => {
216
264
  const {
217
265
  creativeId,
218
266
  ad,
@@ -221,6 +269,7 @@ function interpretResponse(serverResponse, request) {
221
269
  width,
222
270
  height,
223
271
  currency,
272
+ bidId,
224
273
  advertiserDomains,
225
274
  metaData,
226
275
  mediaType = BANNER
@@ -230,7 +279,7 @@ function interpretResponse(serverResponse, request) {
230
279
  }
231
280
 
232
281
  const response = {
233
- requestId: bidId,
282
+ requestId: (singleRequestMode && bidId) ? bidId : reqBidId,
234
283
  cpm: price,
235
284
  width: width,
236
285
  height: height,
@@ -264,6 +313,7 @@ function interpretResponse(serverResponse, request) {
264
313
  }
265
314
  output.push(response);
266
315
  });
316
+
267
317
  return output;
268
318
  } catch (e) {
269
319
  return [];