prebid.js 9.6.0 → 9.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE.md +1 -1
  2. package/.github/release-drafter.yml +4 -0
  3. package/README.md +4 -4
  4. package/dist/33acrossAnalyticsAdapter.js +1 -1
  5. package/dist/33acrossBidAdapter.js +1 -1
  6. package/dist/33acrossIdSystem.js +1 -1
  7. package/dist/BTBidAdapter.js +1 -1
  8. package/dist/adagioAnalyticsAdapter.js +1 -1
  9. package/dist/adagioBidAdapter.js +1 -1
  10. package/dist/adagioUtils.js +1 -1
  11. package/dist/addefendBidAdapter.js +1 -1
  12. package/dist/adgenerationBidAdapter.js +1 -1
  13. package/dist/adlooxRtdProvider.js +1 -1
  14. package/dist/adqueryBidAdapter.js +1 -1
  15. package/dist/adrelevantisBidAdapter.js +1 -1
  16. package/dist/adstirBidAdapter.js +1 -1
  17. package/dist/adtrgtmeBidAdapter.js +1 -1
  18. package/dist/adxcgAnalyticsAdapter.js +1 -1
  19. package/dist/adxcgBidAdapter.js +1 -1
  20. package/dist/adyoulikeBidAdapter.js +1 -1
  21. package/dist/agmaAnalyticsAdapter.js +1 -1
  22. package/dist/ajaBidAdapter.js +1 -1
  23. package/dist/amxBidAdapter.js +1 -1
  24. package/dist/amxIdSystem.js +1 -1
  25. package/dist/appierAnalyticsAdapter.js +1 -1
  26. package/dist/appnexusBidAdapter.js +1 -1
  27. package/dist/asoBidAdapter.js +1 -1
  28. package/dist/axonixBidAdapter.js +1 -1
  29. package/dist/bidglassBidAdapter.js +1 -1
  30. package/dist/big-richmediaBidAdapter.js +1 -1
  31. package/dist/bridBidAdapter.js +1 -1
  32. package/dist/bridgewellBidAdapter.js +1 -1
  33. package/dist/brightMountainMediaBidAdapter.js +1 -1
  34. package/dist/carodaBidAdapter.js +1 -1
  35. package/dist/chtnwBidAdapter.js +1 -1
  36. package/dist/chunk-core.js +1 -1
  37. package/dist/cleanmedianetBidAdapter.js +1 -1
  38. package/dist/concertBidAdapter.js +1 -1
  39. package/dist/connectadBidAdapter.js +1 -1
  40. package/dist/connectionInfo.js +1 -0
  41. package/dist/consumableBidAdapter.js +1 -1
  42. package/dist/conversantAnalyticsAdapter.js +1 -1
  43. package/dist/conversantBidAdapter.js +1 -1
  44. package/dist/craftBidAdapter.js +1 -1
  45. package/dist/criteoBidAdapter.js +1 -1
  46. package/dist/cwireBidAdapter.js +1 -1
  47. package/dist/dailymotionBidAdapter.js +1 -1
  48. package/dist/dependencies.json +5 -1
  49. package/dist/docereeAdManagerBidAdapter.js +1 -1
  50. package/dist/dspxBidAdapter.js +1 -1
  51. package/dist/dxkultureBidAdapter.js +1 -1
  52. package/dist/eplanningBidAdapter.js +1 -1
  53. package/dist/euidIdSystem.js +1 -1
  54. package/dist/exadsBidAdapter.js +1 -1
  55. package/dist/feedadBidAdapter.js +1 -1
  56. package/dist/finativeBidAdapter.js +1 -1
  57. package/dist/freewheel-sspBidAdapter.js +1 -1
  58. package/dist/gamoshiBidAdapter.js +1 -1
  59. package/dist/gmosspBidAdapter.js +1 -1
  60. package/dist/goldbachBidAdapter.js +1 -1
  61. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  62. package/dist/greenbidsRtdProvider.js +1 -1
  63. package/dist/gridBidAdapter.js +1 -1
  64. package/dist/gumgumBidAdapter.js +1 -1
  65. package/dist/h12mediaBidAdapter.js +1 -1
  66. package/dist/hypelabBidAdapter.js +1 -1
  67. package/dist/id5AnalyticsAdapter.js +1 -1
  68. package/dist/id5IdSystem.js +1 -1
  69. package/dist/idImportLibrary.js +1 -1
  70. package/dist/imdsBidAdapter.js +1 -1
  71. package/dist/improvedigitalBidAdapter.js +1 -1
  72. package/dist/insticatorBidAdapter.js +1 -1
  73. package/dist/intentIqAnalyticsAdapter.js +1 -1
  74. package/dist/ixBidAdapter.js +1 -1
  75. package/dist/jixieBidAdapter.js +1 -1
  76. package/dist/justpremiumBidAdapter.js +1 -1
  77. package/dist/kargoBidAdapter.js +1 -1
  78. package/dist/kimberliteBidAdapter.js +1 -1
  79. package/dist/konduitAnalyticsAdapter.js +1 -1
  80. package/dist/kueezBidAdapter.js +1 -1
  81. package/dist/lassoBidAdapter.js +1 -1
  82. package/dist/lifestreetBidAdapter.js +1 -1
  83. package/dist/liveIntentIdSystem.js +1 -1
  84. package/dist/logicadBidAdapter.js +1 -1
  85. package/dist/loglyliftBidAdapter.js +1 -1
  86. package/dist/luceadBidAdapter.js +1 -1
  87. package/dist/mabidderBidAdapter.js +1 -1
  88. package/dist/magniteAnalyticsAdapter.js +1 -1
  89. package/dist/malltvAnalyticsAdapter.js +1 -1
  90. package/dist/marsmediaBidAdapter.js +1 -1
  91. package/dist/mediafuseBidAdapter.js +1 -1
  92. package/dist/medianetAnalyticsAdapter.js +1 -1
  93. package/dist/medianetBidAdapter.js +1 -1
  94. package/dist/mediasquareBidAdapter.js +1 -1
  95. package/dist/mgidBidAdapter.js +1 -1
  96. package/dist/missenaBidAdapter.js +1 -1
  97. package/dist/mobianRtdProvider.js +1 -1
  98. package/dist/nexx360BidAdapter.js +1 -1
  99. package/dist/nobidAnalyticsAdapter.js +1 -1
  100. package/dist/nobidBidAdapter.js +1 -1
  101. package/dist/not-for-prod/prebid.js +161 -158
  102. package/dist/oguryBidAdapter.js +1 -1
  103. package/dist/onetagBidAdapter.js +1 -1
  104. package/dist/ooloAnalyticsAdapter.js +1 -1
  105. package/dist/openxBidAdapter.js +1 -1
  106. package/dist/optidigitalBidAdapter.js +1 -1
  107. package/dist/orbidderBidAdapter.js +1 -1
  108. package/dist/ortbConverter.js +1 -1
  109. package/dist/outbrainBidAdapter.js +1 -1
  110. package/dist/ownadxBidAdapter.js +1 -0
  111. package/dist/pixfutureBidAdapter.js +1 -1
  112. package/dist/prismaBidAdapter.js +1 -1
  113. package/dist/publinkIdSystem.js +1 -1
  114. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  115. package/dist/pubmaticBidAdapter.js +1 -1
  116. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  117. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  118. package/dist/pxyzBidAdapter.js +1 -1
  119. package/dist/quantcastBidAdapter.js +1 -1
  120. package/dist/readpeakBidAdapter.js +1 -1
  121. package/dist/relaidoBidAdapter.js +1 -1
  122. package/dist/retailspotBidAdapter.js +1 -1
  123. package/dist/rhythmoneBidAdapter.js +1 -1
  124. package/dist/riseUtils.js +1 -1
  125. package/dist/rubiconBidAdapter.js +1 -1
  126. package/dist/seedingAllianceBidAdapter.js +1 -1
  127. package/dist/seedtagBidAdapter.js +1 -1
  128. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  129. package/dist/sharethroughBidAdapter.js +1 -1
  130. package/dist/smaatoBidAdapter.js +1 -1
  131. package/dist/smartadserverBidAdapter.js +1 -1
  132. package/dist/smartxBidAdapter.js +1 -1
  133. package/dist/smilewantedBidAdapter.js +1 -1
  134. package/dist/snigelBidAdapter.js +1 -1
  135. package/dist/sonobiBidAdapter.js +1 -1
  136. package/dist/sovrnBidAdapter.js +1 -1
  137. package/dist/sspBCBidAdapter.js +1 -1
  138. package/dist/stvBidAdapter.js +1 -1
  139. package/dist/sublimeBidAdapter.js +1 -1
  140. package/dist/taboolaBidAdapter.js +1 -1
  141. package/dist/tappxBidAdapter.js +1 -1
  142. package/dist/targetVideoBidAdapter.js +1 -1
  143. package/dist/teadsBidAdapter.js +1 -1
  144. package/dist/terceptAnalyticsAdapter.js +1 -1
  145. package/dist/themoneytizerBidAdapter.js +1 -1
  146. package/dist/trionBidAdapter.js +1 -1
  147. package/dist/tripleliftBidAdapter.js +1 -1
  148. package/dist/ttdBidAdapter.js +1 -1
  149. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  150. package/dist/uid2IdSystem.js +1 -1
  151. package/dist/underdogmediaBidAdapter.js +1 -1
  152. package/dist/undertoneBidAdapter.js +1 -1
  153. package/dist/unrulyBidAdapter.js +1 -1
  154. package/dist/viantOrtbBidAdapter.js +1 -1
  155. package/dist/vidazooUtils.js +1 -1
  156. package/dist/videobyteBidAdapter.js +1 -1
  157. package/dist/visxBidAdapter.js +1 -1
  158. package/dist/vuukleBidAdapter.js +1 -1
  159. package/dist/widespaceBidAdapter.js +1 -1
  160. package/dist/winrBidAdapter.js +1 -1
  161. package/dist/wurflRtdProvider.js +1 -0
  162. package/dist/yahooAdsBidAdapter.js +1 -1
  163. package/dist/yieldmoBidAdapter.js +1 -1
  164. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  165. package/integrationExamples/gpt/wurflRtdProvider_example.html +106 -0
  166. package/libraries/connectionInfo/connectionUtils.js +33 -0
  167. package/libraries/ortbConverter/processors/video.js +2 -24
  168. package/libraries/riseUtils/index.js +2 -1
  169. package/libraries/vidazooUtils/bidderUtils.js +16 -0
  170. package/modules/.submodules.json +3 -1
  171. package/modules/51DegreesRtdProvider.md +11 -7
  172. package/modules/adagioBidAdapter.js +10 -50
  173. package/modules/appnexusBidAdapter.js +1 -1
  174. package/modules/cleanmedianetBidAdapter.js +1 -1
  175. package/modules/dailymotionBidAdapter.js +19 -0
  176. package/modules/docereeAdManagerBidAdapter.js +9 -12
  177. package/modules/gamoshiBidAdapter.js +1 -1
  178. package/modules/greenbidsAnalyticsAdapter.js +7 -4
  179. package/modules/greenbidsRtdProvider.js +15 -5
  180. package/modules/id5IdSystem.js +14 -93
  181. package/modules/idImportLibrary.js +14 -6
  182. package/modules/mobianRtdProvider.js +28 -14
  183. package/modules/ownadxBidAdapter.js +99 -0
  184. package/modules/prismaBidAdapter.js +1 -27
  185. package/modules/pubmaticBidAdapter.js +2 -1
  186. package/modules/sharethroughBidAdapter.js +5 -0
  187. package/modules/ttdBidAdapter.js +14 -32
  188. package/modules/viantOrtbBidAdapter.js +1 -1
  189. package/modules/wurflRtdProvider.js +213 -0
  190. package/modules/wurflRtdProvider.md +67 -0
  191. package/package.json +1 -1
  192. package/src/adloader.js +1 -0
  193. package/src/prebid.js +2 -1
  194. package/src/video.js +78 -1
  195. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  196. package/test/spec/modules/appnexusBidAdapter_spec.js +0 -33
  197. package/test/spec/modules/cleanmedianetBidAdapter_spec.js +1 -1
  198. package/test/spec/modules/dailymotionBidAdapter_spec.js +50 -0
  199. package/test/spec/modules/docereeAdManagerBidAdapter_spec.js +1 -0
  200. package/test/spec/modules/gamoshiBidAdapter_spec.js +1 -1
  201. package/test/spec/modules/id5IdSystem_spec.js +25 -98
  202. package/test/spec/modules/idImportLibrary_spec.js +14 -0
  203. package/test/spec/modules/mobianRtdProvider_spec.js +46 -43
  204. package/test/spec/modules/ownadxBidAdapter_spec.js +103 -0
  205. package/test/spec/modules/pubmaticBidAdapter_spec.js +18 -0
  206. package/test/spec/modules/sharethroughBidAdapter_spec.js +35 -0
  207. package/test/spec/modules/ttdBidAdapter_spec.js +10 -1
  208. package/test/spec/modules/viantOrtbBidAdapter_spec.js +1 -1
  209. package/test/spec/modules/vidazooBidAdapter_spec.js +12 -4
  210. package/test/spec/modules/wurflRtdProvider_spec.js +324 -0
  211. package/test/spec/video_spec.js +103 -1
@@ -1,30 +1,7 @@
1
1
  import {deepAccess, isEmpty, logWarn, mergeDeep, sizesToSizeTuples, sizeTupleToRtbSize} from '../../../src/utils.js';
2
2
  import {VIDEO} from '../../../src/mediaTypes.js';
3
3
 
4
- // parameters that share the same name & semantics between pbjs adUnits and imp.video
5
- const ORTB_VIDEO_PARAMS = new Set([
6
- 'pos',
7
- 'placement',
8
- 'plcmt',
9
- 'api',
10
- 'mimes',
11
- 'protocols',
12
- 'playbackmethod',
13
- 'minduration',
14
- 'maxduration',
15
- 'w',
16
- 'h',
17
- 'startdelay',
18
- 'placement',
19
- 'linearity',
20
- 'skip',
21
- 'skipmin',
22
- 'skipafter',
23
- 'minbitrate',
24
- 'maxbitrate',
25
- 'delivery',
26
- 'playbackend'
27
- ]);
4
+ import {ORTB_VIDEO_PARAMS} from '../../../src/video.js';
28
5
 
29
6
  export function fillVideoImp(imp, bidRequest, context) {
30
7
  if (context.mediaType && context.mediaType !== VIDEO) return;
@@ -32,6 +9,7 @@ export function fillVideoImp(imp, bidRequest, context) {
32
9
  const videoParams = deepAccess(bidRequest, 'mediaTypes.video');
33
10
  if (!isEmpty(videoParams)) {
34
11
  const video = Object.fromEntries(
12
+ // Parameters that share the same name & semantics between pbjs adUnits and imp.video
35
13
  Object.entries(videoParams)
36
14
  .filter(([name]) => ORTB_VIDEO_PARAMS.has(name))
37
15
  );
@@ -123,7 +123,7 @@ export function generateBidParameters(bid, bidderRequest) {
123
123
  sizes: sizesArray,
124
124
  floorPrice: Math.max(getFloor(bid, mediaType), params.floorPrice),
125
125
  bidId: getBidIdParameter('bidId', bid),
126
- loop: getBidIdParameter('bidderRequestsCount', bid),
126
+ loop: bid.bidderRequestsCount || 0,
127
127
  bidderRequestId: getBidIdParameter('bidderRequestId', bid),
128
128
  transactionId: bid.ortb2Imp?.ext?.tid || '',
129
129
  coppa: 0,
@@ -324,6 +324,7 @@ export function generateGeneralParams(generalObject, bidderRequest, adapterVersi
324
324
  if (bidderRequest && bidderRequest.refererInfo) {
325
325
  generalParams.referrer = deepAccess(bidderRequest, 'refererInfo.ref');
326
326
  generalParams.page_url = deepAccess(bidderRequest, 'refererInfo.page') || deepAccess(window, 'location.href');
327
+ generalParams.page_domain = deepAccess(bidderRequest, 'refererInfo.domain') || deepAccess(window, 'location.hostname');
327
328
  }
328
329
 
329
330
  return generalParams;
@@ -324,6 +324,22 @@ export function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidder
324
324
  }
325
325
  }
326
326
 
327
+ const api = deepAccess(mediaTypes, 'video.api', []);
328
+ if (api.includes(7)) {
329
+ const sourceExt = deepAccess(bidderRequest, 'ortb2.source.ext');
330
+ if (sourceExt?.omidpv) {
331
+ data.omidpv = sourceExt.omidpv;
332
+ }
333
+ if (sourceExt?.omidpn) {
334
+ data.omidpn = sourceExt.omidpn;
335
+ }
336
+ }
337
+
338
+ const dsa = deepAccess(bidderRequest, 'ortb2.regs.ext.dsa');
339
+ if (dsa) {
340
+ data.dsa = dsa;
341
+ }
342
+
327
343
  _each(ext, (value, key) => {
328
344
  data['ext.' + key] = value;
329
345
  });
@@ -87,6 +87,7 @@
87
87
  "jwplayerRtdProvider",
88
88
  "medianetRtdProvider",
89
89
  "mgidRtdProvider",
90
+ "mobianRtdProvider",
90
91
  "neuwoRtdProvider",
91
92
  "oneKeyRtdProvider",
92
93
  "optimeraRtdProvider",
@@ -99,7 +100,8 @@
99
100
  "sirdataRtdProvider",
100
101
  "symitriDapRtdProvider",
101
102
  "timeoutRtdProvider",
102
- "weboramaRtdProvider"
103
+ "weboramaRtdProvider",
104
+ "wurflRtdProvider"
103
105
  ],
104
106
  "fpdModule": [
105
107
  "validationFpdModule",
@@ -35,7 +35,9 @@ gulp build --modules="rtdModule,51DegreesRtdProvider,appnexusBidAdapter,..."
35
35
  ### Prerequisites
36
36
 
37
37
  #### Resource Key
38
- In order to use the module please first obtain a Resource Key using the [Configurator tool](https://configure.51degrees.com/tWrhNfY6) - choose the following properties:
38
+
39
+ In order to use the module please first obtain a Resource Key using the [Configurator tool](https://configure.51degrees.com/HNZ75HT1) - choose the following properties:
40
+
39
41
  * DeviceId
40
42
  * DeviceType
41
43
  * HardwareVendor
@@ -45,11 +47,13 @@ In order to use the module please first obtain a Resource Key using the [Configu
45
47
  * PlatformVersion
46
48
  * ScreenPixelsHeight
47
49
  * ScreenPixelsWidth
50
+ * ScreenPixelsPhysicalHeight
51
+ * ScreenPixelsPhysicalWidth
48
52
  * ScreenInchesHeight
49
53
  * ScreenInchesWidth
50
- * PixelRatio (optional)
54
+ * PixelRatio
51
55
 
52
- PixelRatio is desirable, but it's a paid property requiring a paid license. Free API service is limited. Please check [51Degrees pricing](https://51degrees.com/pricing) to choose a plan that suits your needs.
56
+ The Cloud API is **free** to integrate and use. To increase limits please check [51Degrees pricing](https://51degrees.com/pricing).
53
57
 
54
58
  #### User Agent Client Hint (UA-CH) Permissions
55
59
 
@@ -89,20 +93,20 @@ In summary we recommend using `Delegate-CH` http-equiv as the preferred method o
89
93
 
90
94
  ### Configuration
91
95
 
92
- This module is configured as part of the `realTimeData.dataProviders`
96
+ This module is configured as part of the `realTimeData.dataProviders`. We recommend setting `auctionDelay` to at least 250 ms and make sure `waitForIt` is set to `true` for the `51Degrees` RTD provider.
93
97
 
94
98
  ```javascript
95
99
  pbjs.setConfig({
96
- debug: true, // turn on for testing, remove in production
100
+ debug: false, // turn on for testing, remove in production
97
101
  realTimeData: {
98
- auctionDelay: 1000, // should be set lower in production use
102
+ auctionDelay: 250,
99
103
  dataProviders: [
100
104
  {
101
105
  name: '51Degrees',
102
106
  waitForIt: true, // should be true, otherwise the auctionDelay will be ignored
103
107
  params: {
104
- // Get your resource key from https://configure.51degrees.com/tWrhNfY6 to connect to cloud.51degrees.com
105
108
  resourceKey: '<YOUR_RESOURCE_KEY>',
109
+ // Get your resource key from https://configure.51degrees.com/HNZ75HT1
106
110
  // alternatively, you can use the on-premise version of the 51Degrees service and connect to your chosen end point
107
111
  // onPremiseJSUrl: 'https://localhost/51Degrees.core.js'
108
112
  },
@@ -8,9 +8,7 @@ import {
8
8
  getDNT,
9
9
  getWindowSelf,
10
10
  isArray,
11
- isArrayOfNums,
12
11
  isFn,
13
- isInteger,
14
12
  isNumber,
15
13
  isStr,
16
14
  logError,
@@ -18,7 +16,7 @@ import {
18
16
  logWarn,
19
17
  } from '../src/utils.js';
20
18
  import { getRefererInfo, parseDomain } from '../src/refererDetection.js';
21
- import { OUTSTREAM } from '../src/video.js';
19
+ import { OUTSTREAM, validateOrtbVideoFields } from '../src/video.js';
22
20
  import { Renderer } from '../src/Renderer.js';
23
21
  import { _ADAGIO } from '../libraries/adagioUtils/adagioUtils.js';
24
22
  import { config } from '../src/config.js';
@@ -40,39 +38,6 @@ export const BB_RENDERER_URL = `https://${BB_PUBLICATION}.bbvms.com/r/$RENDERER.
40
38
 
41
39
  const CURRENCY = 'USD';
42
40
 
43
- // This provide a whitelist and a basic validation of OpenRTB 2.5 options used by the Adagio SSP.
44
- // Accept all options but 'protocol', 'companionad', 'companiontype', 'ext'
45
- // https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf
46
- export const ORTB_VIDEO_PARAMS = {
47
- 'mimes': (value) => Array.isArray(value) && value.length > 0 && value.every(v => typeof v === 'string'),
48
- 'minduration': (value) => isInteger(value),
49
- 'maxduration': (value) => isInteger(value),
50
- 'protocols': (value) => isArrayOfNums(value),
51
- 'w': (value) => isInteger(value),
52
- 'h': (value) => isInteger(value),
53
- 'startdelay': (value) => isInteger(value),
54
- 'placement': (value) => {
55
- logWarn(LOG_PREFIX, 'The OpenRTB video param `placement` is deprecated and should not be used anymore.');
56
- return isInteger(value)
57
- },
58
- 'plcmt': (value) => isInteger(value),
59
- 'linearity': (value) => isInteger(value),
60
- 'skip': (value) => [1, 0].includes(value),
61
- 'skipmin': (value) => isInteger(value),
62
- 'skipafter': (value) => isInteger(value),
63
- 'sequence': (value) => isInteger(value),
64
- 'battr': (value) => isArrayOfNums(value),
65
- 'maxextended': (value) => isInteger(value),
66
- 'minbitrate': (value) => isInteger(value),
67
- 'maxbitrate': (value) => isInteger(value),
68
- 'boxingallowed': (value) => isInteger(value),
69
- 'playbackmethod': (value) => isArrayOfNums(value),
70
- 'playbackend': (value) => isInteger(value),
71
- 'delivery': (value) => isArrayOfNums(value),
72
- 'pos': (value) => isInteger(value),
73
- 'api': (value) => isArrayOfNums(value)
74
- };
75
-
76
41
  /**
77
42
  * Returns the window.ADAGIO global object used to store Adagio data.
78
43
  * This object is created in window.top if possible, otherwise in window.self.
@@ -186,6 +151,12 @@ function _getEids(bidRequest) {
186
151
  }
187
152
  }
188
153
 
154
+ /**
155
+ * Merge and compute video params set at mediaTypes and bidder params level
156
+ *
157
+ * @param {object} bidRequest - copy of the original bidRequest object.
158
+ * @returns {void}
159
+ */
189
160
  function _buildVideoBidRequest(bidRequest) {
190
161
  const videoAdUnitParams = deepAccess(bidRequest, 'mediaTypes.video', {});
191
162
  const videoBidderParams = deepAccess(bidRequest, 'params.video', {});
@@ -206,22 +177,11 @@ function _buildVideoBidRequest(bidRequest) {
206
177
  };
207
178
 
208
179
  if (videoParams.context && videoParams.context === OUTSTREAM) {
209
- bidRequest.mediaTypes.video.playerName = getPlayerName(bidRequest);
180
+ videoParams.playerName = getPlayerName(bidRequest);
210
181
  }
211
182
 
212
- // Only whitelisted OpenRTB options need to be validated.
213
- // Other options will still remain in the `mediaTypes.video` object
214
- // sent in the ad-request, but will be ignored by the SSP.
215
- Object.keys(ORTB_VIDEO_PARAMS).forEach(paramName => {
216
- if (videoParams.hasOwnProperty(paramName)) {
217
- if (ORTB_VIDEO_PARAMS[paramName](videoParams[paramName])) {
218
- bidRequest.mediaTypes.video[paramName] = videoParams[paramName];
219
- } else {
220
- delete bidRequest.mediaTypes.video[paramName];
221
- logWarn(`${LOG_PREFIX} The OpenRTB video param ${paramName} has been skipped due to misformating. Please refer to OpenRTB 2.5 spec.`);
222
- }
223
- }
224
- });
183
+ bidRequest.mediaTypes.video = videoParams;
184
+ validateOrtbVideoFields(bidRequest);
225
185
  }
226
186
 
227
187
  function _parseNativeBidResponse(bid) {
@@ -566,7 +566,7 @@ function newBid(serverBid, rtbBid, bidderRequest) {
566
566
  cpm: rtbBid.cpm,
567
567
  creativeId: rtbBid.creative_id,
568
568
  dealId: rtbBid.deal_id,
569
- currency: rtbBid.publisher_currency_codename || 'USD',
569
+ currency: 'USD',
570
570
  netRevenue: true,
571
571
  ttl: 300,
572
572
  adUnitCode: bidRequest.adUnitCode,
@@ -157,7 +157,7 @@ export const spec = {
157
157
  maxduration: bidRequest.mediaTypes.video.maxduration,
158
158
  api: bidRequest.mediaTypes.video.api,
159
159
  skip: bidRequest.mediaTypes.video.skip || bidRequest.params.video.skip,
160
- placement: bidRequest.mediaTypes.video.plcmt || bidRequest.params.video.plcmt,
160
+ plcmt: bidRequest.mediaTypes.video.plcmt || bidRequest.params.video.plcmt,
161
161
  minduration: bidRequest.mediaTypes.video.minduration || bidRequest.params.video.minduration,
162
162
  playbackmethod: bidRequest.mediaTypes.video.playbackmethod || bidRequest.params.video.playbackmethod,
163
163
  startdelay: bidRequest.mediaTypes.video.startdelay || bidRequest.params.video.startdelay
@@ -1,6 +1,8 @@
1
1
  import { registerBidder } from '../src/adapters/bidderFactory.js';
2
2
  import { VIDEO } from '../src/mediaTypes.js';
3
3
  import { deepAccess } from '../src/utils.js';
4
+ import { config } from '../src/config.js';
5
+ import { userSync } from '../src/userSync.js';
4
6
 
5
7
  /**
6
8
  * Get video metadata from bid request
@@ -90,6 +92,22 @@ function getVideoMetadata(bidRequest, bidderRequest) {
90
92
  return videoMetadata;
91
93
  }
92
94
 
95
+ /**
96
+ * Check if user sync is enabled for Dailymotion
97
+ *
98
+ * @return boolean True if user sync is enabled
99
+ */
100
+ function isUserSyncEnabled() {
101
+ const syncEnabled = deepAccess(config.getConfig('userSync'), 'syncEnabled');
102
+
103
+ if (!syncEnabled) return false;
104
+
105
+ const canSyncWithIframe = userSync.canBidderRegisterSync('iframe', 'dailymotion');
106
+ const canSyncWithPixel = userSync.canBidderRegisterSync('image', 'dailymotion');
107
+
108
+ return !!(canSyncWithIframe || canSyncWithPixel);
109
+ }
110
+
93
111
  export const spec = {
94
112
  code: 'dailymotion',
95
113
  gvlid: 573,
@@ -189,6 +207,7 @@ export const spec = {
189
207
  atts: deepAccess(bidderRequest, 'ortb2.device.ext.atts', 0),
190
208
  },
191
209
  } : {}),
210
+ userSyncEnabled: isUserSyncEnabled(),
192
211
  request: {
193
212
  adUnitCode: deepAccess(bid, 'adUnitCode', ''),
194
213
  auctionId: deepAccess(bid, 'auctionId', ''),
@@ -74,16 +74,11 @@ function getPayload(bid, userData) {
74
74
  if (!userData || !bid) {
75
75
  return false;
76
76
  }
77
-
78
77
  const { bidId, params } = bid;
79
78
  const { placementId } = params;
80
79
  const {
81
80
  userid,
82
- email,
83
- firstname,
84
- lastname,
85
81
  specialization,
86
- hcpid,
87
82
  gender,
88
83
  city,
89
84
  state,
@@ -94,16 +89,17 @@ function getPayload(bid, userData) {
94
89
  hashedmobile,
95
90
  country,
96
91
  organization,
97
- dob,
92
+ platformUid,
93
+ mobile
98
94
  } = userData;
99
95
 
100
96
  const data = {
101
- userid: userid || '',
102
- email: email || '',
103
- firstname: firstname || '',
104
- lastname: lastname || '',
97
+ userid: platformUid || userid || '',
98
+ email: '',
99
+ firstname: '',
100
+ lastname: '',
105
101
  specialization: specialization || '',
106
- hcpid: hcpid || '',
102
+ hcpid: '',
107
103
  gender: gender || '',
108
104
  city: city || '',
109
105
  state: state || '',
@@ -117,8 +113,9 @@ function getPayload(bid, userData) {
117
113
  hashedmobile: hashedmobile || '',
118
114
  country: country || '',
119
115
  organization: organization || '',
120
- dob: dob || '',
116
+ dob: '',
121
117
  userconsent: 1,
118
+ mobile: mobile || ''
122
119
  };
123
120
  return {
124
121
  data,
@@ -157,7 +157,7 @@ export const spec = {
157
157
  maxduration: bidRequest.mediaTypes.video.maxduration,
158
158
  api: bidRequest.mediaTypes.video.api,
159
159
  skip: bidRequest.mediaTypes.video.skip || bidRequest.params.video.skip,
160
- placement: bidRequest.mediaTypes.video.plcmt || bidRequest.params.video.plcmt,
160
+ plcmt: bidRequest.mediaTypes.video.plcmt || bidRequest.params.video.plcmt,
161
161
  minduration: bidRequest.mediaTypes.video.minduration || bidRequest.params.video.minduration,
162
162
  playbackmethod: bidRequest.mediaTypes.video.playbackmethod || bidRequest.params.video.playbackmethod,
163
163
  startdelay: bidRequest.mediaTypes.video.startdelay || bidRequest.params.video.startdelay
@@ -6,7 +6,7 @@ import {deepClone, generateUUID, logError, logInfo, logWarn, getParameterByName}
6
6
 
7
7
  const analyticsType = 'endpoint';
8
8
 
9
- export const ANALYTICS_VERSION = '2.3.0';
9
+ export const ANALYTICS_VERSION = '2.3.1';
10
10
 
11
11
  const ANALYTICS_SERVER = 'https://a.greenbids.ai';
12
12
 
@@ -197,9 +197,12 @@ export const greenbidsAnalyticsAdapter = Object.assign(adapter({ANALYTICS_SERVER
197
197
  },
198
198
  handleAuctionEnd(auctionEndArgs) {
199
199
  const cachedAuction = this.getCachedAuction(auctionEndArgs.auctionId);
200
- this.sendEventMessage('/',
201
- this.createBidMessage(auctionEndArgs, cachedAuction)
202
- );
200
+ const isFilteringForced = getParameterByName('greenbids_force_filtering');
201
+ if (!isFilteringForced) {
202
+ this.sendEventMessage('/',
203
+ this.createBidMessage(auctionEndArgs, cachedAuction)
204
+ )
205
+ };
203
206
  },
204
207
  handleBidTimeout(timeoutBids) {
205
208
  timeoutBids.forEach((bid) => {
@@ -1,11 +1,11 @@
1
- import { logError, deepClone, generateUUID, deepSetValue, deepAccess } from '../src/utils.js';
1
+ import { logError, logInfo, logWarn, deepClone, generateUUID, deepSetValue, deepAccess, getParameterByName } from '../src/utils.js';
2
2
  import { ajax } from '../src/ajax.js';
3
3
  import { submodule } from '../src/hook.js';
4
4
  import * as events from '../src/events.js';
5
5
  import { EVENTS } from '../src/constants.js';
6
6
 
7
7
  const MODULE_NAME = 'greenbidsRtdProvider';
8
- const MODULE_VERSION = '2.0.0';
8
+ const MODULE_VERSION = '2.0.1';
9
9
  const ENDPOINT = 'https://t.greenbids.ai';
10
10
 
11
11
  const rtdOptions = {};
@@ -46,6 +46,7 @@ function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) {
46
46
  function createPromise(reqBidsConfigObj, greenbidsId) {
47
47
  return new Promise((resolve) => {
48
48
  const timeoutId = setTimeout(() => {
49
+ logWarn('GreenbidsRtdProvider: Greenbids API timeout, skipping shaping');
49
50
  resolve(reqBidsConfigObj);
50
51
  }, rtdOptions.timeout);
51
52
  ajax(
@@ -57,6 +58,7 @@ function createPromise(reqBidsConfigObj, greenbidsId) {
57
58
  },
58
59
  error: () => {
59
60
  clearTimeout(timeoutId);
61
+ logWarn('GreenbidsRtdProvider: Greenbids API response error, skipping shaping');
60
62
  resolve(reqBidsConfigObj);
61
63
  },
62
64
  },
@@ -73,11 +75,16 @@ function createPromise(reqBidsConfigObj, greenbidsId) {
73
75
 
74
76
  function processSuccessResponse(response, timeoutId, reqBidsConfigObj, greenbidsId) {
75
77
  clearTimeout(timeoutId);
76
- const responseAdUnits = JSON.parse(response);
77
- updateAdUnitsBasedOnResponse(reqBidsConfigObj.adUnits, responseAdUnits, greenbidsId);
78
+ try {
79
+ const responseAdUnits = JSON.parse(response);
80
+ updateAdUnitsBasedOnResponse(reqBidsConfigObj.adUnits, responseAdUnits, greenbidsId);
81
+ } catch (e) {
82
+ logWarn('GreenbidsRtdProvider: Greenbids API response parsing error, skipping shaping');
83
+ }
78
84
  }
79
85
 
80
86
  function updateAdUnitsBasedOnResponse(adUnits, responseAdUnits, greenbidsId) {
87
+ const isFilteringForced = getParameterByName('greenbids_force_filtering');
81
88
  adUnits.forEach((adUnit) => {
82
89
  const matchingAdUnit = findMatchingAdUnit(responseAdUnits, adUnit.code);
83
90
  if (matchingAdUnit) {
@@ -86,7 +93,10 @@ function updateAdUnitsBasedOnResponse(adUnits, responseAdUnits, greenbidsId) {
86
93
  keptInAuction: matchingAdUnit.bidders,
87
94
  isExploration: matchingAdUnit.isExploration
88
95
  });
89
- if (!matchingAdUnit.isExploration) {
96
+ if (isFilteringForced) {
97
+ adUnit.bids = [];
98
+ logInfo('Greenbids Rtd: filtering flag detected, forcing filtering of Rtd module.');
99
+ } else if (!matchingAdUnit.isExploration) {
90
100
  removeFalseBidders(adUnit, matchingAdUnit);
91
101
  }
92
102
  }
@@ -13,14 +13,13 @@ import {
13
13
  isPlainObject,
14
14
  logError,
15
15
  logInfo,
16
- logWarn,
17
- safeJSONParse
16
+ logWarn
18
17
  } from '../src/utils.js';
19
18
  import {fetch} from '../src/ajax.js';
20
19
  import {submodule} from '../src/hook.js';
21
20
  import {getRefererInfo} from '../src/refererDetection.js';
22
21
  import {getStorageManager} from '../src/storageManager.js';
23
- import {uspDataHandler, gppDataHandler} from '../src/adapterManager.js';
22
+ import {gppDataHandler, uspDataHandler} from '../src/adapterManager.js';
24
23
  import {MODULE_TYPE_UID} from '../src/activities/modules.js';
25
24
  import {GreedyPromise} from '../src/utils/promise.js';
26
25
  import {loadExternalScript} from '../src/adloader.js';
@@ -34,19 +33,12 @@ import {loadExternalScript} from '../src/adloader.js';
34
33
 
35
34
  const MODULE_NAME = 'id5Id';
36
35
  const GVLID = 131;
37
- const NB_EXP_DAYS = 30;
38
36
  export const ID5_STORAGE_NAME = 'id5id';
39
- export const ID5_PRIVACY_STORAGE_NAME = `${ID5_STORAGE_NAME}_privacy`;
40
- const LOCAL_STORAGE = 'html5';
41
37
  const LOG_PREFIX = 'User ID - ID5 submodule: ';
42
38
  const ID5_API_CONFIG_URL = 'https://id5-sync.com/api/config/prebid';
43
39
  const ID5_DOMAIN = 'id5-sync.com';
44
40
  const TRUE_LINK_SOURCE = 'true-link-id5-sync.com';
45
41
 
46
- // order the legacy cookie names in reverse priority order so the last
47
- // cookie in the array is the most preferred to use
48
- const LEGACY_COOKIE_NAMES = ['pbjs-id5id', 'id5id.1st', 'id5id'];
49
-
50
42
  export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME});
51
43
 
52
44
  /**
@@ -231,7 +223,7 @@ export const id5IdSubmodule = {
231
223
  * @param {SubmoduleConfig} config
232
224
  * @param {ConsentData|undefined} consentData
233
225
  * @param {Object} cacheIdObj - existing id, if any
234
- * @return {(IdResponse|function(callback:function))} A response object that contains id and/or callback.
226
+ * @return {IdResponse} A response object that contains id.
235
227
  */
236
228
  extendId(config, consentData, cacheIdObj) {
237
229
  if (!hasWriteConsentToLocalStorage(consentData)) {
@@ -239,10 +231,10 @@ export const id5IdSubmodule = {
239
231
  return cacheIdObj;
240
232
  }
241
233
 
242
- const partnerId = validateConfig(config) ? config.params.partner : 0;
243
- incrementNb(partnerId);
244
-
245
234
  logInfo(LOG_PREFIX + 'using cached ID', cacheIdObj);
235
+ if (cacheIdObj) {
236
+ cacheIdObj.nbPage = incrementNb(cacheIdObj)
237
+ }
246
238
  return cacheIdObj;
247
239
  },
248
240
  eids: {
@@ -401,8 +393,8 @@ export class IdFetchFlow {
401
393
  const params = this.submoduleConfig.params;
402
394
  const hasGdpr = (this.gdprConsentData && typeof this.gdprConsentData.gdprApplies === 'boolean' && this.gdprConsentData.gdprApplies) ? 1 : 0;
403
395
  const referer = getRefererInfo();
404
- const signature = (this.cacheIdObj && this.cacheIdObj.signature) ? this.cacheIdObj.signature : getLegacyCookieSignature();
405
- const nbPage = incrementAndResetNb(params.partner);
396
+ const signature = this.cacheIdObj ? this.cacheIdObj.signature : undefined;
397
+ const nbPage = incrementNb(this.cacheIdObj);
406
398
  const trueLinkInfo = window.id5Bootstrap ? window.id5Bootstrap.getTrueLinkInfo() : {booted: false};
407
399
 
408
400
  const data = {
@@ -456,7 +448,6 @@ export class IdFetchFlow {
456
448
  #processFetchCallResponse(fetchCallResponse) {
457
449
  try {
458
450
  if (fetchCallResponse.privacy) {
459
- storeInLocalStorage(ID5_PRIVACY_STORAGE_NAME, JSON.stringify(fetchCallResponse.privacy), NB_EXP_DAYS);
460
451
  if (window.id5Bootstrap && window.id5Bootstrap.setPrivacy) {
461
452
  window.id5Bootstrap.setPrivacy(fetchCallResponse.privacy);
462
453
  }
@@ -507,89 +498,19 @@ function validateConfig(config) {
507
498
  logError(LOG_PREFIX + 'storage required to be set');
508
499
  return false;
509
500
  }
510
-
511
- // in a future release, we may return false if storage type or name are not set as required
512
- if (config.storage.type !== LOCAL_STORAGE) {
513
- logWarn(LOG_PREFIX + `storage type recommended to be '${LOCAL_STORAGE}'. In a future release this may become a strict requirement`);
514
- }
515
- // in a future release, we may return false if storage type or name are not set as required
516
501
  if (config.storage.name !== ID5_STORAGE_NAME) {
517
- logWarn(LOG_PREFIX + `storage name recommended to be '${ID5_STORAGE_NAME}'. In a future release this may become a strict requirement`);
502
+ logWarn(LOG_PREFIX + `storage name recommended to be '${ID5_STORAGE_NAME}'.`);
518
503
  }
519
504
 
520
505
  return true;
521
506
  }
522
507
 
523
- export function expDaysStr(expDays) {
524
- return (new Date(Date.now() + (1000 * 60 * 60 * 24 * expDays))).toUTCString();
525
- }
526
-
527
- export function nbCacheName(partnerId) {
528
- return `${ID5_STORAGE_NAME}_${partnerId}_nb`;
529
- }
530
-
531
- export function storeNbInCache(partnerId, nb) {
532
- storeInLocalStorage(nbCacheName(partnerId), nb, NB_EXP_DAYS);
533
- }
534
-
535
- export function getNbFromCache(partnerId) {
536
- let cacheNb = getFromLocalStorage(nbCacheName(partnerId));
537
- return (cacheNb) ? parseInt(cacheNb) : 0;
538
- }
539
-
540
- function incrementNb(partnerId) {
541
- const nb = (getNbFromCache(partnerId) + 1);
542
- storeNbInCache(partnerId, nb);
543
- return nb;
544
- }
545
-
546
- function incrementAndResetNb(partnerId) {
547
- const result = incrementNb(partnerId);
548
- storeNbInCache(partnerId, 0);
549
- return result;
550
- }
551
-
552
- function getLegacyCookieSignature() {
553
- let legacyStoredValue;
554
- LEGACY_COOKIE_NAMES.forEach(function (cookie) {
555
- if (storage.getCookie(cookie)) {
556
- legacyStoredValue = safeJSONParse(storage.getCookie(cookie)) || legacyStoredValue;
557
- }
558
- });
559
- return (legacyStoredValue && legacyStoredValue.signature) || '';
560
- }
561
-
562
- /**
563
- * This will make sure we check for expiration before accessing local storage
564
- * @param {string} key
565
- */
566
- export function getFromLocalStorage(key) {
567
- const storedValueExp = storage.getDataFromLocalStorage(`${key}_exp`);
568
- // empty string means no expiration set
569
- if (storedValueExp === '') {
570
- return storage.getDataFromLocalStorage(key);
571
- } else if (storedValueExp) {
572
- if ((new Date(storedValueExp)).getTime() - Date.now() > 0) {
573
- return storage.getDataFromLocalStorage(key);
574
- }
508
+ function incrementNb(cachedObj) {
509
+ if (cachedObj && cachedObj.nbPage !== undefined) {
510
+ return cachedObj.nbPage + 1;
511
+ } else {
512
+ return 1;
575
513
  }
576
- // if we got here, then we have an expired item or we didn't set an
577
- // expiration initially somehow, so we need to remove the item from the
578
- // local storage
579
- storage.removeDataFromLocalStorage(key);
580
- return null;
581
- }
582
-
583
- /**
584
- * Ensure that we always set an expiration in local storage since
585
- * by default it's not required
586
- * @param {string} key
587
- * @param {any} value
588
- * @param {number} expDays
589
- */
590
- export function storeInLocalStorage(key, value, expDays) {
591
- storage.setDataInLocalStorage(`${key}_exp`, expDaysStr(expDays));
592
- storage.setDataInLocalStorage(`${key}`, value);
593
514
  }
594
515
 
595
516
  /**
@@ -1,15 +1,19 @@
1
- import { logInfo, logError } from '../src/utils.js';
2
- import {getGlobal} from '../src/prebidGlobal.js';
3
- import {ajax} from '../src/ajax.js';
4
- import {config} from '../src/config.js';
5
1
  import MD5 from 'crypto-js/md5.js';
2
+ import { ACTIVITY_ENRICH_UFPD } from '../src/activities/activities.js';
3
+ import { activityParams } from '../src/activities/activityParams.js';
4
+ import { MODULE_TYPE_PREBID } from '../src/activities/modules.js';
5
+ import { isActivityAllowed } from '../src/activities/rules.js';
6
+ import { ajax } from '../src/ajax.js';
7
+ import { config } from '../src/config.js';
8
+ import { getGlobal } from '../src/prebidGlobal.js';
9
+ import { logError, logInfo } from '../src/utils.js';
6
10
 
7
11
  let email;
8
12
  let conf;
9
13
  const LOG_PRE_FIX = 'ID-Library: ';
10
14
  const CONF_DEFAULT_OBSERVER_DEBOUNCE_MS = 250;
11
- const CONF_DEFAULT_FULL_BODY_SCAN = false;
12
- const CONF_DEFAULT_INPUT_SCAN = false;
15
+ export const CONF_DEFAULT_FULL_BODY_SCAN = false;
16
+ export const CONF_DEFAULT_INPUT_SCAN = false;
13
17
  const OBSERVER_CONFIG = {
14
18
  subtree: true,
15
19
  attributes: true,
@@ -257,6 +261,10 @@ export function setConfig(config) {
257
261
  _logError('The required url is not configured');
258
262
  return;
259
263
  }
264
+ if (!isActivityAllowed(ACTIVITY_ENRICH_UFPD, activityParams(MODULE_TYPE_PREBID, 'idImportLibrary'))) {
265
+ _logError('Permission for id import was denied by CMP');
266
+ return;
267
+ }
260
268
  if (typeof config.debounce !== 'number') {
261
269
  config.debounce = CONF_DEFAULT_OBSERVER_DEBOUNCE_MS;
262
270
  _logInfo('Set default observer debounce to ' + CONF_DEFAULT_OBSERVER_DEBOUNCE_MS);