prebid.js 7.44.0 → 7.45.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 (254) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/acuityAdsBidAdapter.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/adrelevantisBidAdapter.js +1 -1
  8. package/dist/adtrgtmeBidAdapter.js +1 -1
  9. package/dist/adxcgBidAdapter.js +1 -1
  10. package/dist/adyoulikeBidAdapter.js +1 -1
  11. package/dist/ajaBidAdapter.js +1 -1
  12. package/dist/amxBidAdapter.js +1 -1
  13. package/dist/amxIdSystem.js +1 -1
  14. package/dist/appierAnalyticsAdapter.js +1 -1
  15. package/dist/appnexusBidAdapter.js +1 -1
  16. package/dist/appushBidAdapter.js +1 -1
  17. package/dist/asoBidAdapter.js +1 -1
  18. package/dist/axonixBidAdapter.js +1 -1
  19. package/dist/beyondmediaBidAdapter.js +1 -1
  20. package/dist/bidglassBidAdapter.js +1 -1
  21. package/dist/big-richmediaBidAdapter.js +1 -1
  22. package/dist/braveBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/brightcomBidAdapter.js +1 -1
  26. package/dist/brightcomSSPBidAdapter.js +1 -1
  27. package/dist/carodaBidAdapter.js +1 -1
  28. package/dist/chtnwBidAdapter.js +1 -1
  29. package/dist/coinzillaBidAdapter.js +1 -1
  30. package/dist/compassBidAdapter.js +1 -1
  31. package/dist/concertBidAdapter.js +1 -1
  32. package/dist/connectIdSystem.js +1 -1
  33. package/dist/connectadBidAdapter.js +1 -1
  34. package/dist/consumableBidAdapter.js +1 -1
  35. package/dist/contentexchangeBidAdapter.js +1 -1
  36. package/dist/conversantAnalyticsAdapter.js +1 -1
  37. package/dist/conversantBidAdapter.js +1 -1
  38. package/dist/craftBidAdapter.js +1 -1
  39. package/dist/criteoBidAdapter.js +1 -1
  40. package/dist/cwireBidAdapter.js +1 -1
  41. package/dist/dependencies.json +12 -0
  42. package/dist/domainOverrideToRootDomain.js +1 -0
  43. package/dist/dspxBidAdapter.js +1 -1
  44. package/dist/eplanningBidAdapter.js +1 -1
  45. package/dist/feedadBidAdapter.js +1 -1
  46. package/dist/finativeBidAdapter.js +1 -1
  47. package/dist/freewheel-sspBidAdapter.js +1 -1
  48. package/dist/glimpseBidAdapter.js +1 -1
  49. package/dist/globalsunBidAdapter.js +1 -1
  50. package/dist/gmosspBidAdapter.js +1 -1
  51. package/dist/goldbachBidAdapter.js +1 -1
  52. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  53. package/dist/gridBidAdapter.js +1 -1
  54. package/dist/gridNMBidAdapter.js +1 -1
  55. package/dist/growthCodeIdSystem.js +1 -1
  56. package/dist/gumgumBidAdapter.js +1 -1
  57. package/dist/h12mediaBidAdapter.js +1 -1
  58. package/dist/id5IdSystem.js +1 -1
  59. package/dist/improvedigitalBidAdapter.js +1 -1
  60. package/dist/inmarBidAdapter.js +1 -1
  61. package/dist/insticatorBidAdapter.js +1 -1
  62. package/dist/iqzoneBidAdapter.js +1 -1
  63. package/dist/ivsBidAdapter.js +1 -0
  64. package/dist/ixBidAdapter.js +1 -1
  65. package/dist/justpremiumBidAdapter.js +1 -1
  66. package/dist/jwplayerVideoProvider.js +1 -1
  67. package/dist/kargoBidAdapter.js +1 -1
  68. package/dist/koblerBidAdapter.js +1 -1
  69. package/dist/konduitAnalyticsAdapter.js +1 -1
  70. package/dist/kueezBidAdapter.js +1 -1
  71. package/dist/kueezRtbBidAdapter.js +1 -1
  72. package/dist/kulturemediaBidAdapter.js +1 -1
  73. package/dist/lassoBidAdapter.js +1 -1
  74. package/dist/lifestreetBidAdapter.js +1 -1
  75. package/dist/liveIntentIdSystem.js +1 -1
  76. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  77. package/dist/logicadBidAdapter.js +1 -1
  78. package/dist/loglyliftBidAdapter.js +1 -1
  79. package/dist/luponmediaBidAdapter.js +1 -1
  80. package/dist/magniteAnalyticsAdapter.js +1 -1
  81. package/dist/malltvAnalyticsAdapter.js +1 -1
  82. package/dist/marsmediaBidAdapter.js +1 -1
  83. package/dist/mathildeadsBidAdapter.js +1 -1
  84. package/dist/mediafuseBidAdapter.js +1 -1
  85. package/dist/medianetBidAdapter.js +1 -1
  86. package/dist/mediasquareBidAdapter.js +1 -1
  87. package/dist/mgidBidAdapter.js +1 -1
  88. package/dist/minutemediaBidAdapter.js +1 -1
  89. package/dist/minutemediaplusBidAdapter.js +1 -1
  90. package/dist/nexx360BidAdapter.js +1 -1
  91. package/dist/not-for-prod/prebid.js +158 -156
  92. package/dist/oguryBidAdapter.js +1 -1
  93. package/dist/onetagBidAdapter.js +1 -1
  94. package/dist/onomagicBidAdapter.js +1 -1
  95. package/dist/ooloAnalyticsAdapter.js +1 -1
  96. package/dist/openxBidAdapter.js +1 -1
  97. package/dist/openxOrtbBidAdapter.js +1 -1
  98. package/dist/operaadsBidAdapter.js +1 -1
  99. package/dist/optidigitalBidAdapter.js +1 -1
  100. package/dist/outbrainBidAdapter.js +1 -1
  101. package/dist/parrableIdSystem.js +1 -1
  102. package/dist/pixfutureBidAdapter.js +1 -1
  103. package/dist/prebid-core.js +1 -1
  104. package/dist/publinkIdSystem.js +1 -1
  105. package/dist/pubmaticBidAdapter.js +1 -1
  106. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  107. package/dist/pubxBidAdapter.js +1 -1
  108. package/dist/pxyzBidAdapter.js +1 -1
  109. package/dist/quantcastBidAdapter.js +1 -1
  110. package/dist/readpeakBidAdapter.js +1 -1
  111. package/dist/relaidoBidAdapter.js +1 -1
  112. package/dist/rhythmoneBidAdapter.js +1 -1
  113. package/dist/riseBidAdapter.js +1 -1
  114. package/dist/rubiconAnalyticsAdapter.js +1 -1
  115. package/dist/rubiconBidAdapter.js +1 -1
  116. package/dist/seedingAllianceBidAdapter.js +1 -1
  117. package/dist/seedtagBidAdapter.js +1 -1
  118. package/dist/sharedIdSystem.js +1 -1
  119. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  120. package/dist/sharethroughBidAdapter.js +1 -1
  121. package/dist/shinezBidAdapter.js +1 -1
  122. package/dist/smaatoBidAdapter.js +1 -1
  123. package/dist/smartadserverBidAdapter.js +1 -1
  124. package/dist/smarthubBidAdapter.js +1 -1
  125. package/dist/smartxBidAdapter.js +1 -1
  126. package/dist/smilewantedBidAdapter.js +1 -1
  127. package/dist/sonobiBidAdapter.js +1 -1
  128. package/dist/sovrnAnalyticsAdapter.js +1 -1
  129. package/dist/sovrnBidAdapter.js +1 -1
  130. package/dist/sspBCBidAdapter.js +1 -1
  131. package/dist/stvBidAdapter.js +1 -1
  132. package/dist/sublimeBidAdapter.js +1 -1
  133. package/dist/synacormediaBidAdapter.js +1 -1
  134. package/dist/targetVideoBidAdapter.js +1 -1
  135. package/dist/teadsBidAdapter.js +1 -1
  136. package/dist/trionBidAdapter.js +1 -1
  137. package/dist/tripleliftBidAdapter.js +1 -1
  138. package/dist/truereachBidAdapter.js +1 -1
  139. package/dist/ttdBidAdapter.js +1 -1
  140. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  141. package/dist/uid2IdSystem.js +1 -1
  142. package/dist/underdogmediaBidAdapter.js +1 -1
  143. package/dist/undertoneBidAdapter.js +1 -1
  144. package/dist/userId.js +1 -1
  145. package/dist/vidazooBidAdapter.js +1 -1
  146. package/dist/videobyteBidAdapter.js +1 -1
  147. package/dist/videoheroesBidAdapter.js +1 -1
  148. package/dist/vidoomyBidAdapter.js +1 -1
  149. package/dist/visiblemeasuresBidAdapter.js +1 -1
  150. package/dist/visxBidAdapter.js +1 -1
  151. package/dist/vrtcalBidAdapter.js +1 -1
  152. package/dist/vuukleBidAdapter.js +1 -1
  153. package/dist/widespaceBidAdapter.js +1 -1
  154. package/dist/winrBidAdapter.js +1 -1
  155. package/dist/yahoosspBidAdapter.js +1 -1
  156. package/dist/yieldmoBidAdapter.js +1 -1
  157. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  158. package/dist/yieldoneBidAdapter.js +1 -1
  159. package/libraries/domainOverrideToRootDomain/index.js +39 -0
  160. package/modules/acuityAdsBidAdapter.js +1 -1
  161. package/modules/amxBidAdapter.js +1 -1
  162. package/modules/amxIdSystem.js +23 -20
  163. package/modules/amxIdSystem.md +7 -7
  164. package/modules/appushBidAdapter.js +1 -1
  165. package/modules/beyondmediaBidAdapter.js +1 -1
  166. package/modules/braveBidAdapter.js +1 -1
  167. package/modules/brightcomBidAdapter.js +1 -1
  168. package/modules/brightcomSSPBidAdapter.js +1 -1
  169. package/modules/coinzillaBidAdapter.js +1 -2
  170. package/modules/compassBidAdapter.js +1 -1
  171. package/modules/connectIdSystem.js +96 -21
  172. package/modules/connectIdSystem.md +6 -5
  173. package/modules/contentexchangeBidAdapter.js +1 -1
  174. package/modules/freewheel-sspBidAdapter.js +8 -0
  175. package/modules/glimpseBidAdapter.js +1 -2
  176. package/modules/globalsunBidAdapter.js +1 -1
  177. package/modules/gridBidAdapter.js +1 -1
  178. package/modules/gridNMBidAdapter.js +1 -1
  179. package/modules/growthCodeIdSystem.js +18 -15
  180. package/modules/gumgumBidAdapter.js +1 -1
  181. package/modules/iqzoneBidAdapter.js +1 -1
  182. package/modules/ivsBidAdapter.js +85 -0
  183. package/modules/ivsBidAdapter.md +34 -0
  184. package/modules/ixBidAdapter.js +42 -105
  185. package/modules/jwplayerVideoProvider.js +25 -32
  186. package/modules/koblerBidAdapter.js +1 -2
  187. package/modules/kueezBidAdapter.js +1 -1
  188. package/modules/liveIntentIdSystem.js +8 -0
  189. package/modules/luponmediaBidAdapter.js +1 -1
  190. package/modules/magniteAnalyticsAdapter.js +76 -3
  191. package/modules/mathildeadsBidAdapter.js +1 -1
  192. package/modules/medianetBidAdapter.js +1 -1
  193. package/modules/mgidBidAdapter.js +178 -26
  194. package/modules/minutemediaBidAdapter.js +1 -1
  195. package/modules/oguryBidAdapter.js +3 -2
  196. package/modules/onomagicBidAdapter.js +1 -2
  197. package/modules/openxBidAdapter.js +192 -563
  198. package/modules/openxBidAdapter.md +22 -20
  199. package/modules/openxOrtbBidAdapter.js +13 -11
  200. package/modules/openxOrtbBidAdapter.md +5 -3
  201. package/modules/operaadsBidAdapter.js +1 -1
  202. package/modules/pubmaticBidAdapter.js +1 -1
  203. package/modules/pubxBidAdapter.js +5 -2
  204. package/modules/riseBidAdapter.js +1 -1
  205. package/modules/sharedIdSystem.js +4 -27
  206. package/modules/sharethroughBidAdapter.js +1 -1
  207. package/modules/shinezBidAdapter.js +1 -1
  208. package/modules/smarthubBidAdapter.js +1 -1
  209. package/modules/synacormediaBidAdapter.js +1 -3
  210. package/modules/truereachBidAdapter.js +1 -2
  211. package/modules/userId/eids.js +18 -0
  212. package/modules/userId/eids.md +16 -0
  213. package/modules/videoheroesBidAdapter.js +1 -1
  214. package/modules/vidoomyBidAdapter.js +22 -1
  215. package/modules/visiblemeasuresBidAdapter.js +1 -1
  216. package/modules/vrtcalBidAdapter.js +1 -1
  217. package/modules/yieldoneBidAdapter.js +1 -1
  218. package/package.json +1 -1
  219. package/src/Renderer.js +2 -1
  220. package/src/native.js +5 -1
  221. package/test/spec/auctionmanager_spec.js +2 -2
  222. package/test/spec/libraries/domainOverrideToRootDomain/index_spec.js +77 -0
  223. package/test/spec/modules/acuityAdsBidAdapter_spec.js +2 -1
  224. package/test/spec/modules/amxIdSystem_spec.js +13 -26
  225. package/test/spec/modules/appushBidAdapter_spec.js +2 -1
  226. package/test/spec/modules/beyondmediaBidAdapter_spec.js +2 -1
  227. package/test/spec/modules/compassBidAdapter_spec.js +2 -1
  228. package/test/spec/modules/connectIdSystem_spec.js +420 -242
  229. package/test/spec/modules/contentexchangeBidAdapter_spec.js +2 -1
  230. package/test/spec/modules/eids_spec.js +30 -0
  231. package/test/spec/modules/freewheel-sspBidAdapter_spec.js +37 -0
  232. package/test/spec/modules/globalsunBidAdapter_spec.js +2 -1
  233. package/test/spec/modules/iqzoneBidAdapter_spec.js +2 -1
  234. package/test/spec/modules/ivsBidAdapter_spec.js +197 -0
  235. package/test/spec/modules/ixBidAdapter_spec.js +84 -71
  236. package/test/spec/modules/koblerBidAdapter_spec.js +0 -20
  237. package/test/spec/modules/liveIntentIdSystem_spec.js +10 -0
  238. package/test/spec/modules/luponmediaBidAdapter_spec.js +1 -1
  239. package/test/spec/modules/magniteAnalyticsAdapter_spec.js +129 -1
  240. package/test/spec/modules/mathildeadsBidAdapter_spec.js +2 -1
  241. package/test/spec/modules/mgidBidAdapter_spec.js +184 -36
  242. package/test/spec/modules/oguryBidAdapter_spec.js +19 -4
  243. package/test/spec/modules/openxBidAdapter_spec.js +1157 -1936
  244. package/test/spec/modules/openxOrtbBidAdapter_spec.js +12 -39
  245. package/test/spec/modules/pubxBidAdapter_spec.js +10 -2
  246. package/test/spec/modules/sharedIdSystem_spec.js +0 -46
  247. package/test/spec/modules/sharethroughBidAdapter_spec.js +2 -1
  248. package/test/spec/modules/smarthubBidAdapter_spec.js +2 -1
  249. package/test/spec/modules/synacormediaBidAdapter_spec.js +0 -26
  250. package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +17 -4
  251. package/test/spec/modules/vidoomyBidAdapter_spec.js +35 -0
  252. package/test/spec/modules/visiblemeasuresBidAdapter_spec.js +2 -1
  253. package/test/spec/modules/vrtcalBidAdapter_spec.js +3 -2
  254. package/test/spec/renderer_spec.js +1 -2
@@ -9,30 +9,31 @@ Maintainer: team-openx@openx.com
9
9
  # Description
10
10
 
11
11
  Module that connects to OpenX's demand sources.
12
- Note there is an updated version of the OpenX bid adapter called openxOrtbBidAdapter.
13
- Publishers are welcome to test the other adapter and give feedback. Please note you should only include either openxBidAdapter or openxOrtbBidAdapter in your build.
12
+ Note that this adapter mirrors openxOrtbBidAdapter and any updates must be
13
+ completed in both adapters.
14
+ openxOrtbBidAdapter will be removed in a future release and should not be used.
15
+ Please note you should only include either openxBidAdapter or openxOrtbBidAdapter in your build.
14
16
 
15
17
  # Bid Parameters
16
18
  ## Banner
17
19
 
18
- | Name | Scope | Type | Description | Example |
19
- |---------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|
20
- | `delDomain` ~~or `platform`~~** | required | String | OpenX delivery domain provided by your OpenX representative. | "PUBLISHER-d.openx.net" |
21
- | `unit` | required | String | OpenX ad unit ID provided by your OpenX representative. | "1611023122" |
22
- | `customParams` | optional | Object | User-defined targeting key-value pairs. customParams applies to a specific unit. | `{key1: "v1", key2: ["v2","v3"]}` |
23
- | `customFloor` | optional | Number | Minimum price in USD. customFloor applies to a specific unit. For example, use the following value to set a $1.50 floor: 1.50 <br/><br/> **WARNING:**<br/> Misuse of this parameter can impact revenue<br/><br/>Note: OpenX suggests using the [Price Floor Module](https://docs.prebid.org/dev-docs/modules/floors.html) instead of customFloor. The Price Floor Module is prioritized over customFloor if both are present. | 1.50 |
24
- | `doNotTrack` | optional | Boolean | Prevents advertiser from using data for this user. <br/><br/> **WARNING:**<br/> Request-level setting. May impact revenue. | true |
25
- | `coppa` | optional | Boolean | Enables Child's Online Privacy Protection Act (COPPA) regulations. | true |
26
-
27
- ** platform is deprecated. Please use delDomain instead. If you have any questions please contact your representative.
20
+ | Name | Scope | Type | Description | Example
21
+ | ---- | ----- | ---- | ----------- | -------
22
+ | `delDomain` or `platform` | required | String | OpenX delivery domain or platform id provided by your OpenX representative. | "PUBLISHER-d.openx.net" or "555not5a-real-plat-form-id0123456789"
23
+ | `unit` | required | String | OpenX ad unit ID provided by your OpenX representative. | "1611023122"
24
+ | `customParams` | optional | Object | User-defined targeting key-value pairs. customParams applies to a specific unit. | `{key1: "v1", key2: ["v2","v3"]}`
25
+ | `customFloor` | optional | Number | Minimum price in USD. customFloor applies to a specific unit. For example, use the following value to set a $1.50 floor: 1.50 <br/><br/> **WARNING:**<br/> Misuse of this parameter can impact revenue | 1.50
26
+ | `doNotTrack` | optional | Boolean | Prevents advertiser from using data for this user. <br/><br/> **WARNING:**<br/> Request-level setting. May impact revenue. | true
27
+ | `coppa` | optional | Boolean | Enables Child's Online Privacy Protection Act (COPPA) regulations. Use of `pbjs.setConfig({coppa: true});` is now preferred. | true
28
28
 
29
29
  ## Video
30
30
 
31
- | Name | Scope | Type | Description | Example |
32
- |-------------|----------|--------------------|--------------------------------------------------------------|----------------------------------------------------------------|
33
- | `unit` | required | String | OpenX ad unit ID provided by your OpenX representative. | "1611023122" |
34
- | `delDomain` | required | String | OpenX delivery domain provided by your OpenX representative. | "PUBLISHER-d.openx.net" |
35
- | `openrtb` | optional | OpenRTB Impression | An OpenRtb Impression with Video subtype properties | `{ imp: [{ video: {mimes: ['video/x-ms-wmv, video/mp4']} }] }` |
31
+ | Name | Scope | Type | Description | Example
32
+ | ---- | ----- | ---- | ----------- | -------
33
+ | `unit` | required | String | OpenX ad unit ID provided by your OpenX representative. | "1611023122"
34
+ | `delDomain` | required | String | OpenX delivery domain provided by your OpenX representative. | "PUBLISHER-d.openx.net"
35
+ | `video` | optional | OpenRTB video subtypes | Use of adUnit.mediaTypes.video is now preferred. | `{ video: {mimes: ['video/mp4']}`
36
+
36
37
 
37
38
  # Example
38
39
  ```javascript
@@ -70,7 +71,8 @@ var adUnits = [
70
71
  mediaTypes: {
71
72
  video: {
72
73
  playerSize: [640, 480],
73
- context: 'instream'
74
+ context: 'instream',
75
+ mimes: ['video/x-ms-wmv, video/mp4']
74
76
  }
75
77
  },
76
78
  bids: [{
@@ -79,10 +81,10 @@ var adUnits = [
79
81
  unit: '1611023124',
80
82
  delDomain: 'PUBLISHER-d.openx.net',
81
83
  video: {
82
- mimes: ['video/x-ms-wmv, video/mp4']
84
+ mimes: ['video/x-ms-wmv, video/mp4'] // mediaTypes.video preferred
83
85
  }
84
86
  }
85
- }]
87
+ }]p
86
88
  }
87
89
  ];
88
90
  ```
@@ -29,9 +29,6 @@ const converter = ortbConverter({
29
29
  },
30
30
  imp(buildImp, bidRequest, context) {
31
31
  const imp = buildImp(bidRequest, context);
32
- if (bidRequest.mediaTypes[VIDEO]?.context === 'outstream') {
33
- imp.video.placement = imp.video.placement || 4;
34
- }
35
32
  mergeDeep(imp, {
36
33
  tagid: bidRequest.params.unit,
37
34
  ext: {
@@ -132,15 +129,20 @@ const converter = ortbConverter({
132
129
  }
133
130
  },
134
131
  video(orig, imp, bidRequest, context) {
135
- // `orig` is the video imp processor, which looks at bidRequest.mediaTypes[VIDEO]
136
- // to populate imp.video
137
- // alter its input `bidRequest` to also pick up parameters from `bidRequest.params`
138
- let videoParams = bidRequest.mediaTypes[VIDEO];
139
- if (videoParams) {
140
- videoParams = Object.assign({}, videoParams, bidRequest.params.video);
141
- bidRequest = {...bidRequest, mediaTypes: {[VIDEO]: videoParams}}
132
+ if (FEATURES.VIDEO) {
133
+ // `orig` is the video imp processor, which looks at bidRequest.mediaTypes[VIDEO]
134
+ // to populate imp.video
135
+ // alter its input `bidRequest` to also pick up parameters from `bidRequest.params`
136
+ let videoParams = bidRequest.mediaTypes[VIDEO];
137
+ if (videoParams) {
138
+ videoParams = Object.assign({}, videoParams, bidRequest.params.video);
139
+ bidRequest = {...bidRequest, mediaTypes: {[VIDEO]: videoParams}}
140
+ }
141
+ orig(imp, bidRequest, context);
142
+ if (imp.video && videoParams?.context === 'outstream') {
143
+ imp.video.placement = imp.video.placement || 4;
144
+ }
142
145
  }
143
- orig(imp, bidRequest, context);
144
146
  }
145
147
  }
146
148
  }
@@ -1,15 +1,17 @@
1
1
  # Overview
2
2
 
3
3
  ```
4
- Module Name: OpenX OpenRTB Bidder Adapter
4
+ Module Name: OpenX Bidder Adapter
5
5
  Module Type: Bidder Adapter
6
6
  Maintainer: team-openx@openx.com
7
7
  ```
8
8
 
9
9
  # Description
10
+ DEPRECATED. Use openxBidAdapter.
10
11
 
11
- This is an updated version of the OpenX bid adapter which calls our new serving architecture.
12
- Publishers are welcome to test this adapter and give feedback. Please note you should only include either openxBidAdapter or openxOrtbBidAdapter in your build.
12
+ This adapter was originally an adapter used to test OpenX serving architecture changes.
13
+ This adapter now mirrors openxBidAdapter and this adapter will be removed in a future release. Please use openxBidAdapter.
14
+ Please note you should only include either openxBidAdapter or openxOrtbBidAdapter in your build.
13
15
 
14
16
  # Bid Parameters
15
17
  ## Banner
@@ -228,7 +228,7 @@ function buildOpenRtbBidRequest(bidRequest, bidderRequest) {
228
228
  // build OpenRTB request body
229
229
  const payload = {
230
230
  id: bidderRequest.auctionId,
231
- tmax: bidderRequest.timeout || config.getConfig('bidderTimeout'),
231
+ tmax: bidderRequest.timeout,
232
232
  test: config.getConfig('debug') ? 1 : 0,
233
233
  imp: createImp(bidRequest),
234
234
  device: getDevice(),
@@ -1211,7 +1211,7 @@ export const spec = {
1211
1211
  // bidderRequest has timeout property if publisher sets during calling requestBids function from page
1212
1212
  // if not bidderRequest contains global value set by Prebid
1213
1213
  if (bidderRequest?.timeout) {
1214
- payload.tmax = bidderRequest.timeout || config.getConfig('bidderTimeout');
1214
+ payload.tmax = bidderRequest.timeout;
1215
1215
  } else {
1216
1216
  payload.tmax = window?.PWT?.versionDetails?.timeout;
1217
1217
  }
@@ -1,4 +1,4 @@
1
- import { deepSetValue } from '../src/utils.js';
1
+ import { deepSetValue, deepAccess } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
 
4
4
  const BIDDER_CODE = 'pubx';
@@ -16,8 +16,11 @@ export const spec = {
16
16
  const bidId = bidRequest.bidId;
17
17
  const params = bidRequest.params;
18
18
  const sid = params.sid;
19
+ const pageUrl = deepAccess(bidRequest, 'ortb2.site.page').replace(/\?.*$/, '');
20
+ const pageEnc = encodeURIComponent(pageUrl);
19
21
  const payload = {
20
- sid: sid
22
+ sid: sid,
23
+ pu: pageEnc,
21
24
  };
22
25
  return {
23
26
  id: bidId,
@@ -384,7 +384,7 @@ function generateGeneralParams(generalObject, bidderRequest) {
384
384
  const {syncEnabled, filterSettings} = config.getConfig('userSync') || {};
385
385
  const {bidderCode} = bidderRequest;
386
386
  const generalBidParams = generalObject.params;
387
- const timeout = config.getConfig('bidderTimeout');
387
+ const timeout = bidderRequest.timeout;
388
388
 
389
389
  // these params are snake_case instead of camelCase to allow backwards compatability on the server.
390
390
  // in the future, these will be converted to camelCase to match our convention.
@@ -5,12 +5,13 @@
5
5
  * @requires module:modules/userId
6
6
  */
7
7
 
8
- import { parseUrl, buildUrl, triggerPixel, logInfo, hasDeviceAccess, generateUUID } from '../src/utils.js';
8
+ import {parseUrl, buildUrl, triggerPixel, logInfo, hasDeviceAccess, generateUUID} from '../src/utils.js';
9
9
  import {submodule} from '../src/hook.js';
10
- import { coppaDataHandler } from '../src/adapterManager.js';
10
+ import {coppaDataHandler} from '../src/adapterManager.js';
11
11
  import {getStorageManager} from '../src/storageManager.js';
12
12
  import {VENDORLESS_GVLID} from '../src/consentHandler.js';
13
13
  import {MODULE_TYPE_UID} from '../src/activities/modules.js';
14
+ import {domainOverrideToRootDomain} from '../libraries/domainOverrideToRootDomain/index.js';
14
15
 
15
16
  export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'pubCommonId'});
16
17
  const COOKIE = 'cookie';
@@ -172,31 +173,7 @@ export const sharedIdSystemSubmodule = {
172
173
  }
173
174
  },
174
175
 
175
- domainOverride: function () {
176
- const domainElements = document.domain.split('.');
177
- const cookieName = `_gd${Date.now()}`;
178
- for (let i = 0, topDomain, testCookie; i < domainElements.length; i++) {
179
- const nextDomain = domainElements.slice(i).join('.');
180
-
181
- // write test cookie
182
- storage.setCookie(cookieName, '1', undefined, undefined, nextDomain);
183
-
184
- // read test cookie to verify domain was valid
185
- testCookie = storage.getCookie(cookieName);
186
-
187
- // delete test cookie
188
- storage.setCookie(cookieName, '', 'Thu, 01 Jan 1970 00:00:01 GMT', undefined, nextDomain);
189
-
190
- if (testCookie === '1') {
191
- // cookie was written successfully using test domain so the topDomain is updated
192
- topDomain = nextDomain;
193
- } else {
194
- // cookie failed to write using test domain so exit by returning the topDomain
195
- return topDomain;
196
- }
197
- }
198
- }
199
-
176
+ domainOverride: domainOverrideToRootDomain(storage, 'sharedId'),
200
177
  };
201
178
 
202
179
  submodule('userId', sharedIdSystemSubmodule);
@@ -21,7 +21,7 @@ export const sharethroughAdapterSpec = {
21
21
  isBidRequestValid: bid => !!bid.params.pkey && bid.bidder === BIDDER_CODE,
22
22
 
23
23
  buildRequests: (bidRequests, bidderRequest) => {
24
- const timeout = config.getConfig('bidderTimeout');
24
+ const timeout = bidderRequest.timeout;
25
25
  const firstPartyData = bidderRequest.ortb2 || {};
26
26
 
27
27
  const nonHttp = sharethroughInternal.getProtocol().indexOf('http') < 0;
@@ -364,7 +364,7 @@ function generateGeneralParams(generalObject, bidderRequest) {
364
364
  const {syncEnabled, filterSettings} = config.getConfig('userSync') || {};
365
365
  const {bidderCode} = bidderRequest;
366
366
  const generalBidParams = generalObject.params;
367
- const timeout = config.getConfig('bidderTimeout');
367
+ const timeout = bidderRequest.timeout;
368
368
 
369
369
  // these params are snake_case instead of camelCase to allow backwards compatability on the server.
370
370
  // in the future, these will be converted to camelCase to match our convention.
@@ -125,7 +125,7 @@ function buildRequestParams(bidderRequest = {}, placements = []) {
125
125
  coppa: config.getConfig('coppa') === true ? 1 : 0,
126
126
  ccpa: bidderRequest.uspConsent || undefined,
127
127
  gdpr: bidderRequest.gdprConsent || undefined,
128
- tmax: config.getConfig('bidderTimeout')
128
+ tmax: bidderRequest.timeout
129
129
  };
130
130
  }
131
131
 
@@ -49,9 +49,7 @@ export const spec = {
49
49
  imp: []
50
50
  };
51
51
 
52
- const callbackTimeout = bidderRequest.timeout;
53
- const globalTimeout = config.getConfig('bidderTimeout');
54
- const tmax = globalTimeout ? Math.min(globalTimeout, callbackTimeout) : callbackTimeout;
52
+ const tmax = bidderRequest.timeout;
55
53
  if (tmax) {
56
54
  openRtbBidRequest.tmax = tmax;
57
55
  }
@@ -1,6 +1,5 @@
1
1
  import { deepAccess, getUniqueIdentifierStr } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
- import { config } from '../src/config.js';
4
3
  import { BANNER } from '../src/mediaTypes.js';
5
4
 
6
5
  const SUPPORTED_AD_TYPES = [BANNER];
@@ -140,7 +139,7 @@ function buildCommonQueryParamsFromBids(validBidRequests, bidderRequest) {
140
139
  device: {
141
140
  ua: window.navigator.userAgent
142
141
  },
143
- tmax: config.getConfig('bidderTimeout')
142
+ tmax: bidderRequest.timeout
144
143
  };
145
144
 
146
145
  return defaultParams;
@@ -146,6 +146,24 @@ export const USER_IDS_CONFIG = {
146
146
  }
147
147
  },
148
148
 
149
+ // bidswitchId
150
+ 'bidswitch': {
151
+ source: 'bidswitch.net',
152
+ atype: 3,
153
+ getValue: function(data) {
154
+ return data.id;
155
+ }
156
+ },
157
+
158
+ // medianetId
159
+ 'medianet': {
160
+ source: 'media.net',
161
+ atype: 3,
162
+ getValue: function(data) {
163
+ return data.id;
164
+ }
165
+ },
166
+
149
167
  // britepoolId
150
168
  'britepoolid': {
151
169
  source: 'britepool.com',
@@ -105,6 +105,22 @@ userIdAsEids = [
105
105
  segments: ['s1', 's2']
106
106
  }
107
107
  },
108
+
109
+ {
110
+ source: 'bidswitch.net',
111
+ uids: [{
112
+ id: 'some-random-id-value',
113
+ atype: 3
114
+ }]
115
+ },
116
+
117
+ {
118
+ source: 'media.net',
119
+ uids: [{
120
+ id: 'some-random-id-value',
121
+ atype: 3
122
+ }]
123
+ },
108
124
 
109
125
  {
110
126
  source: 'merkleinc.com',
@@ -80,7 +80,7 @@ export const spec = {
80
80
  domain: parseUrl(page).hostname,
81
81
  page: page,
82
82
  },
83
- tmax: bidderRequest.timeout || config.getConfig('bidderTimeout') || 500,
83
+ tmax: bidderRequest.timeout,
84
84
  imp
85
85
  };
86
86
 
@@ -74,6 +74,26 @@ function serializeSupplyChainObj(schainObj) {
74
74
  return serializedSchain;
75
75
  }
76
76
 
77
+ /**
78
+ * Gets highest floor between getFloor.floor and params.bidfloor
79
+ * @param {Object} bid
80
+ * @param {Object} mediaType
81
+ * @param {Array} sizes
82
+ * @param {Number} bidfloor
83
+ * @returns {Number} floor
84
+ */
85
+ function getBidFloor(bid, mediaType, sizes, bidfloor) {
86
+ let floor = bidfloor;
87
+ var size = sizes && sizes.length > 0 ? sizes[0] : '*';
88
+ if (typeof bid.getFloor === 'function') {
89
+ const floorInfo = bid.getFloor({currency: 'USD', mediaType, size});
90
+ if (typeof floorInfo === 'object' && floorInfo.currency === 'USD' && !isNaN(parseFloat(floorInfo.floor))) {
91
+ floor = Math.max(bidfloor, parseFloat(floorInfo.floor));
92
+ }
93
+ }
94
+ return floor;
95
+ }
96
+
77
97
  const isBidResponseValid = bid => {
78
98
  if (!bid || !bid.requestId || !bid.cpm || !bid.ttl || !bid.currency) {
79
99
  return false;
@@ -106,6 +126,7 @@ const buildRequests = (validBidRequests, bidderRequest) => {
106
126
 
107
127
  const videoContext = deepAccess(bid, 'mediaTypes.video.context');
108
128
  const bidfloor = deepAccess(bid, `params.bidfloor`, 0);
129
+ const floor = getBidFloor(bid, adType, sizes, bidfloor);
109
130
 
110
131
  const queryParams = {
111
132
  id: bid.params.id,
@@ -120,7 +141,7 @@ const buildRequests = (validBidRequests, bidderRequest) => {
120
141
  pid: bid.params.pid,
121
142
  requestId: bid.bidId,
122
143
  schain: serializeSupplyChainObj(bid.schain) || '',
123
- bidfloor,
144
+ bidfloor: floor,
124
145
  d: getDomainWithoutSubdomain(hostname), // 'vidoomy.com',
125
146
  // TODO: does the fallback make sense here?
126
147
  sp: encodeURIComponent(bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation),
@@ -155,7 +155,7 @@ export const spec = {
155
155
  coppa: config.getConfig('coppa') === true ? 1 : 0,
156
156
  ccpa: bidderRequest.uspConsent || undefined,
157
157
  gdpr: bidderRequest.gdprConsent || undefined,
158
- tmax: config.getConfig('bidderTimeout')
158
+ tmax: bidderRequest.timeout
159
159
  };
160
160
 
161
161
  const len = validBidRequests.length;
@@ -46,7 +46,7 @@ export const spec = {
46
46
  coppa = 1;
47
47
  }
48
48
 
49
- tmax = config.getConfig('bidderTimeout');
49
+ tmax = bid.timeout;
50
50
 
51
51
  const params = {
52
52
  prebidJS: 1,
@@ -53,7 +53,7 @@ export const spec = {
53
53
  const bidId = bidRequest.bidId;
54
54
  const transactionId = bidRequest.transactionId;
55
55
  const unitCode = bidRequest.adUnitCode;
56
- const timeout = config.getConfig('bidderTimeout');
56
+ const timeout = bidderRequest.timeout;
57
57
  const language = window.navigator.language;
58
58
  const screenSize = window.screen.width + 'x' + window.screen.height;
59
59
  const payload = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "7.44.0",
3
+ "version": "7.45.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
package/src/Renderer.js CHANGED
@@ -22,6 +22,7 @@ export function Renderer(options) {
22
22
  this.config = config;
23
23
  this.handlers = {};
24
24
  this.id = id;
25
+ this.renderNow = renderNow;
25
26
 
26
27
  // a renderer may push to the command queue to delay rendering until the
27
28
  // render function is loaded by loadExternalScript, at which point the the command
@@ -110,7 +111,7 @@ Renderer.prototype.process = function() {
110
111
  * @returns {Boolean}
111
112
  */
112
113
  export function isRendererRequired(renderer) {
113
- return !!(renderer && renderer.url);
114
+ return !!(renderer && (renderer.url || renderer.renderNow));
114
115
  }
115
116
 
116
117
  /**
package/src/native.js CHANGED
@@ -750,7 +750,11 @@ export function toLegacyResponse(ortbResponse, ortbRequest) {
750
750
  if (asset.title) {
751
751
  legacyResponse.title = asset.title.text;
752
752
  } else if (asset.img) {
753
- legacyResponse[requestAsset.img.type === NATIVE_IMAGE_TYPES.MAIN ? 'image' : 'icon'] = asset.img.url;
753
+ legacyResponse[requestAsset.img.type === NATIVE_IMAGE_TYPES.MAIN ? 'image' : 'icon'] = {
754
+ url: asset.img.url,
755
+ width: asset.img.w,
756
+ height: asset.img.h
757
+ };
754
758
  } else if (asset.data) {
755
759
  legacyResponse[PREBID_NATIVE_DATA_KEYS_TO_ORTB_INVERSE[NATIVE_ASSET_TYPES_INVERSE[requestAsset.data.type]]] = asset.data.value;
756
760
  }
@@ -1403,8 +1403,8 @@ describe('auctionmanager.js', function () {
1403
1403
  assert.equal(addedBid.native.title, 'Sample title')
1404
1404
  assert.equal(addedBid.native.sponsoredBy, 'Sample sponsoredBy')
1405
1405
  assert.equal(addedBid.native.clickUrl, 'http://www.click.com')
1406
- assert.equal(addedBid.native.image, 'https://www.example.com/image.png')
1407
- assert.equal(addedBid.native.icon, 'https://www.example.com/icon.png')
1406
+ assert.equal(addedBid.native.image.url, 'https://www.example.com/image.png')
1407
+ assert.equal(addedBid.native.icon.url, 'https://www.example.com/icon.png')
1408
1408
  assert.equal(addedBid.native.impressionTrackers[0], 'http://www.imptracker.com')
1409
1409
  assert.equal(addedBid.native.javascriptTrackers, '<script async src="http://www.jstracker.com/file.js"></script>')
1410
1410
  });
@@ -0,0 +1,77 @@
1
+ import {domainOverrideToRootDomain} from 'libraries/domainOverrideToRootDomain/index.js';
2
+ import {getStorageManager} from 'src/storageManager.js';
3
+ import {MODULE_TYPE_UID} from '../../../../src/activities/modules';
4
+
5
+ const storage = getStorageManager({ moduleName: 'test', moduleType: MODULE_TYPE_UID });
6
+ const domainOverride = domainOverrideToRootDomain(storage, 'test');
7
+
8
+ describe('domainOverride', () => {
9
+ let sandbox, domain, cookies, rejectCookiesFor;
10
+ let setCookieStub;
11
+
12
+ beforeEach(() => {
13
+ sandbox = sinon.createSandbox();
14
+ sandbox.stub(document, 'domain').get(() => domain);
15
+ cookies = {};
16
+ sandbox.stub(storage, 'getCookie').callsFake((key) => cookies[key]);
17
+ rejectCookiesFor = null;
18
+ setCookieStub = sandbox.stub(storage, 'setCookie').callsFake((key, value, expires, sameSite, domain) => {
19
+ if (domain !== rejectCookiesFor) {
20
+ if (expires != null) {
21
+ expires = new Date(expires);
22
+ }
23
+ if (expires == null || expires > Date.now()) {
24
+ cookies[key] = value;
25
+ } else {
26
+ delete cookies[key];
27
+ }
28
+ }
29
+ });
30
+ });
31
+
32
+ afterEach(() => sandbox.restore())
33
+
34
+ it('test cookies include the module name', () => {
35
+ domain = 'greatpublisher.com'
36
+ rejectCookiesFor = 'greatpublisher.com'
37
+
38
+ // stub Date.now() to return a constant value
39
+ sandbox.stub(Date, 'now').returns(1234567890)
40
+
41
+ const randomName = `adapterV${(Math.random() * 1e8).toString(16)}`
42
+ const localDomainOverride = domainOverrideToRootDomain(storage, randomName)
43
+
44
+ const time = Date.now();
45
+ localDomainOverride();
46
+
47
+ sandbox.assert.callCount(setCookieStub, 2)
48
+ sandbox.assert.calledWith(setCookieStub, `_gd${time}_${randomName}`, '1', undefined, undefined, 'greatpublisher.com')
49
+ });
50
+
51
+ it('will return the root domain when given a subdomain', () => {
52
+ const test_domains = [
53
+ 'deeply.nested.subdomain.for.greatpublisher.com',
54
+ 'greatpublisher.com',
55
+ 'subdomain.greatpublisher.com',
56
+ 'a-subdomain.greatpublisher.com',
57
+ ];
58
+
59
+ test_domains.forEach((testDomain) => {
60
+ domain = testDomain
61
+ rejectCookiesFor = 'com'
62
+ expect(domainOverride()).to.equal('greatpublisher.com');
63
+ });
64
+ });
65
+
66
+ it(`If we can't set cookies on the root domain, we'll return the subdomain`, () => {
67
+ domain = 'subdomain.greatpublisher.com'
68
+ rejectCookiesFor = 'greatpublisher.com'
69
+ expect(domainOverride()).to.equal('subdomain.greatpublisher.com');
70
+ });
71
+
72
+ it('Will return undefined if we can\'t set cookies on the root domain or the subdomain', () => {
73
+ domain = 'subdomain.greatpublisher.com'
74
+ rejectCookiesFor = 'subdomain.greatpublisher.com'
75
+ expect(domainOverride()).to.equal(undefined);
76
+ });
77
+ });
@@ -76,7 +76,8 @@ describe('AcuityAdsBidAdapter', function () {
76
76
  gdprConsent: 'COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
77
77
  refererInfo: {
78
78
  referer: 'https://test.com'
79
- }
79
+ },
80
+ timeout: 500
80
81
  };
81
82
 
82
83
  describe('isBidRequestValid', function () {
@@ -1,4 +1,4 @@
1
- import { amxIdSubmodule } from 'modules/amxIdSystem.js';
1
+ import { amxIdSubmodule, storage } from 'modules/amxIdSystem.js';
2
2
  import { server } from 'test/mocks/xhr.js';
3
3
  import * as utils from 'src/utils.js';
4
4
 
@@ -48,38 +48,17 @@ describe('validateConfig', () => {
48
48
  logErrorSpy.restore();
49
49
  });
50
50
 
51
- it('should return undefined if config.storage is not present', () => {
51
+ it('should allow configuration with no storage', () => {
52
52
  expect(
53
53
  amxIdSubmodule.getId(
54
54
  {
55
55
  ...config,
56
- storage: null,
56
+ storage: undefined
57
57
  },
58
58
  null,
59
59
  null
60
60
  )
61
- ).to.equal(undefined);
62
-
63
- expect(logErrorSpy.calledOnce).to.be.true;
64
- expect(logErrorSpy.lastCall.lastArg).to.contain('storage is required');
65
- });
66
-
67
- it('should return undefined if config.storage.type !== "html5"', () => {
68
- expect(
69
- amxIdSubmodule.getId(
70
- {
71
- ...config,
72
- storage: {
73
- type: 'cookie',
74
- },
75
- },
76
- null,
77
- null
78
- )
79
- ).to.equal(undefined);
80
-
81
- expect(logErrorSpy.calledOnce).to.be.true;
82
- expect(logErrorSpy.lastCall.lastArg).to.contain('cookie');
61
+ ).to.not.equal(undefined);
83
62
  });
84
63
 
85
64
  it('should return undefined if expires > 30', () => {
@@ -111,10 +90,18 @@ describe('getId', () => {
111
90
  });
112
91
 
113
92
  it('should call the sync endpoint and accept a valid response', () => {
93
+ storage.setDataInLocalStorage('__amuidpb', TEST_ID);
94
+
114
95
  const { callback } = amxIdSubmodule.getId(config, null, null);
115
96
  callback(spy);
116
97
 
117
98
  const [request] = server.requests;
99
+ expect(request.withCredentials).to.be.true
100
+ expect(request.requestHeaders['Content-Type']).to.match(/text\/plain/)
101
+
102
+ const { search } = utils.parseUrl(request.url);
103
+ expect(search.av).to.equal(amxIdSubmodule.version);
104
+ expect(search.am).to.equal(TEST_ID);
118
105
  expect(request.method).to.equal('GET');
119
106
 
120
107
  request.respond(
@@ -187,7 +174,7 @@ describe('getId', () => {
187
174
  );
188
175
 
189
176
  const [, secondRequest] = server.requests;
190
- expect(secondRequest.url).to.be.equal(intermediateValue);
177
+ expect(secondRequest.url).to.match(new RegExp(`^${intermediateValue}\?`));
191
178
  secondRequest.respond(
192
179
  200,
193
180
  {},