prebid.js 8.2.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/admanBidAdapter.js +1 -1
  7. package/dist/adqueryBidAdapter.js +1 -1
  8. package/dist/adrelevantisBidAdapter.js +1 -1
  9. package/dist/adtelligentBidAdapter.js +1 -1
  10. package/dist/adtrgtmeBidAdapter.js +1 -1
  11. package/dist/adxcgBidAdapter.js +1 -1
  12. package/dist/adyoulikeBidAdapter.js +1 -1
  13. package/dist/ajaBidAdapter.js +1 -1
  14. package/dist/amxBidAdapter.js +1 -1
  15. package/dist/amxIdSystem.js +1 -1
  16. package/dist/appierAnalyticsAdapter.js +1 -1
  17. package/dist/appnexusBidAdapter.js +1 -1
  18. package/dist/asoBidAdapter.js +1 -1
  19. package/dist/axonixBidAdapter.js +1 -1
  20. package/dist/beopBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/brandmetricsRtdProvider.js +1 -1
  24. package/dist/bridBidAdapter.js +1 -1
  25. package/dist/bridgewellBidAdapter.js +1 -1
  26. package/dist/brightMountainMediaBidAdapter.js +1 -1
  27. package/dist/carodaBidAdapter.js +1 -1
  28. package/dist/chtnwBidAdapter.js +1 -1
  29. package/dist/concertBidAdapter.js +1 -1
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dependencies.json +6 -0
  38. package/dist/discoveryBidAdapter.js +1 -1
  39. package/dist/dspxBidAdapter.js +1 -1
  40. package/dist/eplanningBidAdapter.js +1 -1
  41. package/dist/euidIdSystem.js +1 -1
  42. package/dist/feedadBidAdapter.js +1 -1
  43. package/dist/finativeBidAdapter.js +1 -1
  44. package/dist/freewheel-sspBidAdapter.js +1 -1
  45. package/dist/gdprEnforcement.js +1 -1
  46. package/dist/gmosspBidAdapter.js +1 -1
  47. package/dist/goldbachBidAdapter.js +1 -1
  48. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  49. package/dist/greenbidsRtdProvider.js +1 -1
  50. package/dist/gridBidAdapter.js +1 -1
  51. package/dist/gumgumBidAdapter.js +1 -1
  52. package/dist/h12mediaBidAdapter.js +1 -1
  53. package/dist/holidBidAdapter.js +1 -1
  54. package/dist/hypelabBidAdapter.js +1 -1
  55. package/dist/id5IdSystem.js +1 -1
  56. package/dist/imdsBidAdapter.js +1 -1
  57. package/dist/improvedigitalBidAdapter.js +1 -1
  58. package/dist/insticatorBidAdapter.js +1 -1
  59. package/dist/ixBidAdapter.js +1 -1
  60. package/dist/justpremiumBidAdapter.js +1 -1
  61. package/dist/kargoBidAdapter.js +1 -1
  62. package/dist/konduitAnalyticsAdapter.js +1 -1
  63. package/dist/kueezBidAdapter.js +1 -1
  64. package/dist/kueezRtbBidAdapter.js +1 -1
  65. package/dist/kulturemediaBidAdapter.js +1 -1
  66. package/dist/lassoBidAdapter.js +1 -1
  67. package/dist/lifestreetBidAdapter.js +1 -1
  68. package/dist/livewrappedAnalyticsAdapter.js +1 -1
  69. package/dist/logicadBidAdapter.js +1 -1
  70. package/dist/loglyliftBidAdapter.js +1 -1
  71. package/dist/magniteAnalyticsAdapter.js +1 -1
  72. package/dist/malltvAnalyticsAdapter.js +1 -1
  73. package/dist/marsmediaBidAdapter.js +1 -1
  74. package/dist/mediafuseBidAdapter.js +1 -1
  75. package/dist/mediagoBidAdapter.js +1 -1
  76. package/dist/mediasquareBidAdapter.js +1 -1
  77. package/dist/mgidBidAdapter.js +1 -1
  78. package/dist/minutemediaBidAdapter.js +1 -1
  79. package/dist/minutemediaplusBidAdapter.js +1 -1
  80. package/dist/nexx360BidAdapter.js +1 -1
  81. package/dist/not-for-prod/prebid.js +143 -143
  82. package/dist/oguryBidAdapter.js +1 -1
  83. package/dist/onetagBidAdapter.js +1 -1
  84. package/dist/ooloAnalyticsAdapter.js +1 -1
  85. package/dist/optidigitalBidAdapter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/parrableIdSystem.js +1 -1
  88. package/dist/pixfutureBidAdapter.js +1 -1
  89. package/dist/prebid-core.js +2 -2
  90. package/dist/publinkIdSystem.js +1 -1
  91. package/dist/pubmaticBidAdapter.js +1 -1
  92. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  93. package/dist/pulsepointBidAdapter.js +1 -1
  94. package/dist/pxyzBidAdapter.js +1 -1
  95. package/dist/quantcastBidAdapter.js +1 -1
  96. package/dist/readpeakBidAdapter.js +1 -1
  97. package/dist/relaidoBidAdapter.js +1 -1
  98. package/dist/retailspotBidAdapter.js +1 -1
  99. package/dist/rhythmoneBidAdapter.js +1 -1
  100. package/dist/riseBidAdapter.js +1 -1
  101. package/dist/rubiconBidAdapter.js +1 -1
  102. package/dist/seedingAllianceBidAdapter.js +1 -1
  103. package/dist/seedtagBidAdapter.js +1 -1
  104. package/dist/sharedIdSystem.js +1 -1
  105. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  106. package/dist/sharethroughBidAdapter.js +1 -1
  107. package/dist/shinezBidAdapter.js +1 -1
  108. package/dist/smaatoBidAdapter.js +1 -1
  109. package/dist/smartadserverBidAdapter.js +1 -1
  110. package/dist/smartxBidAdapter.js +1 -1
  111. package/dist/smartyadsBidAdapter.js +1 -1
  112. package/dist/smilewantedBidAdapter.js +1 -1
  113. package/dist/sonobiBidAdapter.js +1 -1
  114. package/dist/sovrnAnalyticsAdapter.js +1 -1
  115. package/dist/sovrnBidAdapter.js +1 -1
  116. package/dist/sspBCBidAdapter.js +1 -1
  117. package/dist/stroeerCoreBidAdapter.js +1 -1
  118. package/dist/stvBidAdapter.js +1 -1
  119. package/dist/sublimeBidAdapter.js +1 -1
  120. package/dist/targetVideoBidAdapter.js +1 -1
  121. package/dist/teadsBidAdapter.js +1 -1
  122. package/dist/topicsFpdModule.js +1 -1
  123. package/dist/trafficgateBidAdapter.js +1 -1
  124. package/dist/trionBidAdapter.js +1 -1
  125. package/dist/tripleliftBidAdapter.js +1 -1
  126. package/dist/ttdBidAdapter.js +1 -1
  127. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  128. package/dist/uid2IdSystem.js +1 -1
  129. package/dist/underdogmediaBidAdapter.js +1 -1
  130. package/dist/undertoneBidAdapter.js +1 -1
  131. package/dist/userId.js +1 -1
  132. package/dist/vidazooBidAdapter.js +1 -1
  133. package/dist/videobyteBidAdapter.js +1 -1
  134. package/dist/visxBidAdapter.js +1 -1
  135. package/dist/voxBidAdapter.js +1 -1
  136. package/dist/vuukleBidAdapter.js +1 -1
  137. package/dist/widespaceBidAdapter.js +1 -1
  138. package/dist/winrBidAdapter.js +1 -1
  139. package/dist/yahoosspBidAdapter.js +1 -1
  140. package/dist/yandexBidAdapter.js +1 -1
  141. package/dist/yieldmoBidAdapter.js +1 -1
  142. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  143. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  144. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  145. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  146. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  147. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  148. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  149. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  150. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  151. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  152. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  153. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  154. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  155. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  156. package/modules/33acrossBidAdapter.js +24 -14
  157. package/modules/33acrossIdSystem.js +15 -4
  158. package/modules/adagioBidAdapter.js +2 -2
  159. package/modules/admanBidAdapter.js +4 -0
  160. package/modules/adtelligentBidAdapter.js +8 -0
  161. package/modules/beopBidAdapter.js +6 -6
  162. package/modules/beopBidAdapter.md +35 -1
  163. package/modules/brandmetricsRtdProvider.js +36 -2
  164. package/modules/brandmetricsRtdProvider.md +17 -2
  165. package/modules/cadentApertureMXBidAdapter.md +2 -2
  166. package/modules/discoveryBidAdapter.js +1 -1
  167. package/modules/gdprEnforcement.js +27 -22
  168. package/modules/gridBidAdapter.js +19 -0
  169. package/modules/holidBidAdapter.js +49 -30
  170. package/modules/ixBidAdapter.js +41 -2
  171. package/modules/kargoBidAdapter.js +4 -0
  172. package/modules/livewrappedAnalyticsAdapter.js +33 -33
  173. package/modules/mediagoBidAdapter.js +1 -0
  174. package/modules/minutemediaBidAdapter.js +17 -2
  175. package/modules/oguryBidAdapter.js +29 -16
  176. package/modules/pubmaticBidAdapter.js +16 -1
  177. package/modules/pulsepointBidAdapter.js +63 -424
  178. package/modules/pulsepointBidAdapter.md +39 -45
  179. package/modules/sharedIdSystem.js +1 -1
  180. package/modules/smartyadsBidAdapter.js +6 -3
  181. package/modules/sovrnBidAdapter.js +10 -1
  182. package/modules/stroeerCoreBidAdapter.js +2 -3
  183. package/modules/teadsBidAdapter.js +2 -0
  184. package/modules/topicsFpdModule.js +4 -1
  185. package/modules/topicsFpdModule.md +4 -0
  186. package/modules/trafficgateBidAdapter.js +126 -72
  187. package/modules/userId/index.js +2 -2
  188. package/modules/vidazooBidAdapter.js +69 -19
  189. package/modules/voxBidAdapter.js +16 -5
  190. package/modules/yahoosspBidAdapter.js +38 -33
  191. package/modules/yahoosspBidAdapter.md +96 -95
  192. package/modules/yandexBidAdapter.js +12 -15
  193. package/package.json +1 -1
  194. package/src/activities/redactor.js +1 -1
  195. package/src/auction.js +24 -2
  196. package/src/constants.json +3 -1
  197. package/src/fpd/sua.js +8 -2
  198. package/test/spec/auctionmanager_spec.js +29 -1
  199. package/test/spec/fpd/enrichment_spec.js +7 -1
  200. package/test/spec/fpd/sua_spec.js +12 -0
  201. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  202. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  203. package/test/spec/modules/adagioBidAdapter_spec.js +2 -2
  204. package/test/spec/modules/adtelligentBidAdapter_spec.js +8 -0
  205. package/test/spec/modules/beopBidAdapter_spec.js +18 -2
  206. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  207. package/test/spec/modules/cadentApertureMXBidAdapter_spec.js +1 -1
  208. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  209. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  210. package/test/spec/modules/holidBidAdapter_spec.js +26 -6
  211. package/test/spec/modules/ixBidAdapter_spec.js +84 -6
  212. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  213. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  214. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  215. package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
  216. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  217. package/test/spec/modules/smartyadsBidAdapter_spec.js +1 -1
  218. package/test/spec/modules/sovrnBidAdapter_spec.js +58 -4
  219. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  220. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  221. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  222. package/test/spec/modules/trafficgateBidAdapter_spec.js +1349 -199
  223. package/test/spec/modules/vidazooBidAdapter_spec.js +130 -4
  224. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  225. package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
  226. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  227. package/integrationExamples/gpt/inskin_example.html +0 -100
@@ -9,13 +9,14 @@
9
9
  Module that connects to BeOp's demand sources
10
10
 
11
11
  # Test Parameters
12
+
12
13
  ```
13
14
  var adUnits = [
14
15
  {
15
16
  code: 'in-article',
16
17
  mediaTypes: {
17
18
  banner: {
18
- sizes: [[1,1]],
19
+ sizes: [[1,1]],
19
20
  }
20
21
  },
21
22
  bids: [
@@ -31,3 +32,36 @@ Module that connects to BeOp's demand sources
31
32
  ];
32
33
  ```
33
34
 
35
+ # Custom Bidder data
36
+
37
+ If you want to pass your first party data to BeOp, you can set your bidder `config.ortb2` object with
38
+
39
+ ```json
40
+ {
41
+ "site": {
42
+ "ext": {
43
+ "bpsegs": ["Your", 1, "ST", "party", "data"],
44
+ "data": {
45
+ "bpsegs": ["Your", 1, "ST", "party", "data"]
46
+ }
47
+ }
48
+ },
49
+ "user": {
50
+ "ext": {
51
+ "bpsegs": ["Your", 1, "ST", "party", "data"],
52
+ "data": {
53
+ "bpsegs": ["Your", 1, "ST", "party", "data"]
54
+ }
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ You can choose the location between:
61
+
62
+ - `site.ext`
63
+ - `site.ext.data`
64
+ - `user.ext`
65
+ - `user.ext.data`
66
+
67
+ and our BidAdapter will be able to find them
@@ -6,8 +6,10 @@
6
6
  * @requires module:modules/realTimeData
7
7
  */
8
8
  import {submodule} from '../src/hook.js';
9
- import {deepAccess, deepSetValue, logError, mergeDeep} from '../src/utils.js';
9
+ import {deepAccess, deepSetValue, logError, mergeDeep, generateUUID} from '../src/utils.js';
10
10
  import {loadExternalScript} from '../src/adloader.js';
11
+ import * as events from '../src/events.js';
12
+ import CONSTANTS from '../src/constants.json';
11
13
 
12
14
  const MODULE_NAME = 'brandmetrics'
13
15
  const MODULE_CODE = MODULE_NAME
@@ -15,12 +17,15 @@ const RECEIVED_EVENTS = []
15
17
  const GVL_ID = 422
16
18
  const TCF_PURPOSES = [1, 7]
17
19
 
20
+ let billableEventsInitialized = false
21
+
18
22
  function init (config, userConsent) {
19
23
  const hasConsent = checkConsent(userConsent)
20
24
 
21
25
  if (hasConsent) {
22
26
  const moduleConfig = getMergedConfig(config)
23
27
  initializeBrandmetrics(moduleConfig.params.scriptId)
28
+ initializeBillableEvents()
24
29
  }
25
30
  return hasConsent
26
31
  }
@@ -82,7 +87,6 @@ function processBrandmetricsEvents (reqBidsConfigObj, moduleConfig, callback) {
82
87
  if (RECEIVED_EVENTS.length > 0) {
83
88
  callBidTargeting(RECEIVED_EVENTS[RECEIVED_EVENTS.length - 1])
84
89
  } else {
85
- window._brandmetrics = window._brandmetrics || []
86
90
  window._brandmetrics.push({
87
91
  cmd: '_addeventlistener',
88
92
  val: {
@@ -120,6 +124,8 @@ function setBidderTargeting (reqBidsConfigObj, moduleConfig, key, val) {
120
124
  * @param {string} scriptId - The script- id provided by brandmetrics or brandmetrics partner
121
125
  */
122
126
  function initializeBrandmetrics(scriptId) {
127
+ window._brandmetrics = window._brandmetrics || []
128
+
123
129
  if (scriptId) {
124
130
  const path = 'https://cdn.brandmetrics.com/survey/script/'
125
131
  const file = scriptId + '.js'
@@ -129,6 +135,34 @@ function initializeBrandmetrics(scriptId) {
129
135
  }
130
136
  }
131
137
 
138
+ /**
139
+ * Hook in to brandmetrics creative_in_view- event and emit billable- event for creatives measured by brandmetrics.
140
+ */
141
+ function initializeBillableEvents() {
142
+ if (!billableEventsInitialized) {
143
+ window._brandmetrics.push({
144
+ cmd: '_addeventlistener',
145
+ val: {
146
+ event: 'creative_in_view',
147
+ handler: (ev) => {
148
+ if (ev.source && ev.source.type === 'pbj') {
149
+ const bid = ev.source.data;
150
+ events.emit(CONSTANTS.EVENTS.BILLABLE_EVENT, {
151
+ vendor: 'brandmetrics',
152
+ type: 'creative_in_view',
153
+ measurementId: ev.mid,
154
+ billingId: generateUUID(),
155
+ auctionId: bid.auctionId,
156
+ transactionId: bid.transactionId,
157
+ });
158
+ }
159
+ },
160
+ }
161
+ })
162
+ billableEventsInitialized = true
163
+ }
164
+ }
165
+
132
166
  /**
133
167
  * Merges a provided config with default values
134
168
  * @param {Object} customConfig
@@ -16,10 +16,10 @@ Enable the Brandmetrics RTD in your Prebid configuration, using the below format
16
16
  pbjs.setConfig({
17
17
  ...,
18
18
  realTimeData: {
19
- auctionDelay: 500, // auction delay
19
+ auctionDelay: 500,
20
20
  dataProviders: [{
21
21
  name: 'brandmetrics',
22
- waitForIt: true // should be true if there's an `auctionDelay`,
22
+ waitForIt: true,
23
23
  params: {
24
24
  scriptId: '00000000-0000-0000-0000-000000000000',
25
25
  bidders: ['ozone']
@@ -29,6 +29,7 @@ pbjs.setConfig({
29
29
  ...
30
30
  })
31
31
  ```
32
+ The scriptId- parameter is provided by brandmetrics or a brandmetrics partner.
32
33
 
33
34
  ## Parameters
34
35
  | Name | Type | Description | Default |
@@ -38,3 +39,17 @@ pbjs.setConfig({
38
39
  | params | Object | | - |
39
40
  | params.bidders | String[] | An array of bidders which should receive targeting keys. | `[]` |
40
41
  | params.scriptId | String | A script- id GUID if the brandmetrics- script should be initialized. | `undefined` |
42
+
43
+ ## Billable events
44
+ The module emits a billable event for creatives that are measured by brandmetrics and are considered in- view.
45
+
46
+ ```javascript
47
+ {
48
+ vendor: 'brandmetrics',
49
+ type: 'creative_in_view',
50
+ measurementId: string, // UUID, brandmetrics measurement id
51
+ billingId: string, // UUID, unique billing id
52
+ auctionId: string, // Prebid auction id
53
+ transactionId: string, //Prebid transaction id
54
+ }
55
+ ```
@@ -3,14 +3,14 @@
3
3
  ```
4
4
  Module Name: Cadent Aperture MX Adapter
5
5
  Module Type: Bidder Adapter
6
- Maintainer: git@emxdigital.com
6
+ Maintainer: contactaperturemx@cadent.tv
7
7
  ```
8
8
 
9
9
  # Description
10
10
 
11
11
  The Cadent Aperture MX adapter provides publishers with access to the Cadent Aperture MX SSP. The adapter is GDPR compliant. Please note that the adapter supports Banner and Video (Instream & Outstream) media types.
12
12
 
13
- Note: The Cadent Aperture MX adapter requires approval and implementation guidelines from the Cadent team, including existing publishers that work with Cadent. Please reach out to your account manager or prebid@emxdigital.com for more information.
13
+ Note: The Cadent Aperture MX adapter requires approval and implementation guidelines from the Cadent team, including existing publishers that work with Cadent. Please reach out to your account manager or contactaperturemx@cadent.tv for more information.
14
14
 
15
15
  The bidder code should be ```cadent_aperture_mx```
16
16
  The params used by the bidder are :
@@ -258,7 +258,7 @@ function getItems(validBidRequests, bidderRequest) {
258
258
  format: sizes,
259
259
  },
260
260
  ext: {},
261
- tagid: globals['tagid'],
261
+ tagid: req.params && req.params.tagid
262
262
  };
263
263
  }
264
264
  itemMaps[id] = {
@@ -24,18 +24,19 @@ import {
24
24
  import {registerActivityControl} from '../src/activities/rules.js';
25
25
  import {
26
26
  ACTIVITY_ACCESS_DEVICE,
27
- ACTIVITY_ENRICH_EIDS,
27
+ ACTIVITY_ENRICH_EIDS, ACTIVITY_ENRICH_UFPD,
28
28
  ACTIVITY_FETCH_BIDS,
29
29
  ACTIVITY_REPORT_ANALYTICS,
30
- ACTIVITY_SYNC_USER
30
+ ACTIVITY_SYNC_USER, ACTIVITY_TRANSMIT_UFPD
31
31
  } from '../src/activities/activities.js';
32
32
 
33
33
  export const STRICT_STORAGE_ENFORCEMENT = 'strictStorageEnforcement';
34
34
 
35
35
  const TCF2 = {
36
- 'purpose1': {id: 1, name: 'storage'},
37
- 'purpose2': {id: 2, name: 'basicAds'},
38
- 'purpose7': {id: 7, name: 'measurement'}
36
+ purpose1: {id: 1, name: 'storage'},
37
+ purpose2: {id: 2, name: 'basicAds'},
38
+ purpose4: {id: 4, name: 'personalizedAds'},
39
+ purpose7: {id: 7, name: 'measurement'},
39
40
  };
40
41
 
41
42
  /*
@@ -55,6 +56,7 @@ const DEFAULT_RULES = [{
55
56
 
56
57
  export let purpose1Rule;
57
58
  export let purpose2Rule;
59
+ export let purpose4Rule;
58
60
  export let purpose7Rule;
59
61
 
60
62
  export let enforcementRules;
@@ -62,6 +64,7 @@ export let enforcementRules;
62
64
  const storageBlocked = new Set();
63
65
  const biddersBlocked = new Set();
64
66
  const analyticsBlocked = new Set();
67
+ const ufpdBlocked = new Set();
65
68
 
66
69
  let hooksAdded = false;
67
70
  let strictStorageEnforcement = false;
@@ -232,6 +235,8 @@ export const fetchBidsRule = ((rule) => {
232
235
 
233
236
  export const reportAnalyticsRule = gdprRule(7, () => purpose7Rule, analyticsBlocked, (params) => getGvlidFromAnalyticsAdapter(params[ACTIVITY_PARAM_COMPONENT_NAME], params[ACTIVITY_PARAM_ANL_CONFIG]));
234
237
 
238
+ export const ufpdRule = gdprRule(4, () => purpose4Rule, ufpdBlocked);
239
+
235
240
  /**
236
241
  * Compiles the TCF2.0 enforcement results into an object, which is emitted as an event payload to "tcf2Enforcement" event.
237
242
  */
@@ -243,27 +248,20 @@ function emitTCF2FinalResults() {
243
248
  const tcf2FinalResults = {
244
249
  storageBlocked: formatSet(storageBlocked),
245
250
  biddersBlocked: formatSet(biddersBlocked),
246
- analyticsBlocked: formatSet(analyticsBlocked)
251
+ analyticsBlocked: formatSet(analyticsBlocked),
252
+ ufpdBlocked: formatSet(ufpdBlocked),
247
253
  };
248
254
 
249
255
  events.emit(CONSTANTS.EVENTS.TCF2_ENFORCEMENT, tcf2FinalResults);
250
- [storageBlocked, biddersBlocked, analyticsBlocked].forEach(el => el.clear());
256
+ [storageBlocked, biddersBlocked, analyticsBlocked, ufpdBlocked].forEach(el => el.clear());
251
257
  }
252
258
 
253
259
  events.on(CONSTANTS.EVENTS.AUCTION_END, emitTCF2FinalResults);
254
260
 
255
- /*
256
- Set of callback functions used to detect presence of a TCF rule, passed as the second argument to find().
257
- */
258
- const hasPurpose1 = (rule) => {
259
- return rule.purpose === TCF2.purpose1.name;
260
- };
261
- const hasPurpose2 = (rule) => {
262
- return rule.purpose === TCF2.purpose2.name;
263
- };
264
- const hasPurpose7 = (rule) => {
265
- return rule.purpose === TCF2.purpose7.name;
266
- };
261
+ function hasPurpose(purposeNo) {
262
+ const pname = TCF2[`purpose${purposeNo}`].name;
263
+ return (rule) => rule.purpose === pname;
264
+ }
267
265
 
268
266
  /**
269
267
  * A configuration function that initializes some module variables, as well as adds hooks
@@ -279,9 +277,10 @@ export function setEnforcementConfig(config) {
279
277
  }
280
278
  strictStorageEnforcement = !!deepAccess(config, STRICT_STORAGE_ENFORCEMENT);
281
279
 
282
- purpose1Rule = find(enforcementRules, hasPurpose1);
283
- purpose2Rule = find(enforcementRules, hasPurpose2);
284
- purpose7Rule = find(enforcementRules, hasPurpose7);
280
+ purpose1Rule = find(enforcementRules, hasPurpose(1));
281
+ purpose2Rule = find(enforcementRules, hasPurpose(2));
282
+ purpose4Rule = find(enforcementRules, hasPurpose(4))
283
+ purpose7Rule = find(enforcementRules, hasPurpose(7));
285
284
 
286
285
  if (!purpose1Rule) {
287
286
  purpose1Rule = DEFAULT_RULES[0];
@@ -301,6 +300,12 @@ export function setEnforcementConfig(config) {
301
300
  if (purpose2Rule) {
302
301
  RULE_HANDLES.push(registerActivityControl(ACTIVITY_FETCH_BIDS, RULE_NAME, fetchBidsRule));
303
302
  }
303
+ if (purpose4Rule) {
304
+ RULE_HANDLES.push(
305
+ registerActivityControl(ACTIVITY_TRANSMIT_UFPD, RULE_NAME, ufpdRule),
306
+ registerActivityControl(ACTIVITY_ENRICH_UFPD, RULE_NAME, ufpdRule)
307
+ );
308
+ }
304
309
  if (purpose7Rule) {
305
310
  RULE_HANDLES.push(registerActivityControl(ACTIVITY_REPORT_ANALYTICS, RULE_NAME, reportAnalyticsRule));
306
311
  }
@@ -9,6 +9,7 @@ import {
9
9
  isNumber,
10
10
  isStr
11
11
  } from '../src/utils.js';
12
+ import { ajax } from '../src/ajax.js';
12
13
  import { registerBidder } from '../src/adapters/bidderFactory.js';
13
14
  import { Renderer } from '../src/Renderer.js';
14
15
  import { VIDEO, BANNER } from '../src/mediaTypes.js';
@@ -17,6 +18,7 @@ import { getStorageManager } from '../src/storageManager.js';
17
18
 
18
19
  const BIDDER_CODE = 'grid';
19
20
  const ENDPOINT_URL = 'https://grid.bidswitch.net/hbjson';
21
+ const USP_DELETE_DATA_HANDLER = 'https://media.grid.bidswitch.net/uspapi_delete'
20
22
 
21
23
  const SYNC_URL = 'https://x.bidswitch.net/sync?ssp=themediagrid';
22
24
  const TIME_TO_LIVE = 360;
@@ -462,6 +464,23 @@ export const spec = {
462
464
  url: syncUrl + params
463
465
  };
464
466
  }
467
+ },
468
+
469
+ ajaxCall: function(url, cb, data, options) {
470
+ return ajax(url, cb, data, options);
471
+ },
472
+
473
+ onDataDeletionRequest: function(data) {
474
+ const uids = [];
475
+ const aliases = [spec.code, ...spec.aliases.map((alias) => alias.code || alias)];
476
+ data.forEach(({ bids }) => bids && bids.forEach(({ bidder, params }) => {
477
+ if (aliases.includes(bidder) && params && params.uid) {
478
+ uids.push(params.uid);
479
+ }
480
+ }));
481
+ if (uids.length) {
482
+ spec.ajaxCall(USP_DELETE_DATA_HANDLER, () => {}, JSON.stringify({ uids }), {contentType: 'application/json', method: 'POST'});
483
+ }
465
484
  }
466
485
  };
467
486
 
@@ -1,4 +1,11 @@
1
- import {deepAccess, getBidIdParameter, isStr, logMessage, triggerPixel, } from '../src/utils.js';
1
+ import {
2
+ deepAccess,
3
+ deepSetValue,
4
+ getBidIdParameter,
5
+ isStr,
6
+ logMessage,
7
+ triggerPixel,
8
+ } from '../src/utils.js';
2
9
  import * as events from '../src/events.js';
3
10
  import CONSTANTS from '../src/constants.json';
4
11
  import {BANNER} from '../src/mediaTypes.js';
@@ -10,6 +17,7 @@ const GVLID = 1177
10
17
  const ENDPOINT = 'https://helloworld.holid.io/openrtb2/auction'
11
18
  const COOKIE_SYNC_ENDPOINT = 'https://null.holid.io/sync.html'
12
19
  const TIME_TO_LIVE = 300
20
+ const TMAX = 500
13
21
  let wurlMap = {}
14
22
 
15
23
  events.on(CONSTANTS.EVENTS.BID_WON, bidWonHandler)
@@ -23,12 +31,19 @@ export const spec = {
23
31
  return !!bid.params.adUnitID
24
32
  },
25
33
 
26
- buildRequests: function (validBidRequests, _bidderRequest) {
34
+ buildRequests: function (validBidRequests, bidderRequest) {
27
35
  return validBidRequests.map((bid) => {
28
36
  const requestData = {
29
37
  ...bid.ortb2,
30
- id: _bidderRequest.bidderRequestId,
38
+ source: {schain: bid.schain},
39
+ id: bidderRequest.bidderRequestId,
31
40
  imp: [getImp(bid)],
41
+ tmax: TMAX,
42
+ ...buildStoredRequest(bid)
43
+ }
44
+
45
+ if (bid.userIdAsEids) {
46
+ deepSetValue(requestData, 'user.ext.eids', bid.userIdAsEids)
32
47
  }
33
48
 
34
49
  return {
@@ -50,8 +65,6 @@ export const spec = {
50
65
  serverResponse.body.seatbid.map((response) => {
51
66
  response.bid.map((bid) => {
52
67
  const requestId = bidRequest.bidId
53
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
54
- const auctionId = bidRequest.auctionId
55
68
  const wurl = deepAccess(bid, 'ext.prebid.events.win')
56
69
  const bidResponse = {
57
70
  requestId,
@@ -65,7 +78,7 @@ export const spec = {
65
78
  ttl: TIME_TO_LIVE,
66
79
  }
67
80
 
68
- addWurl({ auctionId, requestId, wurl })
81
+ addWurl(requestId, wurl)
69
82
 
70
83
  bidResponses.push(bidResponse)
71
84
  })
@@ -75,11 +88,15 @@ export const spec = {
75
88
  },
76
89
 
77
90
  getUserSyncs(optionsType, serverResponse, gdprConsent, uspConsent) {
91
+ const syncs = [{
92
+ type: 'image',
93
+ url: 'https://track.adform.net/Serving/TrackPoint/?pm=2992097&lid=132720821'
94
+ }]
95
+
78
96
  if (!serverResponse || serverResponse.length === 0) {
79
- return []
97
+ return syncs
80
98
  }
81
99
 
82
- const syncs = []
83
100
  const bidders = getBidders(serverResponse)
84
101
 
85
102
  if (optionsType.iframeEnabled && bidders) {
@@ -100,24 +117,14 @@ export const spec = {
100
117
  type: 'iframe',
101
118
  url: COOKIE_SYNC_ENDPOINT + strQueryParams + '&type=iframe',
102
119
  })
103
-
104
- return syncs
105
120
  }
106
121
 
107
- return []
122
+ return syncs
108
123
  },
109
124
  }
110
125
 
111
126
  function getImp(bid) {
112
- const imp = {
113
- ext: {
114
- prebid: {
115
- storedrequest: {
116
- id: getBidIdParameter('adUnitID', bid.params),
117
- },
118
- },
119
- },
120
- }
127
+ const imp = buildStoredRequest(bid)
121
128
  const sizes =
122
129
  bid.sizes && !Array.isArray(bid.sizes[0]) ? [bid.sizes] : bid.sizes
123
130
 
@@ -132,6 +139,18 @@ function getImp(bid) {
132
139
  return imp
133
140
  }
134
141
 
142
+ function buildStoredRequest(bid) {
143
+ return {
144
+ ext: {
145
+ prebid: {
146
+ storedrequest: {
147
+ id: getBidIdParameter('adUnitID', bid.params),
148
+ },
149
+ },
150
+ },
151
+ }
152
+ }
153
+
135
154
  function getBidders(serverResponse) {
136
155
  const bidders = serverResponse
137
156
  .map((res) => Object.keys(res.body.ext.responsetimemillis || []))
@@ -142,28 +161,28 @@ function getBidders(serverResponse) {
142
161
  }
143
162
  }
144
163
 
145
- function addWurl(auctionId, adId, wurl) {
146
- if ([auctionId, adId].every(isStr)) {
147
- wurlMap[`${auctionId}${adId}`] = wurl
164
+ function addWurl(requestId, wurl) {
165
+ if (isStr(requestId)) {
166
+ wurlMap[requestId] = wurl
148
167
  }
149
168
  }
150
169
 
151
- function removeWurl(auctionId, adId) {
152
- delete wurlMap[`${auctionId}${adId}`]
170
+ function removeWurl(requestId) {
171
+ delete wurlMap[requestId]
153
172
  }
154
173
 
155
- function getWurl(auctionId, adId) {
156
- if ([auctionId, adId].every(isStr)) {
157
- return wurlMap[`${auctionId}${adId}`]
174
+ function getWurl(requestId) {
175
+ if (isStr(requestId)) {
176
+ return wurlMap[requestId]
158
177
  }
159
178
  }
160
179
 
161
180
  function bidWonHandler(bid) {
162
- const wurl = getWurl(bid.auctionId, bid.adId)
181
+ const wurl = getWurl(bid.requestId)
163
182
  if (wurl) {
164
183
  logMessage(`Invoking image pixel for wurl on BID_WIN: "${wurl}"`)
165
184
  triggerPixel(wurl)
166
- removeWurl(bid.auctionId, bid.adId)
185
+ removeWurl(bid.requestId)
167
186
  }
168
187
  }
169
188
 
@@ -76,7 +76,9 @@ const SOURCE_RTI_MAPPING = {
76
76
  'audigent.com': '', // Hadron ID from Audigent, hadronId
77
77
  'pubcid.org': '', // SharedID, pubcid
78
78
  'utiq.com': '', // Utiq
79
- 'intimatemerger.com': ''
79
+ 'intimatemerger.com': '',
80
+ '33across.com': '',
81
+ 'liveintent.indexexchange.com': '',
80
82
  };
81
83
  const PROVIDERS = [
82
84
  'britepoolid',
@@ -179,6 +181,41 @@ function bidToBannerImp(bid) {
179
181
  return imp;
180
182
  }
181
183
 
184
+ /**
185
+ * Sets imp.displaymanager
186
+ *
187
+ * @param {object} imp
188
+ * @param {object} bid
189
+ */
190
+ function setDisplayManager(imp, bid) {
191
+ if (deepAccess(bid, 'mediaTypes.video.context') === OUTSTREAM) {
192
+ let renderer = deepAccess(bid, 'mediaTypes.video.renderer');
193
+ if (!renderer) {
194
+ renderer = deepAccess(bid, 'renderer');
195
+ }
196
+
197
+ if (deepAccess(bid, 'schain', false)) {
198
+ imp.displaymanager = 'pbjs_wrapper';
199
+ } else if (renderer && typeof (renderer) === 'object') {
200
+ if (renderer.url !== undefined) {
201
+ let domain = '';
202
+ try {
203
+ domain = new URL(renderer.url).hostname
204
+ } catch {
205
+ return;
206
+ }
207
+ if (domain.includes('js-sec.indexww')) {
208
+ imp.displaymanager = 'ix';
209
+ } else {
210
+ imp.displaymanager = renderer.url;
211
+ }
212
+ }
213
+ } else {
214
+ imp.displaymanager = 'ix';
215
+ }
216
+ }
217
+ }
218
+
182
219
  /**
183
220
  * Transform valid bid request config object to video impression object that will be sent to ad server.
184
221
  *
@@ -198,8 +235,10 @@ export function bidToVideoImp(bid) {
198
235
  // populate imp level transactionId
199
236
  imp.ext.tid = deepAccess(bid, 'ortb2Imp.ext.tid');
200
237
 
238
+ setDisplayManager(imp, bid);
239
+
201
240
  // AdUnit-Specific First Party Data
202
- addAdUnitFPD(imp, bid)
241
+ addAdUnitFPD(imp, bid);
203
242
 
204
243
  // copy all video properties to imp object
205
244
  for (const adUnitProperty in videoAdUnitRef) {
@@ -97,6 +97,10 @@ function buildRequests(validBidRequests, bidderRequest) {
97
97
  user: getUserIds(tdidAdapter, bidderRequest.uspConsent, bidderRequest.gdprConsent, firstBidRequest.userIdAsEids, bidderRequest.gppConsent),
98
98
  });
99
99
 
100
+ if (firstBidRequest.schain && firstBidRequest.schain.nodes) {
101
+ krakenParams.schain = firstBidRequest.schain
102
+ }
103
+
100
104
  const reqCount = getRequestCount()
101
105
  if (reqCount != null) {
102
106
  krakenParams.requestCount = reqCount;
@@ -168,7 +168,7 @@ livewrappedAnalyticsAdapter.sendEvents = function() {
168
168
  requests: sentRequests.sentRequests,
169
169
  responses: getResponses(sentRequests.gdpr, sentRequests.auctionIds),
170
170
  wins: getWins(sentRequests.gdpr, sentRequests.auctionIds),
171
- timeouts: getTimeouts(sentRequests.auctionIds),
171
+ timeouts: getTimeouts(sentRequests.gdpr, sentRequests.auctionIds),
172
172
  bidAdUnits: getbidAdUnits(),
173
173
  rf: getAdRenderFailed(sentRequests.auctionIds),
174
174
  rcv: getAdblockerRecovered()
@@ -237,27 +237,9 @@ function getResponses(gdpr, auctionIds) {
237
237
  if (bid.readyToSend && !(bid.sendStatus & RESPONSESENT) && !bid.timeout) {
238
238
  bid.sendStatus |= RESPONSESENT;
239
239
 
240
- responses.push({
241
- timeStamp: auction.timeStamp,
242
- adUnit: bid.adUnit,
243
- adUnitId: bid.adUnitId,
244
- bidder: bid.bidder,
245
- width: bid.width,
246
- height: bid.height,
247
- cpm: bid.cpm,
248
- orgCpm: bid.originalCpm,
249
- ttr: bid.ttr,
250
- IsBid: bid.isBid,
251
- mediaType: bid.mediaType,
252
- gdpr: gdprPos,
253
- floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
254
- floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
255
- auctionId: auctionIdPos,
256
- auc: bid.auc,
257
- buc: bid.buc,
258
- lw: bid.lw,
259
- meta: bid.meta
260
- });
240
+ let response = getResponseObject(auction, bid, gdprPos, auctionIdPos);
241
+
242
+ responses.push(response);
261
243
  }
262
244
  });
263
245
  });
@@ -337,27 +319,45 @@ function getAuctionIdPos(auctionIds, auctionId) {
337
319
  return auctionIdPos;
338
320
  }
339
321
 
340
- function getTimeouts(auctionIds) {
322
+ function getResponseObject(auction, bid, gdprPos, auctionIdPos) {
323
+ return {
324
+ timeStamp: auction.timeStamp,
325
+ adUnit: bid.adUnit,
326
+ adUnitId: bid.adUnitId,
327
+ bidder: bid.bidder,
328
+ width: bid.width,
329
+ height: bid.height,
330
+ cpm: bid.cpm,
331
+ orgCpm: bid.originalCpm,
332
+ ttr: bid.ttr,
333
+ IsBid: bid.isBid,
334
+ mediaType: bid.mediaType,
335
+ gdpr: gdprPos,
336
+ floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
337
+ floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
338
+ auctionId: auctionIdPos,
339
+ auc: bid.auc,
340
+ buc: bid.buc,
341
+ lw: bid.lw,
342
+ meta: bid.meta
343
+ };
344
+ }
345
+
346
+ function getTimeouts(gdpr, auctionIds) {
341
347
  var timeouts = [];
342
348
 
343
349
  Object.keys(cache.auctions).forEach(auctionId => {
344
350
  let auctionIdPos = getAuctionIdPos(auctionIds, auctionId);
345
351
  Object.keys(cache.auctions[auctionId].bids).forEach(bidId => {
346
352
  let auction = cache.auctions[auctionId];
353
+ let gdprPos = getGdprPos(gdpr, auction);
347
354
  let bid = auction.bids[bidId];
348
355
  if (!(bid.sendStatus & TIMEOUTSENT) && bid.timeout) {
349
356
  bid.sendStatus |= TIMEOUTSENT;
350
357
 
351
- timeouts.push({
352
- bidder: bid.bidder,
353
- adUnit: bid.adUnit,
354
- adUnitId: bid.adUnitId,
355
- timeStamp: auction.timeStamp,
356
- auctionId: auctionIdPos,
357
- auc: bid.auc,
358
- buc: bid.buc,
359
- lw: bid.lw
360
- });
358
+ let timeout = getResponseObject(auction, bid, gdprPos, auctionIdPos);
359
+
360
+ timeouts.push(timeout);
361
361
  }
362
362
  });
363
363
  });
@@ -242,6 +242,7 @@ function getItems(validBidRequests, bidderRequest) {
242
242
  ext: {
243
243
  // gpid: gpid, // 加入后无法返回广告
244
244
  },
245
+ tagid: req.params && req.params.tagid,
245
246
  };
246
247
  itemMaps[id] = {
247
248
  req,