prebid.js 7.45.0 → 7.47.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 (204) 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/admaticBidAdapter.js +1 -1
  7. package/dist/adnuntiusBidAdapter.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/bidwatchAnalyticsAdapter.js +1 -1
  21. package/dist/big-richmediaBidAdapter.js +1 -1
  22. package/dist/bridgewellBidAdapter.js +1 -1
  23. package/dist/brightMountainMediaBidAdapter.js +1 -1
  24. package/dist/carodaBidAdapter.js +1 -1
  25. package/dist/chtnwBidAdapter.js +1 -1
  26. package/dist/concertBidAdapter.js +1 -1
  27. package/dist/connectadBidAdapter.js +1 -1
  28. package/dist/consumableBidAdapter.js +1 -1
  29. package/dist/conversantAnalyticsAdapter.js +1 -1
  30. package/dist/conversantBidAdapter.js +1 -1
  31. package/dist/craftBidAdapter.js +1 -1
  32. package/dist/criteoBidAdapter.js +1 -1
  33. package/dist/criteoIdSystem.js +1 -1
  34. package/dist/cwireBidAdapter.js +1 -1
  35. package/dist/debugging-standalone.js +1 -1
  36. package/dist/dependencies.json +3 -0
  37. package/dist/dspxBidAdapter.js +1 -1
  38. package/dist/emtvBidAdapter.js +1 -0
  39. package/dist/eplanningBidAdapter.js +1 -1
  40. package/dist/eskimiBidAdapter.js +1 -0
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/freewheel-sspBidAdapter.js +1 -1
  44. package/dist/glimpseBidAdapter.js +1 -1
  45. package/dist/gmosspBidAdapter.js +1 -1
  46. package/dist/goldbachBidAdapter.js +1 -1
  47. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  48. package/dist/gridBidAdapter.js +1 -1
  49. package/dist/gumgumBidAdapter.js +1 -1
  50. package/dist/h12mediaBidAdapter.js +1 -1
  51. package/dist/id5IdSystem.js +1 -1
  52. package/dist/improvedigitalBidAdapter.js +1 -1
  53. package/dist/inmarBidAdapter.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/liveyieldAnalyticsAdapter.js +1 -1
  65. package/dist/logicadBidAdapter.js +1 -1
  66. package/dist/loglyliftBidAdapter.js +1 -1
  67. package/dist/magniteAnalyticsAdapter.js +1 -1
  68. package/dist/malltvAnalyticsAdapter.js +1 -1
  69. package/dist/marsmediaBidAdapter.js +1 -1
  70. package/dist/mediafuseBidAdapter.js +1 -1
  71. package/dist/mediasquareBidAdapter.js +1 -1
  72. package/dist/mgidBidAdapter.js +1 -1
  73. package/dist/minutemediaBidAdapter.js +1 -1
  74. package/dist/minutemediaplusBidAdapter.js +1 -1
  75. package/dist/missenaBidAdapter.js +1 -1
  76. package/dist/nativoBidAdapter.js +1 -1
  77. package/dist/neuwoRtdProvider.js +1 -1
  78. package/dist/nextMillenniumBidAdapter.js +1 -1
  79. package/dist/nexx360BidAdapter.js +1 -1
  80. package/dist/not-for-prod/prebid.js +137 -135
  81. package/dist/oguryBidAdapter.js +1 -1
  82. package/dist/onetagBidAdapter.js +1 -1
  83. package/dist/ooloAnalyticsAdapter.js +1 -1
  84. package/dist/optidigitalBidAdapter.js +1 -1
  85. package/dist/ortbConverter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/pairIdSystem.js +1 -0
  88. package/dist/parrableIdSystem.js +1 -1
  89. package/dist/pixfutureBidAdapter.js +1 -1
  90. package/dist/prebid-core.js +1 -1
  91. package/dist/publinkIdSystem.js +1 -1
  92. package/dist/pubmaticBidAdapter.js +1 -1
  93. package/dist/pubwiseAnalyticsAdapter.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/rhythmoneBidAdapter.js +1 -1
  99. package/dist/riseBidAdapter.js +1 -1
  100. package/dist/rtbhouseBidAdapter.js +1 -1
  101. package/dist/rubiconAnalyticsAdapter.js +1 -1
  102. package/dist/rubiconBidAdapter.js +1 -1
  103. package/dist/seedingAllianceBidAdapter.js +1 -1
  104. package/dist/seedtagBidAdapter.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/smilewantedBidAdapter.js +1 -1
  112. package/dist/sonobiBidAdapter.js +1 -1
  113. package/dist/sovrnAnalyticsAdapter.js +1 -1
  114. package/dist/sovrnBidAdapter.js +1 -1
  115. package/dist/sspBCBidAdapter.js +1 -1
  116. package/dist/stvBidAdapter.js +1 -1
  117. package/dist/sublimeBidAdapter.js +1 -1
  118. package/dist/synacormediaBidAdapter.js +1 -1
  119. package/dist/targetVideoBidAdapter.js +1 -1
  120. package/dist/teadsBidAdapter.js +1 -1
  121. package/dist/trionBidAdapter.js +1 -1
  122. package/dist/tripleliftBidAdapter.js +1 -1
  123. package/dist/ttdBidAdapter.js +1 -1
  124. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  125. package/dist/uid2IdSystem.js +1 -1
  126. package/dist/underdogmediaBidAdapter.js +1 -1
  127. package/dist/undertoneBidAdapter.js +1 -1
  128. package/dist/userId.js +1 -1
  129. package/dist/vidazooBidAdapter.js +1 -1
  130. package/dist/videobyteBidAdapter.js +1 -1
  131. package/dist/vidoomyBidAdapter.js +1 -1
  132. package/dist/visxBidAdapter.js +1 -1
  133. package/dist/vuukleBidAdapter.js +1 -1
  134. package/dist/widespaceBidAdapter.js +1 -1
  135. package/dist/winrBidAdapter.js +1 -1
  136. package/dist/yahoosspBidAdapter.js +1 -1
  137. package/dist/yieldmoBidAdapter.js +1 -1
  138. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  139. package/integrationExamples/gpt/fledge_example.html +103 -0
  140. package/integrationExamples/gpt/prebidServer_fledge_example.html +111 -0
  141. package/libraries/ortbConverter/processors/video.js +1 -0
  142. package/modules/admaticBidAdapter.js +7 -2
  143. package/modules/adnuntiusBidAdapter.js +3 -1
  144. package/modules/appnexusBidAdapter.js +108 -102
  145. package/modules/bidwatchAnalyticsAdapter.js +2 -0
  146. package/modules/conversantBidAdapter.js +3 -0
  147. package/modules/criteoBidAdapter.js +5 -1
  148. package/modules/criteoIdSystem.js +27 -14
  149. package/modules/emtvBidAdapter.js +211 -0
  150. package/modules/emtvBidAdapter.md +79 -0
  151. package/modules/eskimiBidAdapter.js +72 -0
  152. package/modules/eskimiBidAdapter.md +34 -0
  153. package/modules/gridBidAdapter.js +42 -19
  154. package/modules/ixBidAdapter.js +30 -0
  155. package/modules/kargoBidAdapter.js +473 -246
  156. package/modules/kueezRtbBidAdapter.js +16 -4
  157. package/modules/mediasquareBidAdapter.js +2 -1
  158. package/modules/minutemediaplusBidAdapter.js +16 -4
  159. package/modules/missenaBidAdapter.js +1 -1
  160. package/modules/nativoBidAdapter.js +110 -21
  161. package/modules/neuwoRtdProvider.js +0 -2
  162. package/modules/nextMillenniumBidAdapter.js +2 -0
  163. package/modules/pairIdSystem.js +79 -0
  164. package/modules/pubmaticBidAdapter.js +12 -9
  165. package/modules/rtbhouseBidAdapter.js +3 -3
  166. package/modules/userId/eids.js +6 -0
  167. package/modules/vidoomyBidAdapter.js +30 -9
  168. package/modules/vidoomyBidAdapter.md +12 -2
  169. package/modules/yieldmoBidAdapter.js +15 -5
  170. package/package.json +1 -1
  171. package/src/config.js +78 -127
  172. package/test/spec/modules/1plusXRtdProvider_spec.js +8 -7
  173. package/test/spec/modules/adagioBidAdapter_spec.js +0 -25
  174. package/test/spec/modules/admaticBidAdapter_spec.js +1 -1
  175. package/test/spec/modules/adnuntiusBidAdapter_spec.js +2 -1
  176. package/test/spec/modules/appnexusBidAdapter_spec.js +464 -448
  177. package/test/spec/modules/axonixBidAdapter_spec.js +0 -27
  178. package/test/spec/modules/big-richmediaBidAdapter_spec.js +68 -64
  179. package/test/spec/modules/conversantBidAdapter_spec.js +1 -0
  180. package/test/spec/modules/criteoBidAdapter_spec.js +33 -1
  181. package/test/spec/modules/criteoIdSystem_spec.js +99 -9
  182. package/test/spec/modules/emtvBidAdapter_spec.js +400 -0
  183. package/test/spec/modules/eskimiBidAdapter_spec.js +155 -0
  184. package/test/spec/modules/gridBidAdapter_spec.js +8 -0
  185. package/test/spec/modules/ixBidAdapter_spec.js +57 -0
  186. package/test/spec/modules/kargoBidAdapter_spec.js +297 -140
  187. package/test/spec/modules/kueezRtbBidAdapter_spec.js +22 -2
  188. package/test/spec/modules/minutemediaplusBidAdapter_spec.js +22 -2
  189. package/test/spec/modules/nativoBidAdapter_spec.js +101 -0
  190. package/test/spec/modules/neuwoRtdProvider_spec.js +0 -1
  191. package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
  192. package/test/spec/modules/pairIdSystem_spec.js +68 -0
  193. package/test/spec/modules/pubCommonId_spec.js +0 -17
  194. package/test/spec/modules/pubmaticBidAdapter_spec.js +868 -867
  195. package/test/spec/modules/realvuAnalyticsAdapter_spec.js +0 -5
  196. package/test/spec/modules/rtbhouseBidAdapter_spec.js +2 -2
  197. package/test/spec/modules/vidoomyBidAdapter_spec.js +72 -0
  198. package/test/spec/modules/yieldmoBidAdapter_spec.js +19 -1
  199. package/test/spec/unit/pbjs_api_spec.js +19 -3
  200. package/test/test_index.js +13 -3
  201. package/dist/gridNMBidAdapter.js +0 -1
  202. package/modules/gridNMBidAdapter.js +0 -422
  203. package/modules/gridNMBidAdapter.md +0 -39
  204. package/test/spec/modules/gridNMBidAdapter_spec.js +0 -636
@@ -77,6 +77,8 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
77
77
  const pId = extractPID(params);
78
78
  const subDomain = extractSubDomain(params);
79
79
 
80
+ const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid', deepAccess(bid, 'ortb2Imp.ext.data.pbadslot', ''));
81
+
80
82
  if (isFn(bid.getFloor)) {
81
83
  const floorInfo = bid.getFloor({
82
84
  currency: 'USD',
@@ -105,6 +107,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
105
107
  res: `${screen.width}x${screen.height}`,
106
108
  schain: schain,
107
109
  mediaTypes: mediaTypes,
110
+ gpid: gpid,
108
111
  auctionId: auctionId,
109
112
  transactionId: transactionId,
110
113
  bidderRequestId: bidderRequestId,
@@ -204,7 +207,7 @@ function interpretResponse(serverResponse, request) {
204
207
 
205
208
  try {
206
209
  results.forEach(result => {
207
- const {creativeId, ad, price, exp, width, height, currency, advertiserDomains, mediaType = BANNER} = result;
210
+ const {creativeId, ad, price, exp, width, height, currency, metaData, advertiserDomains, mediaType = BANNER} = result;
208
211
  if (!ad || !price) {
209
212
  return;
210
213
  }
@@ -218,11 +221,20 @@ function interpretResponse(serverResponse, request) {
218
221
  currency: currency || CURRENCY,
219
222
  netRevenue: true,
220
223
  ttl: exp || TTL_SECONDS,
221
- meta: {
222
- advertiserDomains: advertiserDomains || []
223
- }
224
224
  };
225
225
 
226
+ if (metaData) {
227
+ Object.assign(response, {
228
+ meta: metaData
229
+ })
230
+ } else {
231
+ Object.assign(response, {
232
+ meta: {
233
+ advertiserDomains: advertiserDomains || []
234
+ }
235
+ })
236
+ }
237
+
226
238
  if (mediaType === BANNER) {
227
239
  Object.assign(response, {
228
240
  ad: ad,
@@ -4,6 +4,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
4
4
  import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
5
5
  import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
6
6
  import {Renderer} from '../src/Renderer.js';
7
+ import { getRefererInfo } from '../src/refererDetection.js';
7
8
 
8
9
  const BIDDER_CODE = 'mediasquare';
9
10
  const BIDDER_URL_PROD = 'https://pbs-front.mediasquare.fr/'
@@ -170,7 +171,7 @@ export const spec = {
170
171
  */
171
172
  onBidWon: function(bid) {
172
173
  // fires a pixel to confirm a winning bid
173
- let params = {'pbjs': '$prebid.version$'};
174
+ let params = { pbjs: '$prebid.version$', referer: encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation) };
174
175
  let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
175
176
  let paramsToSearchFor = ['cpm', 'size', 'mediaType', 'currency', 'creativeId', 'adUnitCode', 'timeToRespond', 'requestId', 'auctionId', 'originalCpm', 'originalCurrency'];
176
177
  if (bid.hasOwnProperty('mediasquare')) {
@@ -77,6 +77,8 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
77
77
  const pId = extractPID(params);
78
78
  const subDomain = extractSubDomain(params);
79
79
 
80
+ const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid', deepAccess(bid, 'ortb2Imp.ext.data.pbadslot', ''));
81
+
80
82
  if (isFn(bid.getFloor)) {
81
83
  const floorInfo = bid.getFloor({
82
84
  currency: 'USD',
@@ -105,6 +107,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
105
107
  res: `${screen.width}x${screen.height}`,
106
108
  schain: schain,
107
109
  mediaTypes: mediaTypes,
110
+ gpid: gpid,
108
111
  auctionId: auctionId,
109
112
  transactionId: transactionId,
110
113
  bidderRequestId: bidderRequestId,
@@ -204,7 +207,7 @@ function interpretResponse(serverResponse, request) {
204
207
 
205
208
  try {
206
209
  results.forEach(result => {
207
- const {creativeId, ad, price, exp, width, height, currency, advertiserDomains, mediaType = BANNER} = result;
210
+ const {creativeId, ad, price, exp, width, height, currency, metaData, advertiserDomains, mediaType = BANNER} = result;
208
211
  if (!ad || !price) {
209
212
  return;
210
213
  }
@@ -218,11 +221,20 @@ function interpretResponse(serverResponse, request) {
218
221
  currency: currency || CURRENCY,
219
222
  netRevenue: true,
220
223
  ttl: exp || TTL_SECONDS,
221
- meta: {
222
- advertiserDomains: advertiserDomains || []
223
- }
224
224
  };
225
225
 
226
+ if (metaData) {
227
+ Object.assign(response, {
228
+ meta: metaData
229
+ })
230
+ } else {
231
+ Object.assign(response, {
232
+ meta: {
233
+ advertiserDomains: advertiserDomains || []
234
+ }
235
+ })
236
+ }
237
+
226
238
  if (mediaType === BANNER) {
227
239
  Object.assign(response, {
228
240
  ad: ad,
@@ -8,7 +8,7 @@ const EVENTS_DOMAIN = 'events.missena.io';
8
8
  const EVENTS_DOMAIN_DEV = 'events.staging.missena.xyz';
9
9
 
10
10
  export const spec = {
11
- aliases: [BIDDER_CODE],
11
+ aliases: ['msna'],
12
12
  code: BIDDER_CODE,
13
13
  gvlid: 687,
14
14
  supportedMediaTypes: [BANNER],
@@ -1,6 +1,7 @@
1
1
  import { deepAccess, isEmpty } from '../src/utils.js'
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js'
3
3
  import { BANNER } from '../src/mediaTypes.js'
4
+ import { getGlobal } from '../src/prebidGlobal.js'
4
5
  // import { config } from 'src/config'
5
6
 
6
7
  const BIDDER_CODE = 'nativo'
@@ -14,6 +15,8 @@ const SUPPORTED_AD_TYPES = [BANNER]
14
15
  const FLOOR_PRICE_CURRENCY = 'USD'
15
16
  const PRICE_FLOOR_WILDCARD = '*'
16
17
 
18
+ const localPbjsRef = getGlobal()
19
+
17
20
  /**
18
21
  * Keep track of bid data by keys
19
22
  * @returns {Object} - Map of bid data that can be referenced by multiple keys
@@ -133,6 +136,9 @@ export const spec = {
133
136
  * @return ServerRequest Info describing the request to the server.
134
137
  */
135
138
  buildRequests: function (validBidRequests, bidderRequest) {
139
+ const requestData = new RequestData()
140
+ requestData.addBidRequestDataSource(new UserEIDs())
141
+
136
142
  // Parse values from bid requests
137
143
  const placementIds = new Set()
138
144
  const bidDataMap = BidDataMap()
@@ -166,6 +172,8 @@ export const spec = {
166
172
  if (bidRequestFloorPriceData) {
167
173
  floorPriceData[bidRequest.adUnitCode] = bidRequestFloorPriceData
168
174
  }
175
+
176
+ requestData.processBidRequestData(bidRequest, bidderRequest)
169
177
  })
170
178
  bidRequestMap[bidderRequest.bidderRequestId] = bidDataMap
171
179
 
@@ -174,6 +182,10 @@ export const spec = {
174
182
 
175
183
  // Build basic required QS Params
176
184
  let params = [
185
+ // Prebid version
186
+ {
187
+ key: 'ntv_pbv', value: localPbjsRef.version
188
+ },
177
189
  // Prebid request id
178
190
  { key: 'ntv_pb_rid', value: bidderRequest.bidderRequestId },
179
191
  // Ad unit data
@@ -255,9 +267,12 @@ export const spec = {
255
267
  params.unshift({ key: 'us_privacy', value: bidderRequest.uspConsent })
256
268
  }
257
269
 
270
+ const qsParamStrings = [requestData.getRequestDataQueryString(), arrayToQS(params)]
271
+ const requestUrl = buildRequestUrl(BIDDER_ENDPOINT, qsParamStrings)
272
+
258
273
  let serverRequest = {
259
274
  method: 'GET',
260
- url: BIDDER_ENDPOINT + arrayToQS(params),
275
+ url: requestUrl
261
276
  }
262
277
 
263
278
  return serverRequest
@@ -404,13 +419,6 @@ export const spec = {
404
419
  return syncs
405
420
  },
406
421
 
407
- /**
408
- * Will be called when an adpater timed out for an auction.
409
- * Adapter can fire a ajax or pixel call to register a timeout at thier end.
410
- * @param {Object} timeoutData - Timeout specific data
411
- */
412
- onTimeout: function (timeoutData) {},
413
-
414
422
  /**
415
423
  * Will be called when a bid from the adapter won the auction.
416
424
  * @param {Object} bid - The bid that won the auction
@@ -425,12 +433,6 @@ export const spec = {
425
433
  appendFilterData(campaignsToFilter, ext.campaignsToFilter)
426
434
  },
427
435
 
428
- /**
429
- * Will be called when the adserver targeting has been set for a bid from the adapter.
430
- * @param {Object} bidder - The bid of which the targeting has been set
431
- */
432
- onSetTargeting: function (bid) {},
433
-
434
436
  /**
435
437
  * Maps Prebid's bidId to Nativo's placementId values per unique bidderRequestId
436
438
  * @param {String} bidderRequestId - The unique ID value associated with the bidderRequest
@@ -451,6 +453,78 @@ export const spec = {
451
453
  registerBidder(spec)
452
454
 
453
455
  // Utils
456
+ export class RequestData {
457
+ constructor() {
458
+ this.bidRequestDataSources = []
459
+ }
460
+
461
+ addBidRequestDataSource(bidRequestDataSource) {
462
+ if (!(bidRequestDataSource instanceof BidRequestDataSource)) return
463
+
464
+ this.bidRequestDataSources.push(bidRequestDataSource)
465
+ }
466
+
467
+ processBidRequestData(bidRequest, bidderRequest) {
468
+ for (let bidRequestDataSource of this.bidRequestDataSources) {
469
+ bidRequestDataSource.processBidRequestData(bidRequest, bidderRequest)
470
+ }
471
+ }
472
+
473
+ getRequestDataQueryString() {
474
+ if (this.bidRequestDataSources.length == 0) return
475
+
476
+ const queryParams = this.bidRequestDataSources.map(dataSource => dataSource.getRequestQueryString()).filter(queryString => queryString !== '')
477
+ return queryParams.join('&')
478
+ }
479
+ }
480
+
481
+ export class BidRequestDataSource {
482
+ constructor() {
483
+ this.type = 'BidRequestDataSource'
484
+ }
485
+ processBidRequestData(bidRequest, bidderRequest) { }
486
+ getRequestQueryString() { return '' }
487
+ }
488
+
489
+ export class UserEIDs extends BidRequestDataSource {
490
+ constructor() {
491
+ super()
492
+ this.type = 'UserEIDs'
493
+ this.qsParam = new QueryStringParam('ntv_pb_eid')
494
+ this.eids = []
495
+ }
496
+
497
+ processBidRequestData(bidRequest, bidderRequest) {
498
+ if (bidRequest.userIdAsEids === undefined || this.eids.length > 0) return
499
+ this.eids = bidRequest.userIdAsEids
500
+ }
501
+
502
+ getRequestQueryString() {
503
+ if (this.eids.length === 0) return ''
504
+
505
+ const encodedValueArray = encodeToBase64(this.eids)
506
+ this.qsParam.value = encodedValueArray
507
+ return this.qsParam.toString()
508
+ }
509
+ }
510
+
511
+ export class QueryStringParam {
512
+ constructor(key, value) {
513
+ this.key = key
514
+ this.value = value
515
+ }
516
+ }
517
+
518
+ QueryStringParam.prototype.toString = function () {
519
+ return `${this.key}=${this.value}`
520
+ }
521
+
522
+ export function encodeToBase64(value) {
523
+ try {
524
+ return btoa(JSON.stringify(value))
525
+ } catch (err) { }
526
+ }
527
+
454
528
  export function parseFloorPriceData(bidRequest) {
455
529
  if (typeof bidRequest.getFloor !== 'function') return
456
530
 
@@ -589,12 +663,9 @@ function appendQSParamString(str, key, value) {
589
663
  * @returns
590
664
  */
591
665
  function arrayToQS(arr) {
592
- return (
593
- '?' +
594
- arr.reduce((value, obj) => {
595
- return appendQSParamString(value, obj.key, obj.value)
596
- }, '')
597
- )
666
+ return arr.reduce((value, obj) => {
667
+ return appendQSParamString(value, obj.key, obj.value)
668
+ }, '')
598
669
  }
599
670
 
600
671
  /**
@@ -615,6 +686,24 @@ function getLargestSize(sizes, method = area) {
615
686
  })
616
687
  }
617
688
 
689
+ /**
690
+ * Build the final request url
691
+ */
692
+ export function buildRequestUrl(baseUrl, qsParamStringArray = []) {
693
+ if (qsParamStringArray.length === 0 || !Array.isArray(qsParamStringArray)) return baseUrl
694
+
695
+ const nonEmptyQSParamStrings = qsParamStringArray.filter(qsParamString => qsParamString.trim() !== '')
696
+
697
+ if (nonEmptyQSParamStrings.length === 0) return baseUrl
698
+
699
+ let requestUrl = `${baseUrl}?${nonEmptyQSParamStrings[0]}`
700
+ for (let i = 1; i < nonEmptyQSParamStrings.length; i++) {
701
+ requestUrl += `&${nonEmptyQSParamStrings[i]}`
702
+ }
703
+
704
+ return requestUrl
705
+ }
706
+
618
707
  /**
619
708
  * Calculate the area
620
709
  * @param {Array} size - [width, height]
@@ -645,7 +734,7 @@ export function getPageUrlFromBidRequest(bidRequest) {
645
734
  try {
646
735
  const url = new URL(paramPageUrl)
647
736
  return url.href
648
- } catch (err) {}
737
+ } catch (err) { }
649
738
  }
650
739
 
651
740
  export function hasProtocol(url) {
@@ -7,7 +7,6 @@ import CONSTANTS from '../src/constants.json';
7
7
 
8
8
  export const DATA_PROVIDER = 'neuwo.ai';
9
9
  const SEGTAX_IAB = 6 // IAB - Content Taxonomy version 2
10
- const CATTAX_IAB = 6 // IAB Tech Lab Content Taxonomy 2.2
11
10
  const RESPONSE_IAB_TIER_1 = 'marketing_categories.iab_tier_1'
12
11
  const RESPONSE_IAB_TIER_2 = 'marketing_categories.iab_tier_2'
13
12
 
@@ -106,7 +105,6 @@ export function injectTopics(topics, bidsConfig) {
106
105
 
107
106
  // upgrade category taxonomy to IAB 2.2, inject result to page categories
108
107
  if (segment.length > 0) {
109
- addFragment(bidsConfig.ortb2Fragments.global, 'site.cattax', CATTAX_IAB)
110
108
  addFragment(bidsConfig.ortb2Fragments.global, 'site.pagecat', segment.map(s => s.id))
111
109
  }
112
110
 
@@ -31,6 +31,7 @@ const VIDEO_PARAMS = [
31
31
  'api', 'linearity', 'maxduration', 'mimes', 'minduration', 'placement',
32
32
  'playbackmethod', 'protocols', 'startdelay'
33
33
  ];
34
+ const GVLID = 1060;
34
35
 
35
36
  const sendingDataStatistic = initSendingDataStatistic();
36
37
  events.on(CONSTANTS.EVENTS.AUCTION_INIT, auctionInitHandler);
@@ -44,6 +45,7 @@ events.on(CONSTANTS.EVENTS.BID_WON, bidWonHandler);
44
45
  export const spec = {
45
46
  code: BIDDER_CODE,
46
47
  supportedMediaTypes: [BANNER, VIDEO],
48
+ gvlid: GVLID,
47
49
 
48
50
  isBidRequestValid: function(bid) {
49
51
  return !!(
@@ -0,0 +1,79 @@
1
+ /**
2
+ * This module adds PAIR Id to the User ID module
3
+ * The {@link module:modules/userId} module is required
4
+ * @module modules/pairIdSystem
5
+ * @requires module:modules/userId
6
+ */
7
+
8
+ import { submodule } from '../src/hook.js';
9
+ import {getStorageManager} from '../src/storageManager.js'
10
+ import { logError } from '../src/utils.js';
11
+ import {MODULE_TYPE_UID} from '../src/activities/modules.js';
12
+
13
+ const MODULE_NAME = 'pairId';
14
+ const PAIR_ID_KEY = 'pairId';
15
+ const DEFAULT_LIVERAMP_PAIR_ID_KEY = '_lr_pairId';
16
+
17
+ export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME});
18
+
19
+ function pairIdFromLocalStorage(key) {
20
+ return storage.localStorageIsEnabled ? storage.getDataFromLocalStorage(key) : null;
21
+ }
22
+
23
+ function pairIdFromCookie(key) {
24
+ return storage.cookiesAreEnabled ? storage.getCookie(key) : null;
25
+ }
26
+
27
+ /** @type {Submodule} */
28
+ export const pairIdSubmodule = {
29
+ /**
30
+ * used to link submodule with config
31
+ * @type {string}
32
+ */
33
+ name: MODULE_NAME,
34
+ /**
35
+ * decode the stored id value for passing to bid requests
36
+ * @function
37
+ * @param { string | undefined } value
38
+ * @returns {{pairId:string} | undefined }
39
+ */
40
+ decode(value) {
41
+ return value && Array.isArray(value) ? {'pairId': value} : undefined
42
+ },
43
+ /**
44
+ * performs action to obtain id and return a value in the callback's response argument
45
+ * @function
46
+ * @returns {id: string | undefined }
47
+ */
48
+ getId(config) {
49
+ const pairIdsString = pairIdFromLocalStorage(PAIR_ID_KEY) || pairIdFromCookie(PAIR_ID_KEY)
50
+ let ids = []
51
+ if (pairIdsString && typeof pairIdsString == 'string') {
52
+ try {
53
+ ids = ids.concat(JSON.parse(atob(pairIdsString)))
54
+ } catch (error) {
55
+ logError(error)
56
+ }
57
+ }
58
+
59
+ const configParams = (config && config.params) || {};
60
+ if (configParams && configParams.liveramp) {
61
+ let LRStorageLocation = configParams.liveramp.storageKey || DEFAULT_LIVERAMP_PAIR_ID_KEY
62
+ const liverampValue = pairIdFromLocalStorage(LRStorageLocation) || pairIdFromCookie(LRStorageLocation)
63
+ try {
64
+ const obj = JSON.parse(atob(liverampValue));
65
+ ids = ids.concat(obj.envelope);
66
+ } catch (error) {
67
+ logError(error)
68
+ }
69
+ }
70
+
71
+ if (ids.length == 0) {
72
+ logError('PairId not found.')
73
+ return undefined;
74
+ }
75
+ return {'id': ids};
76
+ }
77
+ };
78
+
79
+ submodule('userId', pairIdSubmodule);
@@ -534,7 +534,7 @@ function _createBannerRequest(bid) {
534
534
 
535
535
  export function checkVideoPlacement(videoData, adUnitCode) {
536
536
  // Check for video.placement property. If property is missing display log message.
537
- if (!deepAccess(videoData, 'placement')) {
537
+ if (FEATURES.VIDEO && !deepAccess(videoData, 'placement')) {
538
538
  logWarn(MSG_VIDEO_PLACEMENT_MISSING + ' for ' + adUnitCode);
539
539
  };
540
540
  }
@@ -543,7 +543,7 @@ function _createVideoRequest(bid) {
543
543
  var videoData = mergeDeep(deepAccess(bid.mediaTypes, 'video'), bid.params.video);
544
544
  var videoObj;
545
545
 
546
- if (videoData !== UNDEFINED) {
546
+ if (FEATURES.VIDEO && videoData !== UNDEFINED) {
547
547
  videoObj = {};
548
548
  checkVideoPlacement(videoData, bid.adUnitCode);
549
549
  for (var key in VIDEO_CUSTOM_PARAMS) {
@@ -673,7 +673,7 @@ function _createImpressionObject(bid) {
673
673
  isInvalidNativeRequest = false;
674
674
  }
675
675
  break;
676
- case VIDEO:
676
+ case FEATURES.VIDEO && VIDEO:
677
677
  videoObj = _createVideoRequest(bid);
678
678
  if (videoObj !== UNDEFINED) {
679
679
  impObj.video = videoObj;
@@ -709,7 +709,7 @@ function _createImpressionObject(bid) {
709
709
 
710
710
  return impObj.hasOwnProperty(BANNER) ||
711
711
  impObj.hasOwnProperty(NATIVE) ||
712
- impObj.hasOwnProperty(VIDEO) ? impObj : UNDEFINED;
712
+ (FEATURES.VIDEO && impObj.hasOwnProperty(VIDEO)) ? impObj : UNDEFINED;
713
713
  }
714
714
 
715
715
  function _addImpressionFPD(imp, bid) {
@@ -810,7 +810,7 @@ function _checkMediaType(bid, newBid) {
810
810
  var videoRegex = new RegExp(/VAST\s+version/);
811
811
  if (adm.indexOf('span class="PubAPIAd"') >= 0) {
812
812
  newBid.mediaType = BANNER;
813
- } else if (videoRegex.test(adm)) {
813
+ } else if (FEATURES.VIDEO && videoRegex.test(adm)) {
814
814
  newBid.mediaType = VIDEO;
815
815
  } else {
816
816
  try {
@@ -896,7 +896,10 @@ function _assignRenderer(newBid, request) {
896
896
  for (let bidderRequestBidsIndex = 0; bidderRequestBidsIndex < request.bidderRequest.bids.length; bidderRequestBidsIndex++) {
897
897
  if (request.bidderRequest.bids[bidderRequestBidsIndex].bidId === newBid.requestId) {
898
898
  bidParams = request.bidderRequest.bids[bidderRequestBidsIndex].params;
899
- context = request.bidderRequest.bids[bidderRequestBidsIndex].mediaTypes[VIDEO].context;
899
+
900
+ if (FEATURES.VIDEO) {
901
+ context = request.bidderRequest.bids[bidderRequestBidsIndex].mediaTypes[VIDEO].context;
902
+ }
900
903
  adUnitCode = request.bidderRequest.bids[bidderRequestBidsIndex].adUnitCode;
901
904
  }
902
905
  }
@@ -916,7 +919,7 @@ function _assignRenderer(newBid, request) {
916
919
  * @returns
917
920
  */
918
921
  export function assignDealTier(newBid, bid, request) {
919
- if (!bid?.ext?.prebiddealpriority) return;
922
+ if (!bid?.ext?.prebiddealpriority || !FEATURES.VIDEO) return;
920
923
  const bidRequest = getBidRequest(newBid.requestId, [request.bidderRequest]);
921
924
  const videoObj = deepAccess(bidRequest, 'mediaTypes.video');
922
925
  if (videoObj?.context != ADPOD) return;
@@ -999,7 +1002,7 @@ export const spec = {
999
1002
  return false;
1000
1003
  }
1001
1004
  // video ad validation
1002
- if (bid.hasOwnProperty('mediaTypes') && bid.mediaTypes.hasOwnProperty(VIDEO)) {
1005
+ if (FEATURES.VIDEO && bid.hasOwnProperty('mediaTypes') && bid.mediaTypes.hasOwnProperty(VIDEO)) {
1003
1006
  // bid.mediaTypes.video.mimes OR bid.params.video.mimes should be present and must be a non-empty array
1004
1007
  let mediaTypesVideoMimes = deepAccess(bid.mediaTypes, 'video.mimes');
1005
1008
  let paramsVideoMimes = deepAccess(bid, 'params.video.mimes');
@@ -1284,7 +1287,7 @@ export const spec = {
1284
1287
  switch (newBid.mediaType) {
1285
1288
  case BANNER:
1286
1289
  break;
1287
- case VIDEO:
1290
+ case FEATURES.VIDEO && VIDEO:
1288
1291
  newBid.width = bid.hasOwnProperty('w') ? bid.w : req.video.w;
1289
1292
  newBid.height = bid.hasOwnProperty('h') ? bid.h : req.video.h;
1290
1293
  newBid.vastXml = bid.adm;
@@ -479,7 +479,7 @@ function interpretNativeBid(serverBid) {
479
479
  function interpretNativeAd(adm) {
480
480
  const native = JSON.parse(adm).native;
481
481
  const result = {
482
- clickUrl: encodeURIComponent(native.link.url),
482
+ clickUrl: encodeURI(native.link.url),
483
483
  impressionTrackers: native.imptrackers
484
484
  };
485
485
  native.assets.forEach(asset => {
@@ -489,14 +489,14 @@ function interpretNativeAd(adm) {
489
489
  break;
490
490
  case OPENRTB.NATIVE.ASSET_ID.IMAGE:
491
491
  result.image = {
492
- url: encodeURIComponent(asset.img.url),
492
+ url: encodeURI(asset.img.url),
493
493
  width: asset.img.w,
494
494
  height: asset.img.h
495
495
  };
496
496
  break;
497
497
  case OPENRTB.NATIVE.ASSET_ID.ICON:
498
498
  result.icon = {
499
- url: encodeURIComponent(asset.img.url),
499
+ url: encodeURI(asset.img.url),
500
500
  width: asset.img.w,
501
501
  height: asset.img.h
502
502
  };
@@ -45,6 +45,12 @@ export const USER_IDS_CONFIG = {
45
45
  atype: 1
46
46
  },
47
47
 
48
+ // pairId
49
+ 'pairId': {
50
+ source: 'google.com',
51
+ atype: 571187
52
+ },
53
+
48
54
  // justId
49
55
  'justId': {
50
56
  source: 'justtag.com',
@@ -1,20 +1,21 @@
1
- import { logError, deepAccess, parseSizesInput } from '../src/utils.js';
1
+ import {deepAccess, logError, parseSizesInput} 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 {config} from '../src/config.js';
5
- import { Renderer } from '../src/Renderer.js';
6
- import { INSTREAM, OUTSTREAM } from '../src/video.js';
5
+ import {Renderer} from '../src/Renderer.js';
6
+ import {INSTREAM, OUTSTREAM} from '../src/video.js';
7
7
 
8
8
  const ENDPOINT = `https://d.vidoomy.com/api/rtbserver/prebid/`;
9
9
  const BIDDER_CODE = 'vidoomy';
10
10
  const GVLID = 380;
11
11
 
12
12
  const COOKIE_SYNC_FALLBACK_URLS = [
13
- 'https://x.bidswitch.net/sync?ssp=vidoomy',
14
- 'https://ib.adnxs.com/getuid?https%3A%2F%2Fa-prebid.vidoomy.com%2Fsetuid%3Fbidder%3Dadnxs%26gdpr%3D{{GDPR}}%26gdpr_consent%3D{{GDPR_CONSENT}}%26uid%3D%24UID',
13
+ 'https://x.bidswitch.net/sync?ssp=vidoomy&gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&us_privacy=',
15
14
  'https://pixel-sync.sitescout.com/dmp/pixelSync?nid=120&gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&redir=https%3A%2F%2Fa.vidoomy.com%2Fapi%2Frtbserver%2Fcookie%3Fi%3DCEN%26uid%3D%7BuserId%7D',
16
15
  'https://cm.adform.net/cookie?redirect_url=https%3A%2F%2Fa-prebid.vidoomy.com%2Fsetuid%3Fbidder%3Dadf%26gdpr%3D{{GDPR}}%26gdpr_consent%3D{{GDPR_CONSENT}}%26uid%3D%24UID',
17
- 'https://ups.analytics.yahoo.com/ups/58531/occ?gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}'
16
+ 'https://pixel.rubiconproject.com/exchange/sync.php?p=pbs-vidoomy&gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&us_privacy=',
17
+ 'https://rtb.openx.net/sync/prebid?gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&r=https%3A%2F%2Fa-prebid.vidoomy.com%2Fsetuid%3Fbidder%3Dopenx%26uid%3D$%7BUID%7D',
18
+ 'https://ads.pubmatic.com/AdServer/js/user_sync.html?gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&us_privacy=&predirect=https%3A%2F%2Fa-prebid.vidoomy.com%2Fsetuid%3Fbidder%3Dpubmatic%26gdpr%3D{{GDPR}}%26gdpr_consent%3D{{GDPR_CONSENT}}%26uid%3D'
18
19
  ];
19
20
 
20
21
  const isBidRequestValid = bid => {
@@ -128,6 +129,20 @@ const buildRequests = (validBidRequests, bidderRequest) => {
128
129
  const bidfloor = deepAccess(bid, `params.bidfloor`, 0);
129
130
  const floor = getBidFloor(bid, adType, sizes, bidfloor);
130
131
 
132
+ const ortb2 = bidderRequest.ortb2 || {
133
+ bcat: [],
134
+ badv: [],
135
+ bapp: [],
136
+ btype: [],
137
+ battr: []
138
+ };
139
+
140
+ let eids;
141
+ const userEids = deepAccess(bid, 'userIdAsEids');
142
+ if (Array.isArray(userEids) && userEids.length > 0) {
143
+ eids = JSON.stringify(userEids) || '';
144
+ }
145
+
131
146
  const queryParams = {
132
147
  id: bid.params.id,
133
148
  adtype: adType,
@@ -141,13 +156,19 @@ const buildRequests = (validBidRequests, bidderRequest) => {
141
156
  pid: bid.params.pid,
142
157
  requestId: bid.bidId,
143
158
  schain: serializeSupplyChainObj(bid.schain) || '',
159
+ eids: eids || '',
144
160
  bidfloor: floor,
145
161
  d: getDomainWithoutSubdomain(hostname), // 'vidoomy.com',
146
162
  // TODO: does the fallback make sense here?
147
163
  sp: encodeURIComponent(bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation),
148
164
  usp: bidderRequest.uspConsent || '',
149
165
  coppa: !!config.getConfig('coppa'),
150
- videoContext: videoContext || ''
166
+ videoContext: videoContext || '',
167
+ bcat: ortb2.bcat || bid.params.bcat || [],
168
+ badv: ortb2.badv || bid.params.badv || [],
169
+ bapp: ortb2.bapp || bid.params.bapp || [],
170
+ btype: ortb2.btype || bid.params.btype || [],
171
+ battr: ortb2.battr || bid.params.battr || []
151
172
  };
152
173
 
153
174
  if (bidderRequest.gdprConsent) {
@@ -253,7 +274,7 @@ const interpretResponse = (serverResponse, bidRequest) => {
253
274
  }
254
275
  };
255
276
 
256
- function getUserSyncs (syncOptions, responses, gdprConsent, uspConsent) {
277
+ function getUserSyncs(syncOptions, responses, gdprConsent, uspConsent) {
257
278
  if (syncOptions.iframeEnabled || syncOptions.pixelEnabled) {
258
279
  const pixelType = syncOptions.pixelEnabled ? 'image' : 'iframe';
259
280
  const urls = deepAccess(responses, '0.body.pixels') || COOKIE_SYNC_FALLBACK_URLS;
@@ -280,7 +301,7 @@ export const spec = {
280
301
 
281
302
  registerBidder(spec);
282
303
 
283
- function getDomainWithoutSubdomain (hostname) {
304
+ function getDomainWithoutSubdomain(hostname) {
284
305
  const parts = hostname.split('.');
285
306
  const newParts = [];
286
307
  for (let i = parts.length - 1; i >= 0; i--) {