prebid.js 7.3.0 → 7.6.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 (225) hide show
  1. package/.circleci/config.yml +11 -6
  2. package/dist/33acrossBidAdapter.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/adnuntiusBidAdapter.js +1 -1
  7. package/dist/adotBidAdapter.js +1 -1
  8. package/dist/adpod.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adrinoBidAdapter.js +1 -1
  11. package/dist/adtelligentBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.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/atsAnalyticsAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/bidglassBidAdapter.js +1 -1
  22. package/dist/big-richmediaBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/byDataAnalyticsAdapter.js +1 -1
  26. package/dist/concertBidAdapter.js +1 -1
  27. package/dist/connectadBidAdapter.js +1 -1
  28. package/dist/consumableBidAdapter.js +1 -1
  29. package/dist/conversantBidAdapter.js +1 -1
  30. package/dist/craftBidAdapter.js +1 -1
  31. package/dist/criteoBidAdapter.js +1 -1
  32. package/dist/debugging-standalone.js +1 -1
  33. package/dist/debugging.js +1 -1
  34. package/dist/dspxBidAdapter.js +1 -1
  35. package/dist/eplanningBidAdapter.js +1 -1
  36. package/dist/finativeBidAdapter.js +1 -1
  37. package/dist/gdprEnforcement.js +1 -1
  38. package/dist/glimpseBidAdapter.js +1 -1
  39. package/dist/gmosspBidAdapter.js +1 -1
  40. package/dist/goldbachBidAdapter.js +1 -1
  41. package/dist/gridBidAdapter.js +1 -1
  42. package/dist/gridNMBidAdapter.js +1 -1
  43. package/dist/gumgumBidAdapter.js +1 -1
  44. package/dist/h12mediaBidAdapter.js +1 -1
  45. package/dist/hadronIdSystem.js +1 -1
  46. package/dist/hadronRtdProvider.js +1 -1
  47. package/dist/id5IdSystem.js +1 -1
  48. package/dist/imRtdProvider.js +1 -1
  49. package/dist/improvedigitalBidAdapter.js +1 -1
  50. package/dist/inmarBidAdapter.js +1 -1
  51. package/dist/insticatorBidAdapter.js +1 -1
  52. package/dist/ixBidAdapter.js +1 -1
  53. package/dist/justpremiumBidAdapter.js +1 -1
  54. package/dist/kargoAnalyticsAdapter.js +1 -1
  55. package/dist/kargoBidAdapter.js +1 -1
  56. package/dist/konduitAnalyticsAdapter.js +1 -1
  57. package/dist/kueezBidAdapter.js +1 -1
  58. package/dist/lassoBidAdapter.js +1 -1
  59. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  60. package/dist/logicadBidAdapter.js +1 -1
  61. package/dist/loglyliftBidAdapter.js +1 -1
  62. package/dist/malltvAnalyticsAdapter.js +1 -1
  63. package/dist/marsmediaBidAdapter.js +1 -1
  64. package/dist/mediafuseBidAdapter.js +1 -1
  65. package/dist/mediasquareBidAdapter.js +1 -1
  66. package/dist/mgidBidAdapter.js +1 -1
  67. package/dist/minutemediaBidAdapter.js +1 -1
  68. package/dist/missenaBidAdapter.js +1 -1
  69. package/dist/newspassidBidAdapter.js +1 -0
  70. package/dist/nextMillenniumBidAdapter.js +1 -1
  71. package/dist/not-for-prod/prebid.js +131 -127
  72. package/dist/oguryBidAdapter.js +1 -1
  73. package/dist/onetagBidAdapter.js +1 -1
  74. package/dist/ooloAnalyticsAdapter.js +1 -1
  75. package/dist/openxOrtbBidAdapter.js +1 -0
  76. package/dist/outbrainBidAdapter.js +1 -1
  77. package/dist/parrableIdSystem.js +1 -1
  78. package/dist/pixfutureBidAdapter.js +1 -1
  79. package/dist/prebid-core.js +2 -2
  80. package/dist/priceFloors.js +1 -1
  81. package/dist/pubCommonId.js +1 -1
  82. package/dist/publinkIdSystem.js +1 -1
  83. package/dist/pubmaticBidAdapter.js +1 -1
  84. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  85. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  86. package/dist/pxyzBidAdapter.js +1 -1
  87. package/dist/quantcastBidAdapter.js +1 -1
  88. package/dist/rasBidAdapter.js +1 -0
  89. package/dist/readpeakBidAdapter.js +1 -1
  90. package/dist/relaidoBidAdapter.js +1 -1
  91. package/dist/rhythmoneBidAdapter.js +1 -1
  92. package/dist/riseBidAdapter.js +1 -1
  93. package/dist/rubiconAnalyticsAdapter.js +1 -1
  94. package/dist/rubiconBidAdapter.js +1 -1
  95. package/dist/seedingAllianceBidAdapter.js +1 -1
  96. package/dist/seedtagBidAdapter.js +1 -1
  97. package/dist/sharedIdSystem.js +1 -1
  98. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  99. package/dist/sharethroughBidAdapter.js +1 -1
  100. package/dist/shinezBidAdapter.js +1 -0
  101. package/dist/sizeMappingV2.js +1 -1
  102. package/dist/smaatoBidAdapter.js +1 -1
  103. package/dist/smartadserverBidAdapter.js +1 -1
  104. package/dist/smartxBidAdapter.js +1 -1
  105. package/dist/smilewantedBidAdapter.js +1 -1
  106. package/dist/sonobiBidAdapter.js +1 -1
  107. package/dist/sovrnAnalyticsAdapter.js +1 -1
  108. package/dist/sovrnBidAdapter.js +1 -1
  109. package/dist/sspBCBidAdapter.js +1 -1
  110. package/dist/sublimeBidAdapter.js +1 -1
  111. package/dist/synacormediaBidAdapter.js +1 -1
  112. package/dist/taboolaBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/trionBidAdapter.js +1 -1
  116. package/dist/tripleliftBidAdapter.js +1 -1
  117. package/dist/ttdBidAdapter.js +1 -1
  118. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  119. package/dist/underdogmediaBidAdapter.js +1 -1
  120. package/dist/undertoneBidAdapter.js +1 -1
  121. package/dist/ventesBidAdapter.js +1 -1
  122. package/dist/vidazooBidAdapter.js +1 -1
  123. package/dist/videobyteBidAdapter.js +1 -1
  124. package/dist/visxBidAdapter.js +1 -1
  125. package/dist/vrtcalBidAdapter.js +1 -1
  126. package/dist/vuukleBidAdapter.js +1 -1
  127. package/dist/widespaceBidAdapter.js +1 -1
  128. package/dist/winrBidAdapter.js +1 -1
  129. package/dist/yahoosspBidAdapter.js +1 -1
  130. package/dist/yieldmoBidAdapter.js +1 -1
  131. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  132. package/gulpfile.js +1 -1
  133. package/karma.conf.maker.js +3 -1
  134. package/modules/adgenerationBidAdapter.js +24 -1
  135. package/modules/adnuntiusBidAdapter.js +26 -8
  136. package/modules/adotBidAdapter.js +13 -4
  137. package/modules/adrinoBidAdapter.js +10 -2
  138. package/modules/adrinoBidAdapter.md +6 -0
  139. package/modules/adtelligentBidAdapter.js +2 -1
  140. package/modules/appnexusBidAdapter.js +3 -3
  141. package/modules/atsAnalyticsAdapter.js +4 -5
  142. package/modules/byDataAnalyticsAdapter.js +172 -74
  143. package/modules/byDataAnalyticsAdapter.md +5 -6
  144. package/modules/consumableBidAdapter.js +12 -1
  145. package/modules/criteoBidAdapter.js +7 -1
  146. package/modules/cwireBidAdapter.md +1 -1
  147. package/modules/debugging/bidInterceptor.js +1 -1
  148. package/modules/debugging/index.js +2 -1
  149. package/modules/eplanningBidAdapter.js +82 -97
  150. package/modules/gdprEnforcement.js +8 -14
  151. package/modules/gridNMBidAdapter.js +45 -4
  152. package/modules/hadronAnalyticsAdapter.md +5 -5
  153. package/modules/hadronIdSystem.js +18 -5
  154. package/modules/hadronIdSystem.md +15 -11
  155. package/modules/hadronRtdProvider.js +14 -1
  156. package/modules/hadronRtdProvider.md +17 -13
  157. package/modules/imRtdProvider.js +0 -8
  158. package/modules/insticatorBidAdapter.js +9 -0
  159. package/modules/ixBidAdapter.js +462 -58
  160. package/modules/ixBidAdapter.md +95 -5
  161. package/modules/kargoAnalyticsAdapter.js +88 -6
  162. package/modules/kargoAnalyticsAdapter.md +33 -0
  163. package/modules/kargoBidAdapter.js +1 -2
  164. package/modules/minutemediaBidAdapter.js +1 -0
  165. package/modules/missenaBidAdapter.js +20 -2
  166. package/modules/newspassidBidAdapter.js +649 -0
  167. package/modules/nextMillenniumBidAdapter.js +17 -1
  168. package/modules/oguryBidAdapter.js +2 -0
  169. package/modules/openxBidAdapter.md +3 -1
  170. package/modules/openxOrtbBidAdapter.js +349 -0
  171. package/modules/openxOrtbBidAdapter.md +105 -0
  172. package/modules/priceFloors.js +1 -1
  173. package/modules/pubCommonId.js +1 -2
  174. package/modules/pubxaiAnalyticsAdapter.js +6 -1
  175. package/modules/rasBidAdapter.js +149 -0
  176. package/modules/rasBidAdapter.md +50 -0
  177. package/modules/readpeakBidAdapter.js +15 -6
  178. package/modules/relaidoBidAdapter.js +19 -4
  179. package/modules/seedtagBidAdapter.js +37 -1
  180. package/modules/sharedIdSystem.js +11 -5
  181. package/modules/sharethroughBidAdapter.js +9 -24
  182. package/modules/shinezBidAdapter.js +435 -0
  183. package/modules/shinezBidAdapter.md +76 -0
  184. package/modules/taboolaBidAdapter.js +1 -1
  185. package/modules/taboolaBidAdapter.md +3 -3
  186. package/modules/ventesBidAdapter.js +1 -1
  187. package/modules/ventesBidAdapter.md +1 -1
  188. package/modules/vrtcalBidAdapter.js +35 -0
  189. package/package.json +1 -1
  190. package/plugins/pbjsGlobals.js +2 -1
  191. package/src/storageManager.js +4 -5
  192. package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
  193. package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
  194. package/test/spec/modules/adotBidAdapter_spec.js +12 -9
  195. package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
  196. package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
  197. package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
  198. package/test/spec/modules/consumableBidAdapter_spec.js +75 -0
  199. package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
  200. package/test/spec/modules/debugging_mod_spec.js +7 -0
  201. package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
  202. package/test/spec/modules/gdprEnforcement_spec.js +53 -100
  203. package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
  204. package/test/spec/modules/hadronIdSystem_spec.js +2 -2
  205. package/test/spec/modules/imRtdProvider_spec.js +0 -1
  206. package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
  207. package/test/spec/modules/ixBidAdapter_spec.js +470 -10
  208. package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
  209. package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
  210. package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
  211. package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
  212. package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
  213. package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
  214. package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
  215. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
  216. package/test/spec/modules/rasBidAdapter_spec.js +190 -0
  217. package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
  218. package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
  219. package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
  220. package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
  221. package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
  222. package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
  223. package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
  224. package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
  225. package/webpack.conf.js +1 -1
@@ -0,0 +1,50 @@
1
+ # Overview
2
+
3
+ ```
4
+ Module Name: Ringier Axel Springer Bidder Adapter
5
+ Module Type: Bidder Adapter
6
+ Maintainer: support@ringpublishing.com
7
+ ```
8
+
9
+ # Description
10
+
11
+ Module that connects to Ringer Axel Springer demand sources.
12
+ Only banner format is supported.
13
+
14
+ # Test Parameters
15
+ ```js
16
+ var adUnits = [{
17
+ code: 'test-div-ad',
18
+ mediaTypes: {
19
+ banner: {
20
+ sizes: [[300, 250], [300, 600]]
21
+ }
22
+ },
23
+ bids: [{
24
+ bidder: 'ras',
25
+ params: {
26
+ network: '4178463',
27
+ site: 'test',
28
+ area: 'areatest',
29
+ slot: 'slot'
30
+ }
31
+ }]
32
+ }];
33
+ ```
34
+
35
+ # Parameters
36
+
37
+ | Name | Scope | Type | Description | Example
38
+ | --- | --- | --- | --- | ---
39
+ | network | required | String | Specific identifier provided by RAS | `"4178463"`
40
+ | site | required | String | Specific identifier name (case-insensitive) that is associated with this ad unit and provided by RAS | `"example_com"`
41
+ | area | required | String | Ad unit category name; only case-insensitive alphanumeric with underscores and hyphens are allowed | `"sport"`
42
+ | slot | required | String | Ad unit placement name (case-insensitive) provided by RAS | `"slot"`
43
+ | pageContext | optional | Object | Web page context data | `{}`
44
+ | pageContext.dr | optional | String | Document referrer URL address | `"https://example.com/"`
45
+ | pageContext.du | optional | String | Document URL address | `"https://example.com/sport/football/article.html?id=932016a5-02fc-4d5c-b643-fafc2f270f06"`
46
+ | pageContext.dv | optional | String | Document virtual address as slash-separated path that may consist of any number of parts (case-insensitive alphanumeric with underscores and hyphens); first part should be the same as `site` value and second as `area` value; next parts may reflect website navigation | `"example_com/sport/football"`
47
+ | pageContext.keyWords | optional | String[] | List of keywords associated with this ad unit; only case-insensitive alphanumeric with underscores and hyphens are allowed | `["euro", "lewandowski"]`
48
+ | pageContext.keyValues | optional | Object | Key-values associated with this ad unit (case-insensitive); following characters are not allowed in the values: `" ' = ! + # * ~ ; ^ ( ) < > [ ] & @` | `{}`
49
+ | pageContext.keyValues.ci | optional | String | Content unique identifier | `"932016a5-02fc-4d5c-b643-fafc2f270f06"`
50
+ | pageContext.keyValues.adunit | optional | String | Ad unit name | `"example_com/sport"`
@@ -1,7 +1,7 @@
1
- import {logError, replaceAuctionPrice} from '../src/utils.js';
2
- import {registerBidder} from '../src/adapters/bidderFactory.js';
3
- import {config} from '../src/config.js';
4
- import {BANNER, NATIVE} from '../src/mediaTypes.js';
1
+ import { logError, replaceAuctionPrice, triggerPixel, isStr } from '../src/utils.js';
2
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
3
+ import { config } from '../src/config.js';
4
+ import { NATIVE, BANNER } from '../src/mediaTypes.js';
5
5
 
6
6
  export const ENDPOINT = 'https://app.readpeak.com/header/prebid';
7
7
 
@@ -64,8 +64,16 @@ export const spec = {
64
64
  };
65
65
  },
66
66
 
67
- interpretResponse: (response, request) =>
68
- bidResponseAvailable(request, response)
67
+ interpretResponse: (response, request) => {
68
+ return bidResponseAvailable(request, response)
69
+ },
70
+
71
+ onBidWon: (bid) => {
72
+ if (bid.burl && isStr(bid.burl)) {
73
+ bid.burl = replaceAuctionPrice(bid.burl, bid.cpm);
74
+ triggerPixel(bid.burl);
75
+ }
76
+ },
69
77
  };
70
78
 
71
79
  function bidResponseAvailable(bidRequest, bidResponse) {
@@ -103,6 +111,7 @@ function bidResponseAvailable(bidRequest, bidResponse) {
103
111
  bid.ad = idToBidMap[id].adm
104
112
  bid.width = idToBidMap[id].w
105
113
  bid.height = idToBidMap[id].h
114
+ bid.burl = idToBidMap[id].burl
106
115
  }
107
116
  if (idToBidMap[id].adomain) {
108
117
  bid.meta = {
@@ -1,4 +1,4 @@
1
- import { deepAccess, logWarn, getBidIdParameter, parseQueryStringParameters, triggerPixel, generateUUID, isArray } from '../src/utils.js';
1
+ import { deepAccess, logWarn, getBidIdParameter, parseQueryStringParameters, triggerPixel, generateUUID, isArray, isNumber } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
3
  import { BANNER, VIDEO } from '../src/mediaTypes.js';
4
4
  import { Renderer } from '../src/Renderer.js';
@@ -6,7 +6,7 @@ import { getStorageManager } from '../src/storageManager.js';
6
6
 
7
7
  const BIDDER_CODE = 'relaido';
8
8
  const BIDDER_DOMAIN = 'api.relaido.jp';
9
- const ADAPTER_VERSION = '1.0.7';
9
+ const ADAPTER_VERSION = '1.0.8';
10
10
  const DEFAULT_TTL = 300;
11
11
  const UUID_KEY = 'relaido_uuid';
12
12
 
@@ -44,7 +44,10 @@ function buildRequests(validBidRequests, bidderRequest) {
44
44
  let height = 0;
45
45
 
46
46
  if (hasVideoMediaType(bidRequest) && isVideoValid(bidRequest)) {
47
- const playerSize = getValidSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'));
47
+ let playerSize = getValidSizes(deepAccess(bidRequest, 'mediaTypes.video.playerSize'));
48
+ if (playerSize.length === 0) {
49
+ playerSize = getValidSizes(deepAccess(bidRequest, 'params.video.playerSize'));
50
+ }
48
51
  width = playerSize[0][0];
49
52
  height = playerSize[0][1];
50
53
  mediaType = VIDEO;
@@ -253,7 +256,10 @@ function isBannerValid(bid) {
253
256
  }
254
257
 
255
258
  function isVideoValid(bid) {
256
- const playerSize = getValidSizes(deepAccess(bid, 'mediaTypes.video.playerSize'));
259
+ let playerSize = getValidSizes(deepAccess(bid, 'mediaTypes.video.playerSize'));
260
+ if (playerSize.length === 0) {
261
+ playerSize = getValidSizes(deepAccess(bid, 'params.video.playerSize'));
262
+ }
257
263
  if (playerSize.length > 0) {
258
264
  const context = deepAccess(bid, 'mediaTypes.video.context');
259
265
  if (context && context === 'outstream') {
@@ -300,6 +306,15 @@ function getValidSizes(sizes) {
300
306
  if ((width >= 300 && height >= 250)) {
301
307
  result.push([width, height]);
302
308
  }
309
+ } else if (isNumber(sizes[i])) {
310
+ const width = sizes[0];
311
+ const height = sizes[1];
312
+ if (width == 1 && height == 1) {
313
+ return [[1, 1]];
314
+ }
315
+ if ((width >= 300 && height >= 250)) {
316
+ return [[width, height]];
317
+ }
303
318
  }
304
319
  }
305
320
  }
@@ -147,6 +147,36 @@ function buildBidResponse(seedtagBid) {
147
147
  return bid;
148
148
  }
149
149
 
150
+ /**
151
+ *
152
+ * @returns Measure time to first byte implementation
153
+ * @see https://web.dev/ttfb/
154
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API
155
+ */
156
+ function ttfb() {
157
+ const ttfb = (() => {
158
+ // Timing API V2
159
+ try {
160
+ const entry = performance.getEntriesByType('navigation')[0];
161
+ return Math.round(entry.responseStart - entry.startTime);
162
+ } catch (e) {
163
+ // Timing API V1
164
+ try {
165
+ const entry = performance.timing;
166
+ return Math.round(entry.responseStart - entry.fetchStart);
167
+ } catch (e) {
168
+ // Timing API not available
169
+ return 0;
170
+ }
171
+ }
172
+ })();
173
+
174
+ // prevent negative or excessive value
175
+ // @see https://github.com/googleChrome/web-vitals/issues/162
176
+ // https://github.com/googleChrome/web-vitals/issues/137
177
+ return ttfb >= 0 && ttfb <= performance.now() ? ttfb : 0;
178
+ }
179
+
150
180
  export function getTimeoutUrl (data) {
151
181
  let queryParams = '';
152
182
  if (
@@ -195,7 +225,9 @@ export const spec = {
195
225
  timeout: bidderRequest.timeout,
196
226
  version: '$prebid.version$',
197
227
  connectionType: getConnectionType(),
198
- bidRequests: _map(validBidRequests, buildBidRequest)
228
+ auctionStart: bidderRequest.auctionStart || Date.now(),
229
+ ttfb: ttfb(),
230
+ bidRequests: _map(validBidRequests, buildBidRequest),
199
231
  };
200
232
 
201
233
  if (payload.cmp) {
@@ -204,6 +236,10 @@ export const spec = {
204
236
  payload['cd'] = bidderRequest.gdprConsent.consentString;
205
237
  }
206
238
 
239
+ if (bidderRequest.uspConsent) {
240
+ payload['uspConsent'] = bidderRequest.uspConsent
241
+ }
242
+
207
243
  const payloadString = JSON.stringify(payload)
208
244
  return {
209
245
  method: 'POST',
@@ -5,13 +5,13 @@
5
5
  * @requires module:modules/userId
6
6
  */
7
7
 
8
- import {buildUrl, generateUUID, hasDeviceAccess, logInfo, parseUrl, triggerPixel} from '../src/utils.js';
8
+ import { parseUrl, buildUrl, triggerPixel, logInfo, hasDeviceAccess, generateUUID } from '../src/utils.js';
9
9
  import {submodule} from '../src/hook.js';
10
- import {coppaDataHandler} from '../src/adapterManager.js';
10
+ import { coppaDataHandler } from '../src/adapterManager.js';
11
11
  import {getStorageManager} from '../src/storageManager.js';
12
12
 
13
- const MODULE_TYPE = 'fpid-module';
14
- export const storage = getStorageManager({moduleName: 'pubCommonId', moduleType: MODULE_TYPE});
13
+ const GVLID = 887;
14
+ export const storage = getStorageManager({gvlid: GVLID, moduleName: 'pubCommonId'});
15
15
  const COOKIE = 'cookie';
16
16
  const LOCAL_STORAGE = 'html5';
17
17
  const OPTOUT_NAME = '_pubcid_optout';
@@ -74,6 +74,11 @@ export const sharedIdSystemSubmodule = {
74
74
  */
75
75
  name: 'sharedId',
76
76
  aliasName: 'pubCommonId',
77
+ /**
78
+ * Vendor id of prebid
79
+ * @type {Number}
80
+ */
81
+ gvlid: GVLID,
77
82
 
78
83
  /**
79
84
  * decode the stored id value for passing to bid requests
@@ -88,7 +93,8 @@ export const sharedIdSystemSubmodule = {
88
93
  return undefined;
89
94
  }
90
95
  logInfo(' Decoded value PubCommonId ' + value);
91
- return {'pubcid': value};
96
+ const idObj = {'pubcid': value};
97
+ return idObj;
92
98
  },
93
99
  /**
94
100
  * performs action to obtain id
@@ -4,7 +4,7 @@ import { config } from '../src/config.js';
4
4
  import { BANNER, VIDEO } from '../src/mediaTypes.js';
5
5
  import { createEidsArray } from './userId/eids.js';
6
6
 
7
- const VERSION = '4.1.0';
7
+ const VERSION = '4.1.1';
8
8
  const BIDDER_CODE = 'sharethrough';
9
9
  const SUPPLY_ID = 'WYu2BXv1';
10
10
 
@@ -34,9 +34,8 @@ export const sharethroughAdapterSpec = {
34
34
  cur: ['USD'],
35
35
  tmax: timeout,
36
36
  site: {
37
- // TODO: do the fallbacks make sense here?
38
- domain: deepAccess(bidderRequest, 'refererInfo.domain') || window.location.hostname,
39
- page: deepAccess(bidderRequest, 'refererInfo.page') || window.location.href,
37
+ domain: deepAccess(bidderRequest, 'refererInfo.domain', window.location.hostname),
38
+ page: deepAccess(bidderRequest, 'refererInfo.page', window.location.href),
40
39
  ref: deepAccess(bidderRequest, 'refererInfo.ref'),
41
40
  ...firstPartyData.site,
42
41
  },
@@ -66,7 +65,7 @@ export const sharethroughAdapterSpec = {
66
65
 
67
66
  req.user = nullish(firstPartyData.user, {});
68
67
  if (!req.user.ext) req.user.ext = {};
69
- req.user.ext.eids = userIdAsEids(bidRequests[0]);
68
+ req.user.ext.eids = createEidsArray(deepAccess(bidRequests[0], 'userId')) || [];
70
69
 
71
70
  if (bidderRequest.gdprConsent) {
72
71
  const gdprApplies = bidderRequest.gdprConsent.gdprApplies === true;
@@ -181,21 +180,12 @@ export const sharethroughAdapterSpec = {
181
180
  });
182
181
  },
183
182
 
184
- getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
185
- const syncParams = uspConsent ? `&us_privacy=${uspConsent}` : '';
186
- const syncs = [];
187
- const shouldCookieSync = syncOptions.pixelEnabled &&
188
- serverResponses.length > 0 &&
189
- serverResponses[0].body &&
190
- serverResponses[0].body.cookieSyncUrls;
191
-
192
- if (shouldCookieSync) {
193
- serverResponses[0].body.cookieSyncUrls.forEach(url => {
194
- syncs.push({ type: 'image', url: url + syncParams });
195
- });
196
- }
183
+ getUserSyncs: (syncOptions, serverResponses) => {
184
+ const shouldCookieSync = syncOptions.pixelEnabled && deepAccess(serverResponses, '0.body.cookieSyncUrls') !== undefined;
197
185
 
198
- return syncs;
186
+ return shouldCookieSync
187
+ ? serverResponses[0].body.cookieSyncUrls.map(url => ({ type: 'image', url: url }))
188
+ : [];
199
189
  },
200
190
 
201
191
  // Empty implementation for prebid core to be able to find it
@@ -244,11 +234,6 @@ function getBidRequestFloor(bid) {
244
234
  return floor !== null ? floor : bid.params.floor;
245
235
  }
246
236
 
247
- function userIdAsEids(bidRequest) {
248
- const eids = createEidsArray(deepAccess(bidRequest, 'userId')) || [];
249
- return eids;
250
- }
251
-
252
237
  function getProtocol() {
253
238
  return window.location.protocol;
254
239
  }