prebid.js 7.2.0 → 7.5.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 (251) hide show
  1. package/.circleci/config.yml +11 -6
  2. package/.github/dependabot.yml +6 -0
  3. package/.github/workflows/issue_tracker.yml +5 -0
  4. package/.github/workflows/release-drafter.yml +6 -0
  5. package/README.md +35 -0
  6. package/dist/33acrossBidAdapter.js +1 -1
  7. package/dist/adagioBidAdapter.js +1 -1
  8. package/dist/adbookpspBidAdapter.js +1 -1
  9. package/dist/adgenerationBidAdapter.js +1 -1
  10. package/dist/adkernelBidAdapter.js +1 -1
  11. package/dist/adotBidAdapter.js +1 -1
  12. package/dist/adpod.js +1 -1
  13. package/dist/adqueryBidAdapter.js +1 -1
  14. package/dist/adrelevantisBidAdapter.js +1 -1
  15. package/dist/adxcgBidAdapter.js +1 -1
  16. package/dist/adyoulikeBidAdapter.js +1 -1
  17. package/dist/ajaBidAdapter.js +1 -1
  18. package/dist/amxBidAdapter.js +1 -1
  19. package/dist/amxIdSystem.js +1 -1
  20. package/dist/appierAnalyticsAdapter.js +1 -1
  21. package/dist/appnexusBidAdapter.js +1 -1
  22. package/dist/asoBidAdapter.js +1 -1
  23. package/dist/audiencerunBidAdapter.js +1 -1
  24. package/dist/axonixBidAdapter.js +1 -1
  25. package/dist/bidglassBidAdapter.js +1 -1
  26. package/dist/big-richmediaBidAdapter.js +1 -1
  27. package/dist/bluebillywigBidAdapter.js +1 -1
  28. package/dist/bridgewellBidAdapter.js +1 -1
  29. package/dist/brightMountainMediaBidAdapter.js +1 -1
  30. package/dist/concertBidAdapter.js +1 -1
  31. package/dist/connectadBidAdapter.js +1 -1
  32. package/dist/consumableBidAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/cpexIdSystem.js +1 -1
  35. package/dist/craftBidAdapter.js +1 -1
  36. package/dist/criteoBidAdapter.js +1 -1
  37. package/dist/debugging-standalone.js +1 -1
  38. package/dist/debugging.js +1 -1
  39. package/dist/dianomiBidAdapter.js +1 -0
  40. package/dist/dspxBidAdapter.js +1 -1
  41. package/dist/eplanningBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -0
  43. package/dist/fpdModule.js +1 -1
  44. package/dist/gdprEnforcement.js +1 -1
  45. package/dist/glimpseBidAdapter.js +1 -1
  46. package/dist/gmosspBidAdapter.js +1 -1
  47. package/dist/goldbachBidAdapter.js +1 -1
  48. package/dist/gridBidAdapter.js +1 -1
  49. package/dist/gridNMBidAdapter.js +1 -1
  50. package/dist/gumgumBidAdapter.js +1 -1
  51. package/dist/h12mediaBidAdapter.js +1 -1
  52. package/dist/hadronIdSystem.js +1 -1
  53. package/dist/hadronRtdProvider.js +1 -1
  54. package/dist/id5IdSystem.js +1 -1
  55. package/dist/impactifyBidAdapter.js +1 -1
  56. package/dist/improvedigitalBidAdapter.js +1 -1
  57. package/dist/inmarBidAdapter.js +1 -1
  58. package/dist/insticatorBidAdapter.js +1 -1
  59. package/dist/ixBidAdapter.js +1 -1
  60. package/dist/jixieBidAdapter.js +1 -1
  61. package/dist/justpremiumBidAdapter.js +1 -1
  62. package/dist/kargoAnalyticsAdapter.js +1 -1
  63. package/dist/kargoBidAdapter.js +1 -1
  64. package/dist/konduitAnalyticsAdapter.js +1 -1
  65. package/dist/kueezBidAdapter.js +1 -1
  66. package/dist/lassoBidAdapter.js +1 -0
  67. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  68. package/dist/logicadBidAdapter.js +1 -1
  69. package/dist/loglyliftBidAdapter.js +1 -1
  70. package/dist/malltvAnalyticsAdapter.js +1 -1
  71. package/dist/marsmediaBidAdapter.js +1 -1
  72. package/dist/mediafuseBidAdapter.js +1 -1
  73. package/dist/mediakeysBidAdapter.js +1 -1
  74. package/dist/medianetBidAdapter.js +1 -1
  75. package/dist/mediasquareBidAdapter.js +1 -1
  76. package/dist/mgidBidAdapter.js +1 -1
  77. package/dist/minutemediaBidAdapter.js +1 -1
  78. package/dist/missenaBidAdapter.js +1 -1
  79. package/dist/nativoBidAdapter.js +1 -1
  80. package/dist/not-for-prod/prebid.js +137 -131
  81. package/dist/oguryBidAdapter.js +1 -1
  82. package/dist/onetagBidAdapter.js +1 -1
  83. package/dist/ooloAnalyticsAdapter.js +1 -1
  84. package/dist/openxOrtbBidAdapter.js +1 -0
  85. package/dist/outbrainBidAdapter.js +1 -1
  86. package/dist/parrableIdSystem.js +1 -1
  87. package/dist/pixfutureBidAdapter.js +1 -1
  88. package/dist/prebid-core.js +2 -2
  89. package/dist/pubCommonId.js +1 -1
  90. package/dist/publinkIdSystem.js +1 -1
  91. package/dist/pubmaticBidAdapter.js +1 -1
  92. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  93. package/dist/pxyzBidAdapter.js +1 -1
  94. package/dist/quantcastBidAdapter.js +1 -1
  95. package/dist/readpeakBidAdapter.js +1 -1
  96. package/dist/relaidoBidAdapter.js +1 -1
  97. package/dist/rhythmoneBidAdapter.js +1 -1
  98. package/dist/riseBidAdapter.js +1 -1
  99. package/dist/rubiconAnalyticsAdapter.js +1 -1
  100. package/dist/rubiconBidAdapter.js +1 -1
  101. package/dist/seedingAllianceBidAdapter.js +1 -1
  102. package/dist/seedtagBidAdapter.js +1 -1
  103. package/dist/sharedIdSystem.js +1 -1
  104. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  105. package/dist/sharethroughBidAdapter.js +1 -1
  106. package/dist/shinezBidAdapter.js +1 -0
  107. package/dist/sizeMappingV2.js +1 -1
  108. package/dist/smaatoBidAdapter.js +1 -1
  109. package/dist/smartadserverBidAdapter.js +1 -1
  110. package/dist/smartxBidAdapter.js +1 -1
  111. package/dist/smilewantedBidAdapter.js +1 -1
  112. package/dist/sonobiBidAdapter.js +1 -1
  113. package/dist/sovrnAnalyticsAdapter.js +1 -1
  114. package/dist/sovrnBidAdapter.js +1 -1
  115. package/dist/sspBCBidAdapter.js +1 -1
  116. package/dist/sublimeBidAdapter.js +1 -1
  117. package/dist/synacormediaBidAdapter.js +1 -1
  118. package/dist/taboolaBidAdapter.js +1 -1
  119. package/dist/targetVideoBidAdapter.js +1 -1
  120. package/dist/teadsBidAdapter.js +1 -1
  121. package/dist/tncIdSystem.js +1 -0
  122. package/dist/trionBidAdapter.js +1 -1
  123. package/dist/tripleliftBidAdapter.js +1 -1
  124. package/dist/ttdBidAdapter.js +1 -1
  125. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  126. package/dist/underdogmediaBidAdapter.js +1 -1
  127. package/dist/undertoneBidAdapter.js +1 -1
  128. package/dist/userId.js +1 -1
  129. package/dist/ventesBidAdapter.js +1 -1
  130. package/dist/vidazooBidAdapter.js +1 -1
  131. package/dist/videobyteBidAdapter.js +1 -1
  132. package/dist/visxBidAdapter.js +1 -1
  133. package/dist/vrtcalBidAdapter.js +1 -1
  134. package/dist/vuukleBidAdapter.js +1 -1
  135. package/dist/widespaceBidAdapter.js +1 -1
  136. package/dist/winrBidAdapter.js +1 -1
  137. package/dist/yahoosspBidAdapter.js +1 -1
  138. package/dist/yieldlabBidAdapter.js +1 -1
  139. package/dist/yieldmoBidAdapter.js +1 -1
  140. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  141. package/dist/yieldoneBidAdapter.js +1 -1
  142. package/governance.md +5 -11
  143. package/gulpHelpers.js +1 -1
  144. package/gulpfile.js +1 -1
  145. package/karma.conf.maker.js +3 -1
  146. package/modules/.submodules.json +1 -0
  147. package/modules/33acrossBidAdapter.js +5 -1
  148. package/modules/adkernelBidAdapter.js +2 -1
  149. package/modules/adotBidAdapter.js +3 -3
  150. package/modules/adqueryBidAdapter.js +5 -1
  151. package/modules/appnexusBidAdapter.js +3 -3
  152. package/modules/cpexIdSystem.js +7 -8
  153. package/modules/criteoBidAdapter.js +7 -1
  154. package/modules/cwireBidAdapter.md +1 -1
  155. package/modules/debugging/bidInterceptor.js +1 -1
  156. package/modules/debugging/index.js +2 -1
  157. package/modules/dianomiBidAdapter.js +369 -0
  158. package/modules/dianomiBidAdapter.md +73 -0
  159. package/modules/finativeBidAdapter.js +235 -0
  160. package/modules/finativeBidAdapter.md +45 -0
  161. package/modules/fpdModule/index.js +6 -5
  162. package/modules/gdprEnforcement.js +8 -14
  163. package/modules/gumgumBidAdapter.js +2 -0
  164. package/modules/gumgumBidAdapter.md +19 -1
  165. package/modules/hadronAnalyticsAdapter.md +5 -5
  166. package/modules/hadronIdSystem.js +18 -5
  167. package/modules/hadronIdSystem.md +15 -11
  168. package/modules/hadronRtdProvider.js +14 -1
  169. package/modules/hadronRtdProvider.md +17 -13
  170. package/modules/insticatorBidAdapter.js +9 -0
  171. package/modules/ixBidAdapter.js +457 -57
  172. package/modules/ixBidAdapter.md +95 -5
  173. package/modules/kargoAnalyticsAdapter.js +88 -6
  174. package/modules/kargoAnalyticsAdapter.md +33 -0
  175. package/modules/kargoBidAdapter.js +1 -2
  176. package/modules/lassoBidAdapter.js +133 -0
  177. package/modules/lassoBidAdapter.md +29 -0
  178. package/modules/medianetBidAdapter.js +9 -5
  179. package/modules/missenaBidAdapter.js +20 -2
  180. package/modules/nativoBidAdapter.js +19 -7
  181. package/modules/openxBidAdapter.md +3 -1
  182. package/modules/openxOrtbBidAdapter.js +349 -0
  183. package/modules/openxOrtbBidAdapter.md +105 -0
  184. package/modules/pubCommonId.js +1 -2
  185. package/modules/readpeakBidAdapter.js +15 -6
  186. package/modules/relaidoBidAdapter.js +19 -4
  187. package/modules/riseBidAdapter.js +1 -0
  188. package/modules/seedtagBidAdapter.js +33 -1
  189. package/modules/sharedIdSystem.js +11 -5
  190. package/modules/sharethroughBidAdapter.js +9 -24
  191. package/modules/shinezBidAdapter.js +435 -0
  192. package/modules/shinezBidAdapter.md +76 -0
  193. package/modules/sonobiBidAdapter.js +28 -9
  194. package/modules/sovrnBidAdapter.js +16 -10
  195. package/modules/taboolaBidAdapter.js +1 -1
  196. package/modules/taboolaBidAdapter.md +3 -3
  197. package/modules/tncIdSystem.js +63 -0
  198. package/modules/tncIdSystem.md +33 -0
  199. package/modules/userId/eids.js +12 -0
  200. package/modules/userId/eids.md +7 -0
  201. package/modules/userId/userId.md +17 -0
  202. package/modules/ventesBidAdapter.js +1 -1
  203. package/modules/ventesBidAdapter.md +1 -1
  204. package/modules/vrtcalBidAdapter.js +35 -0
  205. package/modules/yieldlabBidAdapter.js +4 -0
  206. package/modules/yieldmoBidAdapter.js +20 -2
  207. package/modules/yieldoneBidAdapter.js +12 -1
  208. package/package.json +1 -1
  209. package/plugins/pbjsGlobals.js +2 -1
  210. package/src/adloader.js +1 -0
  211. package/src/prebid.js +4 -1
  212. package/src/storageManager.js +4 -5
  213. package/test/spec/modules/33acrossBidAdapter_spec.js +39 -0
  214. package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
  215. package/test/spec/modules/cpexIdSystem_spec.js +5 -5
  216. package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
  217. package/test/spec/modules/debugging_mod_spec.js +7 -0
  218. package/test/spec/modules/dianomiBidAdapter_spec.js +1223 -0
  219. package/test/spec/modules/eids_spec.js +26 -1
  220. package/test/spec/modules/finativeBidAdapter_spec.js +186 -0
  221. package/test/spec/modules/fpdModule_spec.js +28 -1
  222. package/test/spec/modules/gdprEnforcement_spec.js +53 -100
  223. package/test/spec/modules/gumgumBidAdapter_spec.js +5 -0
  224. package/test/spec/modules/hadronIdSystem_spec.js +2 -2
  225. package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
  226. package/test/spec/modules/ixBidAdapter_spec.js +429 -10
  227. package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
  228. package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
  229. package/test/spec/modules/lassoBidAdapter_spec.js +177 -0
  230. package/test/spec/modules/medianetBidAdapter_spec.js +24 -1
  231. package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
  232. package/test/spec/modules/nativoBidAdapter_spec.js +67 -17
  233. package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
  234. package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
  235. package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
  236. package/test/spec/modules/riseBidAdapter_spec.js +3 -0
  237. package/test/spec/modules/seedtagBidAdapter_spec.js +4 -0
  238. package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
  239. package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
  240. package/test/spec/modules/sonobiBidAdapter_spec.js +38 -23
  241. package/test/spec/modules/sovrnBidAdapter_spec.js +39 -5
  242. package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
  243. package/test/spec/modules/tncIdSystem_spec.js +109 -0
  244. package/test/spec/modules/userId_spec.js +6 -3
  245. package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
  246. package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
  247. package/test/spec/modules/yieldlabBidAdapter_spec.js +4 -0
  248. package/test/spec/modules/yieldmoBidAdapter_spec.js +15 -2
  249. package/test/spec/modules/yieldoneBidAdapter_spec.js +43 -2
  250. package/test/spec/unit/pbjs_api_spec.js +23 -0
  251. package/webpack.conf.js +1 -1
@@ -1,16 +1,20 @@
1
1
  import {
2
2
  _each,
3
- deepAccess,
4
- deepSetValue,
5
3
  getBidIdParameter,
6
- getUniqueIdentifierStr,
7
4
  isArray,
8
- isInteger,
5
+ getUniqueIdentifierStr,
6
+ deepSetValue,
9
7
  logError,
8
+ deepAccess,
9
+ isInteger,
10
10
  logWarn
11
11
  } from '../src/utils.js';
12
- import {registerBidder} from '../src/adapters/bidderFactory.js';
13
- import {ADPOD, BANNER, VIDEO} from '../src/mediaTypes.js';
12
+ import { registerBidder } from '../src/adapters/bidderFactory.js'
13
+ import {
14
+ ADPOD,
15
+ BANNER,
16
+ VIDEO
17
+ } from '../src/mediaTypes.js'
14
18
  import {createEidsArray} from './userId/eids.js';
15
19
 
16
20
  const ORTB_VIDEO_PARAMS = {
@@ -83,7 +87,6 @@ export const spec = {
83
87
  let iv;
84
88
  let schain;
85
89
  let eids;
86
- let tpid = []
87
90
  let criteoId;
88
91
 
89
92
  _each(bidReqs, function (bid) {
@@ -94,7 +97,6 @@ export const spec = {
94
97
  if (id.source === 'criteo.com') {
95
98
  criteoId = id.uids[0].id
96
99
  }
97
- tpid.push({source: id.source, uid: id.uids[0].id})
98
100
  }
99
101
  })
100
102
  }
@@ -175,7 +177,6 @@ export const spec = {
175
177
 
176
178
  if (eids) {
177
179
  deepSetValue(sovrnBidReq, 'user.ext.eids', eids)
178
- deepSetValue(sovrnBidReq, 'user.ext.tpid', tpid)
179
180
  if (criteoId) {
180
181
  deepSetValue(sovrnBidReq, 'user.ext.prebid_criteoid', criteoId)
181
182
  }
@@ -276,11 +277,16 @@ export const spec = {
276
277
 
277
278
  function _buildVideoRequestObj(bid) {
278
279
  const videoObj = {}
280
+ const bidSizes = deepAccess(bid, 'sizes')
279
281
  const videoAdUnitParams = deepAccess(bid, 'mediaTypes.video', {})
280
282
  const videoBidderParams = deepAccess(bid, 'params.video', {})
281
283
  const computedParams = {}
282
284
 
283
- if (Array.isArray(videoAdUnitParams.playerSize)) {
285
+ if (bidSizes) {
286
+ const sizes = (Array.isArray(bidSizes[0])) ? bidSizes[0] : bidSizes
287
+ computedParams.w = sizes[0]
288
+ computedParams.h = sizes[1]
289
+ } else if (Array.isArray(videoAdUnitParams.playerSize)) {
284
290
  const sizes = (Array.isArray(videoAdUnitParams.playerSize[0])) ? videoAdUnitParams.playerSize[0] : videoAdUnitParams.playerSize
285
291
  computedParams.w = sizes[0]
286
292
  computedParams.h = sizes[1]
@@ -233,7 +233,7 @@ function getBid(requestId, currency, bidResponse) {
233
233
 
234
234
  return {
235
235
  requestId,
236
- ttl: 360,
236
+ ttl: 60,
237
237
  mediaType: BANNER,
238
238
  cpm,
239
239
  creativeId,
@@ -40,10 +40,10 @@ The Taboola Bidding adapter requires setup before beginning. Please contact us o
40
40
 
41
41
  | Name | Scope | Description | Example | Type |
42
42
  |----------------|----------|---------------------------------------------------------|----------------------------|--------------|
43
- | `tagId` | required | Tag ID / Placement Name <br>(as provided by Taboola) | `'Below The Article'` | `String` |
44
- | `publisherId` | required | Alphabetic Publisher ID <br>(as provided by Taboola) | `'acme-publishing'` | `String` |
43
+ | `tagId` | required | Tag ID / Placement Name <br> | `'Below The Article'` | `String` |
44
+ | `publisherId` | required | Numeric Publisher ID <br>(as provided by Taboola) | `'1234567'` | `String` |
45
45
  | `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `Array` |
46
46
  | `badv` | optional | Blocked Advertiser Domains | `'example.com'` | `String Url` |
47
- | `bidfloor` | optional | CPM bid floor | `0.25` | `Integer` |
47
+ | `bidfloor` | optional | CPM bid floor | `0.25` | `Float` |
48
48
 
49
49
 
@@ -0,0 +1,63 @@
1
+ import { submodule } from '../src/hook.js';
2
+ import { logInfo } from '../src/utils.js';
3
+ import { loadExternalScript } from '../src/adloader.js';
4
+
5
+ const MODULE_NAME = 'tncId';
6
+ let url = null;
7
+
8
+ const waitTNCScript = (tncNS) => {
9
+ return new Promise((resolve, reject) => {
10
+ var tnc = window[tncNS];
11
+ if (!tnc) reject(new Error('No TNC Object'));
12
+ if (tnc.tncid) resolve(tnc.tncid);
13
+ tnc.ready(() => {
14
+ tnc = window[tncNS];
15
+ if (tnc.tncid) resolve(tnc.tncid);
16
+ else tnc.on('data-sent', () => resolve(tnc.tncid));
17
+ });
18
+ });
19
+ }
20
+
21
+ const loadRemoteScript = () => {
22
+ return new Promise((resolve) => {
23
+ loadExternalScript(url, MODULE_NAME, resolve);
24
+ })
25
+ }
26
+
27
+ const tncCallback = function (cb) {
28
+ let tncNS = '__tnc';
29
+ let promiseArray = [];
30
+ if (!window[tncNS]) {
31
+ tncNS = '__tncPbjs';
32
+ promiseArray.push(loadRemoteScript());
33
+ }
34
+
35
+ return Promise.all(promiseArray).then(() => waitTNCScript(tncNS)).then(cb).catch(() => cb());
36
+ }
37
+
38
+ export const tncidSubModule = {
39
+ name: MODULE_NAME,
40
+ decode(id) {
41
+ return {
42
+ tncid: id
43
+ };
44
+ },
45
+ gvlid: 750,
46
+ getId(config, consentData) {
47
+ const gdpr = (consentData && typeof consentData.gdprApplies === 'boolean' && consentData.gdprApplies) ? 1 : 0;
48
+ const consentString = gdpr ? consentData.consentString : '';
49
+
50
+ if (gdpr && !consentString) {
51
+ logInfo('Consent string is required for TNCID module');
52
+ return;
53
+ }
54
+
55
+ if (config.params && config.params.url) { url = config.params.url; }
56
+
57
+ return {
58
+ callback: function (cb) { return tncCallback(cb); }
59
+ }
60
+ }
61
+ }
62
+
63
+ submodule('userId', tncidSubModule)
@@ -0,0 +1,33 @@
1
+ # TNCID UserID Module
2
+
3
+ ### Prebid Configuration
4
+
5
+ First, make sure to add the TNCID submodule to your Prebid.js package with:
6
+
7
+ ```
8
+ gulp build --modules=tncIdSystem,userId
9
+ ```
10
+
11
+ ### TNCIDIdSystem module Configuration
12
+
13
+ You can configure this submodule in your `userSync.userIds[]` configuration:
14
+
15
+ ```javascript
16
+ pbjs.setConfig({
17
+ userSync: {
18
+ userIds: [{
19
+ name: 'tncId',
20
+ params: {
21
+ url: 'https://js.tncid.app/remote.min.js' //Optional
22
+ }
23
+ }],
24
+ syncDelay: 5000
25
+ }
26
+ });
27
+ ```
28
+ #### Configuration Params
29
+
30
+ | Param Name | Required | Type | Description |
31
+ | --- | --- | --- | --- |
32
+ | name | Required | String | ID value for the TNCID module: `"tncId"` |
33
+ | params.url | Optional | String | Provide TNC fallback script URL, this script is loaded if there is no TNC script on page |
@@ -307,11 +307,23 @@ export const USER_IDS_CONFIG = {
307
307
  }
308
308
  },
309
309
 
310
+ // tncId
311
+ 'tncid': {
312
+ source: 'thenewco.it',
313
+ atype: 3
314
+ },
315
+
310
316
  // Gravito MP ID
311
317
  'gravitompId': {
312
318
  source: 'gravito.net',
313
319
  atype: 1
314
320
  },
321
+
322
+ // cpexId
323
+ 'cpexId': {
324
+ source: 'czechadid.cz',
325
+ atype: 1
326
+ }
315
327
  };
316
328
 
317
329
  // this function will create an eid object for the given UserId sub-module
@@ -232,6 +232,13 @@ userIdAsEids = [
232
232
  id: 'some-random-id-value',
233
233
  atype: 3
234
234
  }]
235
+ },
236
+ {
237
+ source: 'thenewco.it',
238
+ uids: [{
239
+ id: 'some-random-id-value',
240
+ atype: 3
241
+ }]
235
242
  }
236
243
  ]
237
244
  ```
@@ -356,3 +356,20 @@ pbjs.setConfig({
356
356
  }
357
357
  });
358
358
  ```
359
+ ```
360
+
361
+ Example showing how to configure a `params` object to pass directly to bid adapters
362
+
363
+ ```
364
+ pbjs.setConfig({
365
+ userSync: {
366
+ userIds: [{
367
+ name: 'tncId',
368
+ params: {
369
+ providerId: "c8549079-f149-4529-a34b-3fa91ef257d1"
370
+ }
371
+ }],
372
+ syncDelay: 5000
373
+ }
374
+ });
375
+ ```
@@ -4,7 +4,7 @@ import {find} from '../src/polyfill.js';
4
4
  import {registerBidder} from '../src/adapters/bidderFactory.js';
5
5
 
6
6
  const BID_METHOD = 'POST';
7
- const BIDDER_URL = 'http://13.234.201.146:8088/va/ad';
7
+ const BIDDER_URL = 'https://ad.ventesavenues.in/va/ad';
8
8
 
9
9
  function groupBy(values, key) {
10
10
  const groups = values.reduce((acc, value) => {
@@ -2,7 +2,7 @@
2
2
  layout: bidder
3
3
  title: ventes
4
4
  description: Prebid ventes Bidder Adapter
5
- pbjs: false
5
+ pbjs: true
6
6
  biddercode: ventes
7
7
  gdpr_supported: false
8
8
  usp_supported: false
@@ -2,6 +2,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
2
2
  import { BANNER } from '../src/mediaTypes.js';
3
3
  import {ajax} from '../src/ajax.js';
4
4
  import {isFn, isPlainObject} from '../src/utils.js';
5
+ import { config } from '../src/config.js';
5
6
 
6
7
  export const spec = {
7
8
  code: 'vrtcal',
@@ -21,10 +22,32 @@ export const spec = {
21
22
  }
22
23
  }
23
24
 
25
+ let gdprApplies = 0;
26
+ let gdprConsent = '';
27
+ let ccpa = '';
28
+ let coppa = 0;
29
+ let tmax = 0;
30
+
31
+ if (bid && bid.gdprConsent) {
32
+ gdprApplies = bid.gdprConsent.gdprApplies ? 1 : 0;
33
+ gdprConsent = bid.gdprConsent.consentString;
34
+ }
35
+
36
+ if (bid && bid.uspConsent) {
37
+ ccpa = bid.uspConsent;
38
+ }
39
+
40
+ if (config.getConfig('coppa') === true) {
41
+ coppa = 1;
42
+ }
43
+
44
+ tmax = config.getConfig('bidderTimeout');
45
+
24
46
  const params = {
25
47
  prebidJS: 1,
26
48
  prebidAdUnitCode: bid.adUnitCode,
27
49
  id: bid.bidId,
50
+ tmax: tmax,
28
51
  imp: [{
29
52
  id: '1',
30
53
  banner: {
@@ -41,6 +64,18 @@ export const spec = {
41
64
  device: {
42
65
  ua: 'VRTCAL_FILLED',
43
66
  ip: 'VRTCAL_FILLED'
67
+ },
68
+ regs: {
69
+ coppa: coppa,
70
+ ext: {
71
+ gdpr: gdprApplies,
72
+ us_privacy: ccpa
73
+ }
74
+ },
75
+ user: {
76
+ ext: {
77
+ consent: gdprConsent
78
+ }
44
79
  }
45
80
  };
46
81
 
@@ -49,6 +49,9 @@ export const spec = {
49
49
  if (sizes.length > 0) {
50
50
  adslotSizes.push(bid.params.adslotId + ':' + sizes.join('|'))
51
51
  }
52
+ if (bid.params.extId) {
53
+ query.id = bid.params.extId;
54
+ }
52
55
  if (bid.params.targeting) {
53
56
  query.t = createTargetingString(bid.params.targeting)
54
57
  }
@@ -165,6 +168,7 @@ export const spec = {
165
168
  }
166
169
 
167
170
  if (isNative(bidRequest, adType)) {
171
+ // there may be publishers still rely on it
168
172
  const url = `${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}${pvId}`
169
173
  bidResponse.adUrl = url
170
174
  bidResponse.mediaType = NATIVE
@@ -25,6 +25,7 @@ const TIME_TO_LIVE = 300;
25
25
  const NET_REVENUE = true;
26
26
  const BANNER_SERVER_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebid';
27
27
  const VIDEO_SERVER_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebidvideo';
28
+ const PB_COOKIE_ASSIST_SYNC_ENDPOINT = `https://ads.yieldmo.com/pbcas`;
28
29
  const OUTSTREAM_VIDEO_PLAYER_URL = 'https://prebid-outstream.yieldmo.com/bundle.js';
29
30
  const OPENRTB_VIDEO_BIDPARAMS = ['mimes', 'startdelay', 'placement', 'startdelay', 'skipafter', 'protocols', 'api',
30
31
  'playbackmethod', 'maxduration', 'minduration', 'pos', 'skip', 'skippable'];
@@ -177,8 +178,25 @@ export const spec = {
177
178
  return bids;
178
179
  },
179
180
 
180
- getUserSyncs: function () {
181
- return [];
181
+ getUserSyncs: function(syncOptions, serverResponses, gdprConsent = {}, uspConsent = '') {
182
+ const syncs = [];
183
+ const gdprFlag = `&gdpr=${gdprConsent.gdprApplies ? 1 : 0}`;
184
+ const gdprString = `&gdpr_consent=${encodeURIComponent((gdprConsent.consentString || ''))}`;
185
+ const usPrivacy = `us_privacy=${encodeURIComponent(uspConsent)}`;
186
+ const pbCookieAssistSyncUrl = `${PB_COOKIE_ASSIST_SYNC_ENDPOINT}?${usPrivacy}${gdprFlag}${gdprString}`;
187
+
188
+ if (syncOptions.iframeEnabled) {
189
+ syncs.push({
190
+ type: 'iframe',
191
+ url: pbCookieAssistSyncUrl + '&type=iframe'
192
+ });
193
+ } else if (syncOptions.pixelEnabled) {
194
+ syncs.push({
195
+ type: 'image',
196
+ url: pbCookieAssistSyncUrl + '&type=image'
197
+ });
198
+ }
199
+ return syncs;
182
200
  }
183
201
  };
184
202
  registerBidder(spec);
@@ -31,6 +31,8 @@ export const spec = {
31
31
  const transactionId = bidRequest.transactionId;
32
32
  const unitCode = bidRequest.adUnitCode;
33
33
  const timeout = config.getConfig('bidderTimeout');
34
+ const language = window.navigator.language;
35
+ const screenSize = window.screen.width + 'x' + window.screen.height;
34
36
  const payload = {
35
37
  v: 'hb1',
36
38
  p: placementId,
@@ -40,7 +42,9 @@ export const spec = {
40
42
  tid: transactionId,
41
43
  uc: unitCode,
42
44
  tmax: timeout,
43
- t: 'i'
45
+ t: 'i',
46
+ language: language,
47
+ screen_size: screenSize
44
48
  };
45
49
 
46
50
  const mediaType = getMediaType(bidRequest);
@@ -69,6 +73,13 @@ export const spec = {
69
73
  payload.imuid = imuid;
70
74
  }
71
75
 
76
+ // DACID
77
+ const dacId = deepAccess(bidRequest, 'userId.dacId.id');
78
+ if (isStr(dacId) && !isEmpty(dacId)) {
79
+ payload.dac_id = dacId;
80
+ payload.fuuid = dacId;
81
+ }
82
+
72
83
  return {
73
84
  method: 'GET',
74
85
  url: ENDPOINT_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "7.2.0",
3
+ "version": "7.5.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.js",
6
6
  "scripts": {
@@ -19,7 +19,8 @@ function featureMap(disable = []) {
19
19
 
20
20
  function getNpmVersion(version) {
21
21
  try {
22
- return /^(.*?)(-pre)?$/.exec(version)[1];
22
+ // only use "real" versions (that is, not the -pre ones, they won't be on jsDelivr)
23
+ return /^([\d.]+)$/.exec(version)[1];
23
24
  } catch (e) {
24
25
  return 'latest';
25
26
  }
package/src/adloader.js CHANGED
@@ -12,6 +12,7 @@ const _approvedLoadExternalJSList = [
12
12
  'browsi',
13
13
  'brandmetrics',
14
14
  'justtag',
15
+ 'tncId',
15
16
  'akamaidap',
16
17
  'ftrackId',
17
18
  'inskin',
package/src/prebid.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  adUnitsFilter, flatten, getHighestCpm, isArrayOfNums, isGptPubadsDefined, uniques, logInfo,
6
6
  contains, logError, isArray, deepClone, deepAccess, isNumber, logWarn, logMessage, isFn,
7
7
  transformAdServerTargetingObj, bind, replaceAuctionPrice, replaceClickThrough, insertElement,
8
- inIframe, callBurl, createInvisibleIframe, generateUUID, unsupportedBidderMessage, isEmpty, mergeDeep
8
+ inIframe, callBurl, createInvisibleIframe, generateUUID, unsupportedBidderMessage, isEmpty, mergeDeep, deepSetValue
9
9
  } from './utils.js';
10
10
  import { listenMessagesFromCreative } from './secureCreatives.js';
11
11
  import { userSync } from './userSync.js';
@@ -616,6 +616,9 @@ export const startAuction = hook('async', function ({ bidsBackHandler, timeout:
616
616
 
617
617
  adUnit.transactionId = generateUUID();
618
618
 
619
+ // Populate ortb2Imp.ext.tid with transactionId. Specifying a transaction ID per item in the ortb impression array, lets multiple transaction IDs be transmitted in a single bid request.
620
+ deepSetValue(adUnit, 'ortb2Imp.ext.tid', adUnit.transactionId)
621
+
619
622
  bidders.forEach(bidder => {
620
623
  const adapter = bidderRegistry[bidder];
621
624
  const spec = adapter && adapter.getSpec && adapter.getSpec();
@@ -48,7 +48,7 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
48
48
  let hookDetails = {
49
49
  hasEnforcementHook: false
50
50
  }
51
- validateStorageEnforcement(gvlid, bidderCode || moduleName, moduleType, hookDetails, function(result) {
51
+ validateStorageEnforcement(gvlid, bidderCode || moduleName, hookDetails, function(result) {
52
52
  if (result && result.hasEnforcementHook) {
53
53
  value = cb(result);
54
54
  } else {
@@ -303,7 +303,7 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
303
303
  /**
304
304
  * This hook validates the storage enforcement if gdprEnforcement module is included
305
305
  */
306
- export const validateStorageEnforcement = hook('async', function(gvlid, moduleName, moduleType, hookDetails, callback) {
306
+ export const validateStorageEnforcement = hook('async', function(gvlid, moduleName, hookDetails, callback) {
307
307
  callback(hookDetails);
308
308
  }, 'validateStorageEnforcement');
309
309
 
@@ -322,13 +322,12 @@ export function getCoreStorageManager(moduleName) {
322
322
  * @param {Number=} gvlid? Vendor id - required for proper GDPR integration
323
323
  * @param {string=} bidderCode? - required for bid adapters
324
324
  * @param {string=} moduleName? module name
325
- * @param {string=} moduleType? module type
326
325
  */
327
- export function getStorageManager({gvlid, moduleName, bidderCode, moduleType} = {}) {
326
+ export function getStorageManager({gvlid, moduleName, bidderCode} = {}) {
328
327
  if (arguments.length > 1 || (arguments.length > 0 && !isPlainObject(arguments[0]))) {
329
328
  throw new Error('Invalid invocation for getStorageManager')
330
329
  }
331
- return newStorageManager({gvlid, moduleName, bidderCode, moduleType});
330
+ return newStorageManager({gvlid, moduleName, bidderCode});
332
331
  }
333
332
 
334
333
  export function resetData() {
@@ -387,6 +387,45 @@ describe('33acrossBidAdapter:', function () {
387
387
 
388
388
  describe('isBidRequestValid:', function() {
389
389
  context('basic validation', function() {
390
+ it('returns true for valid bidder name values', function() {
391
+ const validBidderName = [
392
+ '33across',
393
+ '33across_mgni'
394
+ ];
395
+
396
+ validBidderName.forEach((bidderName) => {
397
+ const bid = {
398
+ bidder: bidderName,
399
+ params: {
400
+ siteId: 'sample33xGUID123456789'
401
+ }
402
+ };
403
+
404
+ expect(spec.isBidRequestValid(bid)).to.be.true;
405
+ });
406
+ });
407
+
408
+ it('returns false for invalid bidder name values', function() {
409
+ const invalidBidderName = [
410
+ undefined,
411
+ '33',
412
+ '33x',
413
+ 'thirtythree',
414
+ ''
415
+ ];
416
+
417
+ invalidBidderName.forEach((bidderName) => {
418
+ const bid = {
419
+ bidder: bidderName,
420
+ params: {
421
+ siteId: 'sample33xGUID123456789'
422
+ }
423
+ };
424
+
425
+ expect(spec.isBidRequestValid(bid)).to.be.false;
426
+ });
427
+ });
428
+
390
429
  it('returns true for valid guid values', function() {
391
430
  // NOTE: We ignore whitespace at the start and end since
392
431
  // in our experience these are common typos