prebid.js 6.24.0 → 6.26.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 (178) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/adagioBidAdapter.js +1 -1
  3. package/dist/adbookpspBidAdapter.js +1 -1
  4. package/dist/adgenerationBidAdapter.js +1 -1
  5. package/dist/adrelevantisBidAdapter.js +1 -1
  6. package/dist/adtelligentBidAdapter.js +1 -1
  7. package/dist/adxcgBidAdapter.js +1 -1
  8. package/dist/adyoulikeBidAdapter.js +1 -1
  9. package/dist/ajaBidAdapter.js +1 -1
  10. package/dist/amxBidAdapter.js +1 -1
  11. package/dist/amxIdSystem.js +1 -1
  12. package/dist/appierAnalyticsAdapter.js +1 -1
  13. package/dist/appnexusBidAdapter.js +1 -1
  14. package/dist/asoBidAdapter.js +1 -1
  15. package/dist/audiencerunBidAdapter.js +1 -1
  16. package/dist/axonixBidAdapter.js +1 -1
  17. package/dist/beopBidAdapter.js +1 -1
  18. package/dist/bidglassBidAdapter.js +1 -1
  19. package/dist/big-richmediaBidAdapter.js +1 -1
  20. package/dist/bluebillywigBidAdapter.js +1 -1
  21. package/dist/bridgewellBidAdapter.js +1 -1
  22. package/dist/brightMountainMediaBidAdapter.js +1 -1
  23. package/dist/concertBidAdapter.js +1 -1
  24. package/dist/connectadBidAdapter.js +1 -1
  25. package/dist/consumableBidAdapter.js +1 -1
  26. package/dist/conversantBidAdapter.js +1 -1
  27. package/dist/cpexIdSystem.js +1 -1
  28. package/dist/craftBidAdapter.js +1 -1
  29. package/dist/criteoBidAdapter.js +1 -1
  30. package/dist/currency.js +1 -1
  31. package/dist/dfpAdServerVideo.js +1 -1
  32. package/dist/dspxBidAdapter.js +1 -1
  33. package/dist/eplanningBidAdapter.js +1 -1
  34. package/dist/glimpseBidAdapter.js +1 -1
  35. package/dist/gmosspBidAdapter.js +1 -1
  36. package/dist/goldbachBidAdapter.js +1 -1
  37. package/dist/gravitoIdSystem.js +1 -0
  38. package/dist/gridBidAdapter.js +1 -1
  39. package/dist/gridNMBidAdapter.js +1 -1
  40. package/dist/gumgumBidAdapter.js +1 -1
  41. package/dist/h12mediaBidAdapter.js +1 -1
  42. package/dist/id5IdSystem.js +1 -1
  43. package/dist/impactifyBidAdapter.js +1 -1
  44. package/dist/improvedigitalBidAdapter.js +1 -1
  45. package/dist/inmarBidAdapter.js +1 -1
  46. package/dist/insticatorBidAdapter.js +1 -1
  47. package/dist/invibesBidAdapter.js +1 -1
  48. package/dist/ixBidAdapter.js +1 -1
  49. package/dist/jixieBidAdapter.js +1 -1
  50. package/dist/justpremiumBidAdapter.js +1 -1
  51. package/dist/kargoBidAdapter.js +1 -1
  52. package/dist/konduitAnalyticsAdapter.js +1 -1
  53. package/dist/liveIntentIdSystem.js +1 -1
  54. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  55. package/dist/logicadBidAdapter.js +1 -1
  56. package/dist/loglyliftBidAdapter.js +1 -1
  57. package/dist/malltvAnalyticsAdapter.js +1 -1
  58. package/dist/marsmediaBidAdapter.js +1 -1
  59. package/dist/mediafuseBidAdapter.js +1 -1
  60. package/dist/mediakeysBidAdapter.js +1 -1
  61. package/dist/mediasquareBidAdapter.js +1 -1
  62. package/dist/mgidBidAdapter.js +1 -1
  63. package/dist/minutemediaBidAdapter.js +1 -1
  64. package/dist/not-for-prod/prebid.js +123 -121
  65. package/dist/oguryBidAdapter.js +1 -1
  66. package/dist/oneVideoBidAdapter.js +1 -1
  67. package/dist/onetagBidAdapter.js +1 -1
  68. package/dist/ooloAnalyticsAdapter.js +1 -1
  69. package/dist/outbrainBidAdapter.js +1 -1
  70. package/dist/parrableIdSystem.js +1 -1
  71. package/dist/pixfutureBidAdapter.js +1 -1
  72. package/dist/prebid-core.js +3 -3
  73. package/dist/publinkIdSystem.js +1 -1
  74. package/dist/pubmaticBidAdapter.js +1 -1
  75. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  76. package/dist/pxyzBidAdapter.js +1 -1
  77. package/dist/quantcastBidAdapter.js +1 -1
  78. package/dist/readpeakBidAdapter.js +1 -1
  79. package/dist/relaidoBidAdapter.js +1 -1
  80. package/dist/rhythmoneBidAdapter.js +1 -1
  81. package/dist/riseBidAdapter.js +1 -1
  82. package/dist/rubiconAnalyticsAdapter.js +1 -1
  83. package/dist/rubiconBidAdapter.js +1 -1
  84. package/dist/seedingAllianceBidAdapter.js +1 -1
  85. package/dist/seedtagBidAdapter.js +1 -1
  86. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  87. package/dist/sharethroughBidAdapter.js +1 -1
  88. package/dist/smaatoBidAdapter.js +1 -1
  89. package/dist/smartadserverBidAdapter.js +1 -1
  90. package/dist/smartxBidAdapter.js +1 -1
  91. package/dist/smilewantedBidAdapter.js +1 -1
  92. package/dist/sonobiBidAdapter.js +1 -1
  93. package/dist/sortableBidAdapter.js +1 -1
  94. package/dist/sovrnAnalyticsAdapter.js +1 -1
  95. package/dist/sovrnBidAdapter.js +1 -1
  96. package/dist/sspBCBidAdapter.js +1 -1
  97. package/dist/sublimeBidAdapter.js +1 -1
  98. package/dist/synacormediaBidAdapter.js +1 -1
  99. package/dist/targetVideoBidAdapter.js +1 -1
  100. package/dist/teadsBidAdapter.js +1 -1
  101. package/dist/trionBidAdapter.js +1 -1
  102. package/dist/tripleliftBidAdapter.js +1 -1
  103. package/dist/trustpidSystem.js +1 -1
  104. package/dist/trustxBidAdapter.js +1 -1
  105. package/dist/ttdBidAdapter.js +1 -1
  106. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  107. package/dist/underdogmediaBidAdapter.js +1 -1
  108. package/dist/undertoneBidAdapter.js +1 -1
  109. package/dist/userId.js +1 -1
  110. package/dist/vidazooBidAdapter.js +1 -1
  111. package/dist/videobyteBidAdapter.js +1 -1
  112. package/dist/videoheroesBidAdapter.js +1 -0
  113. package/dist/vidoomyBidAdapter.js +1 -1
  114. package/dist/visxBidAdapter.js +1 -1
  115. package/dist/vuukleBidAdapter.js +1 -1
  116. package/dist/weboramaRtdProvider.js +1 -1
  117. package/dist/widespaceBidAdapter.js +1 -1
  118. package/dist/winrBidAdapter.js +1 -1
  119. package/dist/yahoosspBidAdapter.js +1 -1
  120. package/dist/yieldmoBidAdapter.js +1 -1
  121. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  122. package/dist/zeta_global_sspBidAdapter.js +1 -1
  123. package/integrationExamples/gpt/userId_example.html +3 -0
  124. package/integrationExamples/gpt/weboramaRtdProvider_example.html +65 -11
  125. package/modules/.submodules.json +2 -1
  126. package/modules/adagioBidAdapter.js +2 -0
  127. package/modules/adtelligentBidAdapter.js +3 -1
  128. package/modules/alkimiBidAdapter.md +10 -4
  129. package/modules/appnexusBidAdapter.js +13 -2
  130. package/modules/beopBidAdapter.js +51 -6
  131. package/modules/cpexIdSystem.js +1 -2
  132. package/modules/currency.js +4 -13
  133. package/modules/dacIdSystem.md +4 -4
  134. package/modules/dfpAdServerVideo.js +8 -0
  135. package/modules/gravitoIdSystem.js +57 -0
  136. package/modules/gravitoIdSystem.md +28 -0
  137. package/modules/improvedigitalBidAdapter.js +100 -43
  138. package/modules/invibesBidAdapter.js +55 -34
  139. package/modules/ixBidAdapter.js +62 -26
  140. package/modules/ixBidAdapter.md +42 -42
  141. package/modules/jixieBidAdapter.js +2 -0
  142. package/modules/kargoBidAdapter.js +23 -8
  143. package/modules/oguryBidAdapter.js +27 -1
  144. package/modules/trustpidSystem.js +9 -28
  145. package/modules/trustpidSystem.md +11 -34
  146. package/modules/userId/eids.js +6 -0
  147. package/modules/userId/index.js +30 -55
  148. package/modules/userId/userId.md +3 -11
  149. package/modules/videoheroesBidAdapter.js +267 -0
  150. package/modules/videoheroesBidAdapter.md +134 -0
  151. package/modules/vidoomyBidAdapter.js +2 -6
  152. package/modules/weboramaRtdProvider.js +515 -241
  153. package/modules/weboramaRtdProvider.md +488 -51
  154. package/modules/zeta_global_sspBidAdapter.js +1 -1
  155. package/package.json +4 -4
  156. package/src/adserver.js +7 -0
  157. package/src/hook.js +19 -1
  158. package/src/utils/promise.js +36 -0
  159. package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
  160. package/test/spec/modules/appnexusBidAdapter_spec.js +37 -10
  161. package/test/spec/modules/beopBidAdapter_spec.js +15 -2
  162. package/test/spec/modules/dfpAdServerVideo_spec.js +45 -0
  163. package/test/spec/modules/gravitoIdSystem_spec.js +51 -0
  164. package/test/spec/modules/improvedigitalBidAdapter_spec.js +289 -72
  165. package/test/spec/modules/invibesBidAdapter_spec.js +98 -7
  166. package/test/spec/modules/ixBidAdapter_spec.js +132 -26
  167. package/test/spec/modules/jixieBidAdapter_spec.js +17 -0
  168. package/test/spec/modules/kargoBidAdapter_spec.js +45 -3
  169. package/test/spec/modules/liveIntentIdSystem_spec.js +2 -2
  170. package/test/spec/modules/loglyliftBidAdapter_spec.js +8 -0
  171. package/test/spec/modules/oguryBidAdapter_spec.js +181 -3
  172. package/test/spec/modules/trustpidSystem_spec.js +42 -19
  173. package/test/spec/modules/userId_spec.js +18 -0
  174. package/test/spec/modules/videoheroesBidAdapter_spec.js +363 -0
  175. package/test/spec/modules/weboramaRtdProvider_spec.js +2333 -266
  176. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +37 -24
  177. package/test/spec/unit/utils/promise_spec.js +49 -0
  178. package/test/spec/modules/medianetRtdProvider_spec.js +0 -146
@@ -6,11 +6,17 @@ Module Type: Rtd Provider
6
6
  Maintainer: prebid-support@weborama.com
7
7
  ```
8
8
 
9
- # Description
9
+ ## Description
10
10
 
11
- Weborama provides a Semantic AI Contextual API that classifies in Real-time a web page seen by a web user within generic and custom topics. It enables publishers to better monetize their inventory and unlock it to programmatic.
11
+ Weborama provides a Real-Time Data Submodule for `Prebid.js`, allowing to easy integrate different products such as:
12
12
 
13
- Contact prebid-support@weborama.com for information.
13
+ * Semantic AI Contextual API that classifies in Real-time a web page seen by a web user within generic and custom topics. It enables publishers to better monetize their inventory and unlock it to programmatic.
14
+
15
+ * Weborama Audience Manager (WAM) is a DMP (Data Management Platform) used by over 60 companies in the world. This platform distinguishes itself particularly by a high level interconnexion with the adtech & martech ecosystem and a transparent access to the database intelligence.
16
+
17
+ * LiTE by SFBX® (Local inApp Trust Engine) provides “Zero Party Data” given by users, stored and calculated only on the user’s device. Through a unique cohorting system, it enables better monetization in a consent/consentless and identity-less mode.
18
+
19
+ Contact prebid-support@weborama.com for more information.
14
20
 
15
21
  ### Publisher Usage
16
22
 
@@ -18,7 +24,7 @@ Compile the Weborama RTD module into your Prebid build:
18
24
 
19
25
  `gulp build --modules=rtdModule,weboramaRtdProvider`
20
26
 
21
- Add the Weborama RTD provider to your Prebid config.
27
+ Add the Weborama RTD provider to your Prebid config, use the configuration template below:
22
28
 
23
29
  ```javascript
24
30
  var pbjs = pbjs || {};
@@ -26,94 +32,525 @@ pbjs.que = pbjs.que || [];
26
32
 
27
33
  pbjs.que.push(function () {
28
34
  pbjs.setConfig({
29
- debug: true,
35
+ debug: true, // Output debug messages to the web console, *should* be disabled in production
30
36
  realTimeData: {
31
37
  auctionDelay: 1000,
32
38
  dataProviders: [{
33
39
  name: "weborama",
34
40
  waitForIt: true,
35
41
  params: {
36
- setPrebidTargeting: true, // optional
37
- sendToBidders: true, // optional
38
- onData: function(data, site){ // optional
39
- var kind = (site)? 'site' : 'user';
40
- console.log('onData', kind, data);
41
- },
42
- weboCtxConf: {
43
- token: "to-be-defined", // mandatory
44
- targetURL: "https://prebid.org", // default is document.URL
45
- setPrebidTargeting: true, // override param.setPrebidTargeting or default true
46
- sendToBidders: true, // override param.sendToBidders or default true
47
- defaultProfile: { // optional
48
- webo_ctx: ['moon'],
49
- webo_ds: ['bar']
50
- }
51
- //, onData: function (data, ...) { ...}
52
- },
53
- weboUserDataConf: {
54
- accountId: 12345, // optional, used for logging
55
- setPrebidTargeting: true, // override param.setPrebidTargeting or default true
56
- sendToBidders: true, // override param.sendToBidders or default true
57
- defaultProfile: { // optional
58
- webo_cs: ['Red'],
59
- webo_audiences: ['bam']
60
- },
61
- localStorageProfileKey: 'webo_wam2gam_entry' // default
62
- //, onData: function (data, ...) { ...}
63
- }
64
- }
65
- }]
42
+ /* add weborama rtd submodule configuration here */
43
+ },
44
+ },
45
+ // other modules...
46
+ ]
66
47
  }
67
48
  });
68
49
  });
69
50
  ```
70
51
 
52
+ The module configuration has 3 independent sections (`weboCtxConf`, `weboUserDataConf` and `sfbxLiteDataConf`), each one mapped to a single product (`contextual`, `wam` and `lite`). No section is enabled by default, we must be explicit like in the minimal example below:
53
+
54
+ ```javascript
55
+ pbjs.setConfig({
56
+ debug: true,
57
+ realTimeData: {
58
+ auctionDelay: 1000,
59
+ dataProviders: [{
60
+ name: "weborama",
61
+ waitForIt: true,
62
+ params: {
63
+ weboCtxConf: { // contextual site-centric configuration, *omit if not needed*
64
+ token: "<<to-be-defined>>", // mandatory
65
+ },
66
+ weboUserDataConf: { // wam user-centric configuration, *omit if not needed*
67
+ enabled: true,
68
+ },
69
+ sfbxLiteDataConf: { // sfbx-lite site-centric configuration, *omit if not needed*
70
+ enabled: true,
71
+ },
72
+ }
73
+ },
74
+ // other modules...
75
+ ]
76
+ }
77
+ });
78
+ ```
79
+
80
+ Each module can perform two actions:
81
+
82
+ * set targeting on [GPT](https://docs.prebid.org/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html) / [AST](https://docs.prebid.org/dev-docs/publisher-api-reference/setTargetingForAst.html]) via `prebid.js`
83
+
84
+ * send data to other `prebid.js` bidder modules (check the complete list at the end of this page)
85
+
71
86
  ### Parameter Descriptions for the Weborama Configuration Section
72
87
 
88
+ This is the main configuration section
89
+
73
90
  | Name |Type | Description | Notes |
74
91
  | :------------ | :------------ | :------------ |:------------ |
75
92
  | name | String | Real time data module name | Mandatory. Always 'Weborama' |
76
93
  | waitForIt | Boolean | Mandatory. Required to ensure that the auction is delayed until prefetch is complete | Optional. Defaults to false but recommended to true |
77
94
  | params | Object | | Optional |
78
- | params.setPrebidTargeting | Boolean | If true, may use the profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js | Optional. Affects the `weboCtxConf` and `weboUserDataConf` sections |
79
- | params.sendToBidders | Boolean | If true, may send the profile to all bidders | Optional. Affects the `weboCtxConf` and `weboUserDataConf` sections |
80
- | params.weboCtxConf | Object | Weborama Contextual Configuration | Optional
81
- | params.weboUserDataConf | Object | Weborama User-Centric Configuration | Optional |
82
- | params.onData | Callback | If set, will receive the profile and site flag | Optional. Affects the `weboCtxConf` and `weboUserDataConf` sections |
95
+ | params.setPrebidTargeting | Boolean | If true, may use the profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js | Optional. Affects the `weboCtxConf`, `weboUserDataConf` and `sfbxLiteDataConf` sections |
96
+ | params.sendToBidders | Boolean or Array | If true, may send the profile to all bidders. If an array, will specify the bidders to send data | Optional. Affects the `weboCtxConf`, `weboUserDataConf` and `sfbxLiteDataConf` sections |
97
+ | params.weboCtxConf | Object | Weborama Contextual Site-Centric Configuration | Optional |
98
+ | params.weboUserDataConf | Object | Weborama WAM User-Centric Configuration | Optional |
99
+ | params.sfbxLiteDataConf | Object | Sfbx LiTE Site-Centric Configuration | Optional |
100
+ | params.onData | Callback | If set, will receive the profile and metadata | Optional. Affects the `weboCtxConf`, `weboUserDataConf` and `sfbxLiteDataConf` sections |
101
+
102
+ #### Contextual Site-Centric Configuration
83
103
 
84
- #### Contextual Configuration
104
+ To be possible use the integration with Weborama Contextual Service you must be a client with a valid API token. Please contact weborama if you don't have it.
105
+
106
+ On this section we will explain the `params.weboCtxConf` subconfiguration:
85
107
 
86
108
  | Name |Type | Description | Notes |
87
109
  | :------------ | :------------ | :------------ |:------------ |
88
110
  | token | String | Security Token provided by Weborama, unique per client | Mandatory |
89
111
  | targetURL | String | Url to be profiled in the contextual api | Optional. Defaults to `document.URL` |
90
- | setPrebidTargeting|Boolean|If true, will use the contextual profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js| Optional. Default is `params.setPrebidTargeting` (if any) or **true**.|
91
- | sendToBidders|Boolean|If true, will send the contextual profile to all bidders| Optional. Default is `params.sendToBidders` (if any) or **true**.|
112
+ | setPrebidTargeting|Various|If true, will use the contextual profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js| Optional. Default is `params.setPrebidTargeting` (if any) or `true`.|
113
+ | sendToBidders|Various|If true, will send the contextual profile to all bidders. If an array, will specify the bidders to send data| Optional. Default is `params.sendToBidders` (if any) or `true`.|
92
114
  | defaultProfile | Object | default value of the profile to be used when there are no response from contextual api (such as timeout)| Optional. Default is `{}` |
115
+ | onData | Callback | If set, will receive the profile and metadata | Optional. Default is `params.onData` (if any) or log via prebid debug |
116
+ | enabled | Boolean| if false, will ignore this configuration| Default is `true` if this section is present|
117
+ | baseURLProfileAPI | String| if present, update the domain of the contextual api| Optional. Default is `ctx.weborama.com` |
118
+
119
+ #### WAM User-Centric Configuration
120
+
121
+ To be possible use the integration with Weborama Audience Manager (WAM) you must be a client with an account id and you lust include the `wamfactory` script in your pages with `wam2gam` feature activated.
122
+ Please contact weborama if you don't have it.
123
+
124
+ On this section we will explain the `params.weboUserDataConf` subconfiguration:
125
+
126
+ | Name |Type | Description | Notes |
127
+ | :------------ | :------------ | :------------ |:------------ |
128
+ | accountId|Number|WAM account id. If you don't have it, please contact weborama. | Recommended.|
129
+ | setPrebidTargeting|Various|If true, will use the user profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js| Optional. Default is `params.setPrebidTargeting` (if any) or `true`.|
130
+ | sendToBidders|Various|If true, will send the user profile to all bidders| Optional. Default is `params.sendToBidders` (if any) or `true`.|
93
131
  | onData | Callback | If set, will receive the profile and site flag | Optional. Default is `params.onData` (if any) or log via prebid debug |
94
- | enabled | Boolean| if false, will ignore this configuration| default true|
132
+ | defaultProfile | Object | default value of the profile to be used when there are no response from contextual api (such as timeout)| Optional. Default is `{}` |
133
+ | localStorageProfileKey| String | can be used to customize the local storage key | Optional |
134
+ | enabled | Boolean| if false, will ignore this configuration| Default is `true` if this section is present|
135
+
136
+ #### Sfbx LiTE Site-Centric Configuration
137
+
138
+ To be possible use the integration between Weborama and Sfbx LiTE you should also contact SFBX® to setup this product.
95
139
 
96
- #### User-Centric Configuration
140
+ On this section we will explain the `params.sfbxLiteDataConf` subconfiguration:
97
141
 
98
142
  | Name |Type | Description | Notes |
99
143
  | :------------ | :------------ | :------------ |:------------ |
100
- | accountId|Number|WAM account id. If present, will be used on logging and statistics| Optional.|
101
- | setPrebidTargeting|Boolean|If true, will use the user profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js| Optional. Default is `params.setPrebidTargeting` (if any) or **true**.|
102
- | sendToBidders|Boolean|If true, will send the user profile to all bidders| Optional. Default is `params.sendToBidders` (if any) or **true**.|
144
+ | setPrebidTargeting|Various|If true, will use the user profile to set the prebid (GPT/GAM or AST) targeting of all adunits managed by prebid.js| Optional. Default is `params.setPrebidTargeting` (if any) or `true`.|
145
+ | sendToBidders|Varios|If true, will send the user profile to all bidders| Optional. Default is `params.sendToBidders` (if any) or `true`.|
103
146
  | onData | Callback | If set, will receive the profile and site flag | Optional. Default is `params.onData` (if any) or log via prebid debug |
104
147
  | defaultProfile | Object | default value of the profile to be used when there are no response from contextual api (such as timeout)| Optional. Default is `{}` |
105
- | localStorageProfileKey| String | can be used to customize the local storage key | Optional |
106
- | enabled | Boolean| if false, will ignore this configuration| default true|
148
+ | localStorageProfileKey| String | can be used to customize the local storage key | Optional |
149
+ | enabled | Boolean| if false, will ignore this configuration| Default is `true` if this section is present|
150
+
151
+ ##### Property setPrebidTargeting supported types
152
+
153
+ This property support the following types
154
+
155
+ | Type | Description | Example | Notes |
156
+ | :------------ | :------------ | :------------ |:------------ |
157
+ | Boolean|If true, set prebid targeting for all adunits, or not in case of false| `true` | default value |
158
+ | String|Will set prebid targeting only for one adunit | `'adUnitCode1'` | |
159
+ | Array of Strings|Will set prebid targeting only for some adunits| `['adUnitCode1','adUnitCode2']` | |
160
+ | Callback |Will be executed for each adunit, expects return a true value to set prebid targeting or not| `function(adUnitCode){return adUnitCode == 'adUnitCode';}` | |
161
+
162
+ The complete callback function signature is:
163
+
164
+ ```javascript
165
+ setPrebidTargeting: function(adUnitCode, data, metadata){
166
+ return true; // or false, depending on the logic
167
+ }
168
+ ```
169
+
170
+ This callback will be executed with the adUnitCode, profile and a metadata with the following fields
171
+
172
+ | Name |Type | Description | Notes |
173
+ | :------------ | :------------ | :------------ |:------------ |
174
+ | user | Boolean | If true, it contains user-centric data | |
175
+ | source | String | Represent the source of data | can be `contextual`, `wam` or `lite` |
176
+ | isDefault | Boolean | If true, it contains the default profile defined in the configuration | |
177
+
178
+ It is possible customize the targeting based on the parameters:
179
+
180
+ ```javascript
181
+ setPrebidTargeting: function(adUnitCode, data, metadata){
182
+ // check metadata.source can be omitted if defined in params.weboUserDataConf
183
+ if (adUnitCode == 'adUnitCode1' && metadata.source == 'wam'){
184
+ data['foo']=['bar']; // add this section only for adUnitCode1
185
+ delete data['other']; // remove this section
186
+ }
187
+ return true;
188
+ }
189
+ ```
190
+
191
+ ##### Property sendToBidders supported types
192
+
193
+ This property support the following types
194
+
195
+ | Type | Description | Example | Notes |
196
+ | :------------ | :------------ | :------------ |:------------ |
197
+ | Boolean|If true, send data to all bidders, or not in case of false| `true` | default value |
198
+ | String|Will send data to only one bidder | `'appnexus'` | |
199
+ | Array of Strings|Will send data to only some bidders | `['appnexus','pubmatic']` | |
200
+ | Object |Will send data to only some bidders and some ad units | `{appnexus: true, pubmatic:['adUnitCode1']}` | |
201
+ | Callback |Will be executed for each adunit, expects return a true value to set prebid targeting or not| `function(bid, adUnitCode){return bid.bidder == 'appnexus' && adUnitCode == 'adUnitCode';}` | |
202
+
203
+ A better look on the `Object` type
204
+
205
+ ```javascript
206
+ sendToBidders: {
207
+ appnexus: true, // send profile to appnexus on all ad units
208
+ pubmatic: ['adUnitCode1'],// send profile to pubmatic on this ad units
209
+ }
210
+ ```
211
+
212
+ The complete callback function signature is:
213
+
214
+ ```javascript
215
+ sendToBidders: function(bid, adUnitCode, data, metadata){
216
+ return true; // or false, depending on the logic
217
+ }
218
+ ```
219
+
220
+ This callback will be executed with the bid object (contains a field `bidder` with name), adUnitCode, profile and a metadata with the following fields
221
+
222
+ | Name |Type | Description | Notes |
223
+ | :------------ | :------------ | :------------ |:------------ |
224
+ | user | Boolean | If true, it contains user-centric data | |
225
+ | source | String | Represent the source of data | can be `contextual`, `wam` or `lite` |
226
+ | isDefault | Boolean | If true, it contains the default profile defined in the configuration | |
227
+
228
+ It is possible customize the targeting based on the parameters:
229
+
230
+ ```javascript
231
+ sendToBidders: function(bid, adUnitCode, data, metadata){
232
+ if (bid.bidder == 'appnexus' && adUnitCode == 'adUnitCode1'){
233
+ data['foo']=['bar']; // add this section only for appnexus + adUnitCode1
234
+ delete data['other']; // remove this section
235
+ }
236
+ return true;
237
+ }
238
+ ```
239
+
240
+ To be possible customize the way we send data to bidders via this callback:
241
+
242
+ ```javascript
243
+ sendToBidders: function(bid, adUnitCode, data, metadata){
244
+ if (bid.bidder == 'other'){
245
+ /* use bid object to store data based on this specific logic, like in the example below */
246
+
247
+ bid.params = bid.params || {};
248
+ bid.params['some_specific_key'] = data;
249
+
250
+ return false; // will prevent the module to follow the pre-defined logic per bidder
251
+ }
252
+ // others
253
+ return true;
254
+ }
255
+ ```
256
+
257
+ In case of using bid _aliases_, we should match the same string used in the adUnit configuration.
258
+
259
+ ```javascript
260
+ pbjs.aliasBidder('appnexus', 'foo');
261
+ pbjs.aliasBidder('criteo', 'bar');
262
+ pbjs.aliasBidder('pubmatic', 'baz');
263
+ pbjs.setConfig({
264
+ realTimeData: {
265
+ dataProviders: [{
266
+ name: "weborama",
267
+ waitForIt: true,
268
+ params: {
269
+ weboCtxConf: {
270
+ token: "to-be-defined", // mandatory
271
+ sendToBidders: ['foo','bar'], // will share site-centric data with bidders foo and bar
272
+ },
273
+ weboUserDataConf: {
274
+ accountId: 12345, // recommended,
275
+ sendToBidders: ['baz'], // will share user-centric data with only bidder baz
276
+ }
277
+ }
278
+ }]
279
+ }
280
+ });
281
+ ```
282
+
283
+ ##### Using onData callback
284
+
285
+ We can specify a callback to handle the profile data from site-centric or user-centric data.
286
+
287
+ This callback will be executed with the profile and a metadata with the following fields
288
+
289
+ | Name |Type | Description | Notes |
290
+ | :------------ | :------------ | :------------ |:------------ |
291
+ | user | Boolean | If true, it contains user-centric data | |
292
+ | source | String | Represent the source of data | can be `contextual`, `wam` or `lite` |
293
+ | isDefault | Boolean | If true, it contains the default profile defined in the configuration | |
294
+
295
+ The metadata maybe not useful if we define the callback on site-centric of user-centric configuration, but if defined in the global level:
296
+
297
+ ```javascript
298
+ params: {
299
+ onData: function(data, metadata){
300
+ var hasUserCentricData = metadata.user;
301
+ var dataSource = metadata.source;
302
+ console.log('onData', data, hasUserCentricData, dataSource);
303
+ }
304
+ }
305
+ ```
306
+
307
+ an interesting example is to set GAM targeting in global level instead in slot level only for contextual data:
308
+
309
+ ```javascript
310
+ params: {
311
+ weboCtxConf: {
312
+ token: 'to-be-defined',
313
+ setPrebidTargeting: false,
314
+ onData: function(data, metadata){
315
+ var googletag = googletag || {};
316
+ googletag.cmd = googletag.cmd || [];
317
+ googletag.cmd.push(function () {
318
+ for(var key in data){
319
+ googletag.pubads().setTargeting(key, data[key]);
320
+ }
321
+ });
322
+ },
323
+ }
324
+ }
325
+ ```
326
+
327
+ ### More configuration examples
328
+
329
+ A more complete example can be found below. We can define default profiles, for each section, to be used in case of no data are found.
330
+
331
+ We can control if we will set prebid targeting or send data to bidders in a global level or on each section (`contextual`, `wam` or `lite`).
332
+
333
+ By default we try to send the data to all destinations, always. To restrict we can have two choices:
334
+
335
+ * Set `setPrebidTargeting` or `sendToBidders` explicity to `true` or `false` on each section;
336
+ * Set `setPrebidTargeting` or `sendToBidders` globally to `false` and only enable on the right sections;
337
+
338
+ ```javascript
339
+ var pbjs = pbjs || {};
340
+ pbjs.que = pbjs.que || [];
341
+
342
+ pbjs.que.push(function () {
343
+ pbjs.setConfig({
344
+ debug: true,
345
+ realTimeData: {
346
+ auctionDelay: 1000,
347
+ dataProviders: [{
348
+ name: "weborama",
349
+ waitForIt: true,
350
+ params: {
351
+ weboCtxConf: {
352
+ token: "<<to-be-defined>>", // mandatory
353
+ targetURL: "https://example.org", // default is document.URL
354
+ setPrebidTargeting: true, // override param.setPrebidTargeting. default is true
355
+ sendToBidders: true, // override param.sendToBidders. default is true
356
+ defaultProfile: { // optional, used if nothing is found
357
+ webo_ctx: [ ... ], // contextual segments
358
+ webo_ds: [ ...], // data science segments
359
+ },
360
+ enabled: true,
361
+ },
362
+ weboUserDataConf: {
363
+ setPrebidTargeting: true, // override param.setPrebidTargeting. default is true
364
+ sendToBidders: true, // override param.sendToBidders. default is true
365
+ defaultProfile: { // optional, used if nothing is found
366
+ webo_cs: [...], // wam custom segments
367
+ webo_audiences: [...], // wam audiences
368
+ },
369
+ enabled: true,
370
+ },
371
+ sfbxLiteDataConf: {
372
+ setPrebidTargeting: true, // override param.setPrebidTargeting. default is true
373
+ sendToBidders: true, // override param.sendToBidders. default is true
374
+ defaultProfile: { // optional, used if nothing is found
375
+ /* add specific lite segments here */
376
+ },
377
+ enabled: true,
378
+ },
379
+ }
380
+ }]
381
+ }
382
+ });
383
+ });
384
+ ```
385
+
386
+ Imagine we need to configure the following options using the previous example, we can write the configuration like the one below.
387
+
388
+ ||contextual|wam|lite|
389
+ | :------------ | :------------ | :------------ |:------------ |
390
+ |setPrebidTargeting|true|false|true|
391
+ |sendToBidders|false|true|true|
392
+
393
+ ```javascript
394
+ var pbjs = pbjs || {};
395
+ pbjs.que = pbjs.que || [];
396
+
397
+ pbjs.que.push(function () {
398
+ pbjs.setConfig({
399
+ debug: true,
400
+ realTimeData: {
401
+ auctionDelay: 1000,
402
+ dataProviders: [{
403
+ name: "weborama",
404
+ waitForIt: true,
405
+ params: {
406
+ setPrebidTargeting: false, // optional. set the default value of each section.
407
+ sendToBidders: false, // optional. set the default value of each section.
408
+ weboCtxConf: {
409
+ token: "<<to-be-defined>>", // mandatory
410
+ targetURL: "https://example.org", // default is document.URL
411
+ setPrebidTargeting: true, // override param.setPrebidTargeting. default is true
412
+ enabled: true,
413
+ },
414
+ weboUserDataConf: {
415
+ sendToBidders: true, // override param.sendToBidders. default is true
416
+ enabled: true,
417
+ },
418
+ sfbxLiteDataConf: {
419
+ setPrebidTargeting: true, // override param.setPrebidTargeting. default is true
420
+ sendToBidders: true, // override param.sendToBidders. default is true
421
+ enabled: true,
422
+ },
423
+ }
424
+ }]
425
+ }
426
+ });
427
+ });
428
+ ```
429
+
430
+ We can also define a list of adunits / bidders that will receive data instead of using boolean values.
431
+
432
+ ```javascript
433
+ var pbjs = pbjs || {};
434
+ pbjs.que = pbjs.que || [];
435
+
436
+ pbjs.que.push(function () {
437
+ pbjs.setConfig({
438
+ debug: true,
439
+ realTimeData: {
440
+ auctionDelay: 1000,
441
+ dataProviders: [{
442
+ name: "weborama",
443
+ waitForIt: true,
444
+ params: {
445
+ weboCtxConf: {
446
+ token: "to-be-defined", // mandatory
447
+ setPrebidTargeting: ['adUnitCode1',...], // set target only on certain adunits
448
+ sendToBidders: ['appnexus',...], // overide, send to only some bidders
449
+ enabled: true,
450
+ },
451
+ weboUserDataConf: {
452
+ accountId: 12345, // recommended
453
+ setPrebidTargeting: ['adUnitCode2',...], // set target only on certain adunits
454
+ sendToBidders: ['rubicon',...], // overide, send to only some bidders
455
+ enabled: true,
456
+ },
457
+ sfbxLiteDataConf: {
458
+ setPrebidTargeting: ['adUnitCode3',...], // set target only on certain adunits
459
+ sendToBidders: ['smartadserver',...], // overide, send to only some bidders
460
+ enabled: true,
461
+ }
462
+ }
463
+ }]
464
+ }
465
+ });
466
+ });
467
+ ```
468
+
469
+ Finally, we can combine several styles in the same configuration if needed. Including the callback style.
470
+
471
+ ```javascript
472
+ var pbjs = pbjs || {};
473
+ pbjs.que = pbjs.que || [];
474
+
475
+ pbjs.que.push(function () {
476
+ pbjs.setConfig({
477
+ debug: true,
478
+ realTimeData: {
479
+ auctionDelay: 1000,
480
+ dataProviders: [{
481
+ name: "weborama",
482
+ waitForIt: true,
483
+ params: {
484
+ setPrebidTargeting: true, // optional
485
+ sendToBidders: true, // optional
486
+ onData: function(data, meta){ // optional
487
+ var userCentricData = meta.user; // maybe undefined
488
+ var sourceOfData = meta.source; // contextual, wam or lite
489
+
490
+ var isDefault = meta.isDefault; // true if uses default profile
491
+
492
+ console.log('onData', data, meta);
493
+ },
494
+ weboCtxConf: {
495
+ token: "to-be-defined", // mandatory
496
+ targetURL: "https://prebid.org", // default is document.URL
497
+ setPrebidTargeting: true, // override param.setPrebidTargeting or default true
498
+ sendToBidders: ['appnexus',...], // overide, send to only some bidders
499
+ defaultProfile: { // optional
500
+ webo_ctx: ['moon'],
501
+ webo_ds: ['bar']
502
+ },
503
+ enabled: true,
504
+ //, onData: function (data, ...) { ...}
505
+ },
506
+ weboUserDataConf: {
507
+ accountId: 12345, // recommended
508
+ setPrebidTargeting: ['adUnitCode1',...], // set target only on certain adunits
509
+ sendToBidders: { // send to only some bidders and adunits
510
+ 'appnexus': true, // all adunits for appnexus
511
+ 'pubmatic': ['adUnitCode1',...] // some adunits for pubmatic
512
+ // other bidders will be ignored
513
+ },
514
+ defaultProfile: { // optional
515
+ webo_cs: ['Red'],
516
+ webo_audiences: ['bam']
517
+ },
518
+ localStorageProfileKey: 'webo_wam2gam_entry', // default
519
+ enabled: true,
520
+ //, onData: function (data, ...) { ...}
521
+ },
522
+ sfbxLiteDataConf: {
523
+ setPrebidTargeting: function(adUnitCode){ // specify set target via callback
524
+ return adUnitCode == 'adUnitCode1';
525
+ },
526
+ sendToBidders: function(bid, adUnitCode){ // specify sendToBidders via callback
527
+ return bid.bidder == 'appnexus' && adUnitCode == 'adUnitCode1';
528
+ }
529
+ defaultProfile: { // optional
530
+ lite_occupation: ['gérant', 'bénévole'],
531
+ lite_hobbies: ['sport', 'cinéma'],
532
+ },
533
+ localStorageProfileKey: '_lite', // default
534
+ enabled: true,
535
+ //, onData: function (data, ...) { ...}
536
+ }
537
+ }
538
+ }]
539
+ }
540
+ });
541
+ });
542
+ ```
107
543
 
108
544
  ### Supported Bidders
109
545
 
110
546
  We currently support the following bidder adapters:
547
+
111
548
  * SmartADServer SSP
112
549
  * PubMatic SSP
113
550
  * AppNexus SSP
114
551
  * Rubicon SSP
115
552
 
116
- We also set the bidder and global ortb2 `site` and `user` sections. The following bidders may support it, to be sure, check the `First Party Data Support` on the feature list for the particular bidder from here: https://docs.prebid.org/dev-docs/bidders
553
+ We also set the bidder (and global, if no specific bidders are set on `sendToBidders`) ortb2 `site.ext.data` and `user.ext.data` sections (as arbitrary data). The following bidders may support it, to be sure, check the `First Party Data Support` on the feature list for the particular bidder from [here](https://docs.prebid.org/dev-docs/bidders).
117
554
 
118
555
  * Adagio
119
556
  * AdformOpenRTB
@@ -99,7 +99,7 @@ export const spec = {
99
99
  user: params.user ? params.user : {},
100
100
  app: params.app ? params.app : {},
101
101
  ext: {
102
- tags: params.tags ? params.tags : {},
102
+ tags: {...params.tags, shortname: params.shortname},
103
103
  sid: params.sid ? params.sid : undefined
104
104
  }
105
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "6.24.0",
3
+ "version": "6.26.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
@@ -34,9 +34,7 @@
34
34
  "node": ">=8.9.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@babel/core": "^7.16.7",
38
37
  "@babel/eslint-parser": "^7.16.5",
39
- "@babel/preset-env": "^7.16.8",
40
38
  "@jsdevtools/coverage-istanbul-loader": "^3.0.3",
41
39
  "@wdio/browserstack-service": "^7.16.0",
42
40
  "@wdio/cli": "^7.5.2",
@@ -116,6 +114,8 @@
116
114
  "yargs": "^1.3.1"
117
115
  },
118
116
  "dependencies": {
117
+ "@babel/core": "^7.16.7",
118
+ "@babel/preset-env": "^7.16.8",
119
119
  "babel-plugin-transform-object-assign": "^6.22.0",
120
120
  "core-js": "^3.13.0",
121
121
  "core-js-pure": "^3.13.0",
@@ -126,7 +126,7 @@
126
126
  "express": "^4.15.4",
127
127
  "fun-hooks": "^0.9.9",
128
128
  "just-clone": "^1.0.2",
129
- "live-connect-js": "2.3.1"
129
+ "live-connect-js": "2.3.3"
130
130
  },
131
131
  "optionalDependencies": {
132
132
  "fsevents": "^2.3.2"
package/src/adserver.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { formatQS } from './utils.js';
2
2
  import { targeting } from './targeting.js';
3
+ import {hook} from './hook.js';
3
4
 
4
5
  // Adserver parent class
5
6
  const AdServer = function(attr) {
@@ -11,6 +12,7 @@ const AdServer = function(attr) {
11
12
  };
12
13
 
13
14
  // DFP ad server
15
+ // TODO: this seems to be unused?
14
16
  export function dfpAdserver(options, urlComponents) {
15
17
  var adserver = new AdServer(options);
16
18
  adserver.urlComponents = urlComponents;
@@ -53,3 +55,8 @@ export function dfpAdserver(options, urlComponents) {
53
55
 
54
56
  return adserver;
55
57
  };
58
+
59
+ /**
60
+ * return the GAM PPID, if available (eid for the userID configured with `userSync.ppidSource`)
61
+ */
62
+ export const getPPID = hook('sync', () => undefined);