prebid.js 7.52.0 → 7.53.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 (214) hide show
  1. package/dist/1plusXRtdProvider.js +1 -1
  2. package/dist/33acrossBidAdapter.js +1 -1
  3. package/dist/33acrossIdSystem.js +1 -1
  4. package/dist/adagioBidAdapter.js +1 -1
  5. package/dist/adbookpspBidAdapter.js +1 -1
  6. package/dist/adgenerationBidAdapter.js +1 -1
  7. package/dist/adkernelBidAdapter.js +1 -1
  8. package/dist/adqueryBidAdapter.js +1 -1
  9. package/dist/adrelevantisBidAdapter.js +1 -1
  10. package/dist/adtrgtmeBidAdapter.js +1 -1
  11. package/dist/adxcgBidAdapter.js +1 -1
  12. package/dist/adyoulikeBidAdapter.js +1 -1
  13. package/dist/airgridRtdProvider.js +1 -1
  14. package/dist/ajaBidAdapter.js +1 -1
  15. package/dist/amxBidAdapter.js +1 -1
  16. package/dist/amxIdSystem.js +1 -1
  17. package/dist/appierAnalyticsAdapter.js +1 -1
  18. package/dist/appnexusBidAdapter.js +1 -1
  19. package/dist/asoBidAdapter.js +1 -1
  20. package/dist/axonixBidAdapter.js +1 -1
  21. package/dist/beopBidAdapter.js +1 -1
  22. package/dist/bidglassBidAdapter.js +1 -1
  23. package/dist/big-richmediaBidAdapter.js +1 -1
  24. package/dist/bridgewellBidAdapter.js +1 -1
  25. package/dist/brightMountainMediaBidAdapter.js +1 -1
  26. package/dist/carodaBidAdapter.js +1 -1
  27. package/dist/chtnwBidAdapter.js +1 -1
  28. package/dist/conceptxBidAdapter.js +1 -0
  29. package/dist/concertBidAdapter.js +1 -1
  30. package/dist/connectadBidAdapter.js +1 -1
  31. package/dist/consumableBidAdapter.js +1 -1
  32. package/dist/conversantAnalyticsAdapter.js +1 -1
  33. package/dist/conversantBidAdapter.js +1 -1
  34. package/dist/craftBidAdapter.js +1 -1
  35. package/dist/criteoBidAdapter.js +1 -1
  36. package/dist/cwireBidAdapter.js +1 -1
  37. package/dist/dspxBidAdapter.js +1 -1
  38. package/dist/eplanningBidAdapter.js +1 -1
  39. package/dist/eskimiBidAdapter.js +1 -1
  40. package/dist/euidIdSystem.js +1 -0
  41. package/dist/feedadBidAdapter.js +1 -1
  42. package/dist/finativeBidAdapter.js +1 -1
  43. package/dist/freepassIdSystem.js +1 -0
  44. package/dist/freewheel-sspBidAdapter.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/greenbidsAnalyticsAdapter.js +1 -1
  49. package/dist/greenbidsRtdProvider.js +1 -1
  50. package/dist/gridBidAdapter.js +1 -1
  51. package/dist/gumgumBidAdapter.js +1 -1
  52. package/dist/h12mediaBidAdapter.js +1 -1
  53. package/dist/id5IdSystem.js +1 -1
  54. package/dist/improvedigitalBidAdapter.js +1 -1
  55. package/dist/inmarBidAdapter.js +1 -1
  56. package/dist/insticatorBidAdapter.js +1 -1
  57. package/dist/ixBidAdapter.js +1 -1
  58. package/dist/justpremiumBidAdapter.js +1 -1
  59. package/dist/kargoBidAdapter.js +1 -1
  60. package/dist/konduitAnalyticsAdapter.js +1 -1
  61. package/dist/kueezBidAdapter.js +1 -1
  62. package/dist/kueezRtbBidAdapter.js +1 -1
  63. package/dist/kulturemediaBidAdapter.js +1 -1
  64. package/dist/lassoBidAdapter.js +1 -1
  65. package/dist/lifestreetBidAdapter.js +1 -1
  66. package/dist/limelightDigitalBidAdapter.js +1 -1
  67. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  68. package/dist/logicadBidAdapter.js +1 -1
  69. package/dist/loglyliftBidAdapter.js +1 -1
  70. package/dist/magniteAnalyticsAdapter.js +1 -1
  71. package/dist/malltvAnalyticsAdapter.js +1 -1
  72. package/dist/marsmediaBidAdapter.js +1 -1
  73. package/dist/mediafuseBidAdapter.js +1 -1
  74. package/dist/mediasquareBidAdapter.js +1 -1
  75. package/dist/mgidBidAdapter.js +1 -1
  76. package/dist/minutemediaBidAdapter.js +1 -1
  77. package/dist/minutemediaplusBidAdapter.js +1 -1
  78. package/dist/nexx360BidAdapter.js +1 -1
  79. package/dist/not-for-prod/prebid.js +146 -142
  80. package/dist/oguryBidAdapter.js +1 -1
  81. package/dist/onetagBidAdapter.js +1 -1
  82. package/dist/ooloAnalyticsAdapter.js +1 -1
  83. package/dist/optidigitalBidAdapter.js +1 -1
  84. package/dist/outbrainBidAdapter.js +1 -1
  85. package/dist/pairIdSystem.js +1 -1
  86. package/dist/parrableIdSystem.js +1 -1
  87. package/dist/pixfutureBidAdapter.js +1 -1
  88. package/dist/prebid-core.js +1 -1
  89. package/dist/proxistoreBidAdapter.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/retailspotBidAdapter.js +1 -1
  98. package/dist/rhythmoneBidAdapter.js +1 -1
  99. package/dist/richaudienceBidAdapter.js +1 -1
  100. package/dist/riseBidAdapter.js +1 -1
  101. package/dist/rubiconAnalyticsAdapter.js +1 -1
  102. package/dist/rubiconBidAdapter.js +1 -1
  103. package/dist/schain.js +1 -1
  104. package/dist/seedingAllianceBidAdapter.js +1 -1
  105. package/dist/seedtagBidAdapter.js +1 -1
  106. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  107. package/dist/sharethroughBidAdapter.js +1 -1
  108. package/dist/shinezBidAdapter.js +1 -1
  109. package/dist/sirdataRtdProvider.js +1 -1
  110. package/dist/smaatoBidAdapter.js +1 -1
  111. package/dist/smartadserverBidAdapter.js +1 -1
  112. package/dist/smartxBidAdapter.js +1 -1
  113. package/dist/smilewantedBidAdapter.js +1 -1
  114. package/dist/sonobiBidAdapter.js +1 -1
  115. package/dist/sovrnAnalyticsAdapter.js +1 -1
  116. package/dist/sovrnBidAdapter.js +1 -1
  117. package/dist/sspBCBidAdapter.js +1 -1
  118. package/dist/stroeerCoreBidAdapter.js +1 -1
  119. package/dist/stvBidAdapter.js +1 -1
  120. package/dist/sublimeBidAdapter.js +1 -1
  121. package/dist/synacormediaBidAdapter.js +1 -1
  122. package/dist/targetVideoBidAdapter.js +1 -1
  123. package/dist/teadsBidAdapter.js +1 -1
  124. package/dist/trionBidAdapter.js +1 -1
  125. package/dist/tripleliftBidAdapter.js +1 -1
  126. package/dist/ttdBidAdapter.js +1 -1
  127. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  128. package/dist/uid2IdSystem.js +1 -1
  129. package/dist/uid2IdSystem_shared.js +1 -0
  130. package/dist/underdogmediaBidAdapter.js +1 -1
  131. package/dist/undertoneBidAdapter.js +1 -1
  132. package/dist/userId.js +1 -1
  133. package/dist/vidazooBidAdapter.js +1 -1
  134. package/dist/videobyteBidAdapter.js +1 -1
  135. package/dist/viouslyBidAdapter.js +1 -1
  136. package/dist/visxBidAdapter.js +1 -1
  137. package/dist/vuukleBidAdapter.js +1 -1
  138. package/dist/weboramaRtdProvider.js +1 -1
  139. package/dist/widespaceBidAdapter.js +1 -1
  140. package/dist/winrBidAdapter.js +1 -1
  141. package/dist/yahoosspBidAdapter.js +1 -1
  142. package/dist/yieldlabBidAdapter.js +1 -1
  143. package/dist/yieldmoBidAdapter.js +1 -1
  144. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  145. package/dist/zeta_global_sspBidAdapter.js +1 -1
  146. package/integrationExamples/gpt/userId_example.html +20 -6
  147. package/modules/.submodules.json +3 -1
  148. package/modules/1plusXRtdProvider.js +31 -60
  149. package/modules/adagioBidAdapter.js +86 -24
  150. package/modules/adkernelBidAdapter.js +2 -2
  151. package/modules/airgridRtdProvider.js +11 -12
  152. package/modules/asoBidAdapter.js +2 -1
  153. package/modules/beopBidAdapter.js +6 -0
  154. package/modules/conceptxBidAdapter.js +70 -0
  155. package/modules/conceptxBidAdapter.md +36 -0
  156. package/modules/criteoBidAdapter.js +9 -2
  157. package/modules/eskimiBidAdapter.js +171 -41
  158. package/modules/eskimiBidAdapter.md +35 -16
  159. package/modules/euidIdSystem.js +121 -0
  160. package/modules/euidIdSystem.md +131 -0
  161. package/modules/freepassIdSystem.js +61 -0
  162. package/modules/freepassIdSystem.md +47 -0
  163. package/modules/greenbidsAnalyticsAdapter.js +1 -1
  164. package/modules/id5IdSystem.js +3 -5
  165. package/modules/ixBidAdapter.js +12 -1
  166. package/modules/limelightDigitalBidAdapter.js +1 -1
  167. package/modules/logicadBidAdapter.js +14 -1
  168. package/modules/mediasquareBidAdapter.js +13 -5
  169. package/modules/nexx360BidAdapter.js +1 -0
  170. package/modules/pairIdSystem.js +10 -5
  171. package/modules/proxistoreBidAdapter.js +11 -14
  172. package/modules/richaudienceBidAdapter.js +10 -1
  173. package/modules/riseBidAdapter.js +1 -1
  174. package/modules/schain.js +2 -2
  175. package/modules/sirdataRtdProvider.js +73 -146
  176. package/modules/sovrnBidAdapter.js +4 -1
  177. package/modules/stroeerCoreBidAdapter.js +55 -6
  178. package/modules/uid2IdSystem.js +27 -210
  179. package/modules/uid2IdSystem.md +104 -23
  180. package/modules/uid2IdSystem_shared.js +232 -0
  181. package/modules/userId/eids.js +8 -0
  182. package/modules/userId/userId.md +2 -1
  183. package/modules/viouslyBidAdapter.js +2 -2
  184. package/modules/weboramaRtdProvider.js +25 -95
  185. package/modules/weboramaRtdProvider.md +4 -4
  186. package/modules/yieldlabBidAdapter.js +23 -14
  187. package/modules/zeta_global_sspBidAdapter.js +27 -22
  188. package/package.json +1 -1
  189. package/src/adloader.js +1 -0
  190. package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
  191. package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
  192. package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
  193. package/test/spec/modules/beopBidAdapter_spec.js +24 -0
  194. package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
  195. package/test/spec/modules/criteoBidAdapter_spec.js +1 -1
  196. package/test/spec/modules/eids_spec.js +15 -0
  197. package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
  198. package/test/spec/modules/euidIdSystem_spec.js +130 -0
  199. package/test/spec/modules/freepassIdSystem_spec.js +186 -0
  200. package/test/spec/modules/id5IdSystem_spec.js +10 -3
  201. package/test/spec/modules/ixBidAdapter_spec.js +30 -0
  202. package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
  203. package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
  204. package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
  205. package/test/spec/modules/schain_spec.js +9 -0
  206. package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
  207. package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
  208. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
  209. package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
  210. package/test/spec/modules/uid2IdSystem_spec.js +131 -86
  211. package/test/spec/modules/userId_spec.js +16 -12
  212. package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
  213. package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
  214. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +200 -4
@@ -0,0 +1,47 @@
1
+ ## FreePass User ID Submodule
2
+
3
+ [FreePass](https://freepass-login.com/introduction.html) is a common authentication service operated by Freebit Co., Ltd. Users with a FreePass account do not need to create a new account to use partner services.
4
+
5
+ # General Information
6
+
7
+ Please contact FreePass before using this ID.
8
+
9
+ ```
10
+ Module Name: FreePass Id System
11
+ Module Type: User Id System
12
+ Maintainer: freepass-headerbidding@craid-inc.com
13
+ ```
14
+
15
+ ## Building Prebid with FreePass ID Support
16
+
17
+ First, make sure to add the FreePass ID submodule to your Prebid.js package with:
18
+
19
+ ```shell
20
+ gulp build --modules=freepassIdSystem,userId
21
+ ```
22
+
23
+ The following configuration parameters are available:
24
+
25
+ ```javascript
26
+ pbjs.setConfig({
27
+ userSync: {
28
+ userIds: [{
29
+ name: 'freepassId',
30
+ params: {
31
+ freepassData: {
32
+ commonId: 'fpcommonid123',
33
+ userIp: '127.0.0.1'
34
+ }
35
+ }
36
+ }]
37
+ }
38
+ });
39
+ ```
40
+
41
+ | Param under userSync.userIds[] | Scope | Type | Description | Example |
42
+ |--------------------------------|----------|--------|------------------------------------------------------|----------------|
43
+ | name | Required | String | The name of this module | `"freepassId"` |
44
+ | freepassData | Optional | Object | FreePass data | `{}` |
45
+ | freepassData.commonId | Optional | String | Common ID obtained from FreePass | `"abcd1234"` |
46
+ | freepassData.userIp | Optional | String | User IP obtained in cooperation with partner service | `"127.0.0.1"` |
47
+
@@ -8,7 +8,7 @@ const analyticsType = 'endpoint';
8
8
 
9
9
  export const ANALYTICS_VERSION = '1.0.0';
10
10
 
11
- const ANALYTICS_SERVER = 'https://europe-west2-greenbids-357713.cloudfunctions.net/publisher-analytics-endpoint';
11
+ const ANALYTICS_SERVER = 'https://a.greenbids.ai';
12
12
 
13
13
  const {
14
14
  EVENTS: {
@@ -60,11 +60,11 @@ export const id5IdSubmodule = {
60
60
  */
61
61
  decode(value, config) {
62
62
  let universalUid;
63
- let linkType = 0;
63
+ let ext = {};
64
64
 
65
65
  if (value && typeof value.universal_uid === 'string') {
66
66
  universalUid = value.universal_uid;
67
- linkType = value.link_type || linkType;
67
+ ext = value.ext || ext;
68
68
  } else {
69
69
  return undefined;
70
70
  }
@@ -72,9 +72,7 @@ export const id5IdSubmodule = {
72
72
  let responseObj = {
73
73
  id5id: {
74
74
  uid: universalUid,
75
- ext: {
76
- linkType: linkType
77
- }
75
+ ext: ext
78
76
  }
79
77
  };
80
78
 
@@ -96,7 +96,7 @@ const VIDEO_PARAMS_ALLOW_LIST = [
96
96
  'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate',
97
97
  'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend',
98
98
  'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext',
99
- 'playerSize', 'w', 'h'
99
+ 'playerSize', 'w', 'h', 'plcmt'
100
100
  ];
101
101
  const LOCAL_STORAGE_KEY = 'ixdiag';
102
102
  export const LOCAL_STORAGE_FEATURE_TOGGLES_KEY = `${BIDDER_CODE}_features`;
@@ -216,6 +216,8 @@ function bidToVideoImp(bid) {
216
216
 
217
217
  const context = (videoParamRef && videoParamRef.context) || (videoAdUnitRef && videoAdUnitRef.context);
218
218
 
219
+ verifyVideoPlcmt(imp);
220
+
219
221
  // if placement not already defined, pick one based on `context`
220
222
  if (context && !imp.video.hasOwnProperty('placement')) {
221
223
  if (context === INSTREAM) {
@@ -249,6 +251,15 @@ function bidToVideoImp(bid) {
249
251
  return imp;
250
252
  }
251
253
 
254
+ function verifyVideoPlcmt(imp) {
255
+ if (imp.video.hasOwnProperty('plcmt') && (!isInteger(imp.video.plcmt) || (imp.video.plcmt < 1 || imp.video.plcmt > 4))) {
256
+ logWarn(
257
+ `IX Bid Adapter: video.plcmt [${imp.video.plcmt}] must be an integer between 1-4 inclusive`
258
+ );
259
+ delete imp.video.plcmt;
260
+ }
261
+ }
262
+
252
263
  /**
253
264
  * Transform valid bid request config object to native impression object that will be sent to ad server.
254
265
  *
@@ -26,7 +26,7 @@ function isBidResponseValid(bid) {
26
26
 
27
27
  export const spec = {
28
28
  code: BIDDER_CODE,
29
- aliases: ['pll', 'iionads'],
29
+ aliases: ['pll', 'iionads', 'apester'],
30
30
  supportedMediaTypes: [BANNER, VIDEO],
31
31
 
32
32
  /**
@@ -1,6 +1,7 @@
1
1
  import {registerBidder} from '../src/adapters/bidderFactory.js';
2
2
  import {BANNER, NATIVE} from '../src/mediaTypes.js';
3
3
  import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
4
+ import { deepAccess } from '../src/utils.js';
4
5
 
5
6
  const BIDDER_CODE = 'logicad';
6
7
  const ENDPOINT_URL = 'https://pb.ladsp.com/adrequest/prebid';
@@ -52,7 +53,7 @@ export const spec = {
52
53
  };
53
54
 
54
55
  function newBidRequest(bid, bidderRequest) {
55
- return {
56
+ const data = {
56
57
  auctionId: bid.auctionId,
57
58
  bidderRequestId: bid.bidderRequestId,
58
59
  bids: [{
@@ -69,6 +70,18 @@ function newBidRequest(bid, bidderRequest) {
69
70
  auctionStartTime: bidderRequest.auctionStart,
70
71
  eids: bid.userIdAsEids,
71
72
  };
73
+
74
+ const sua = deepAccess(bid, 'ortb2.device.sua');
75
+ if (sua) {
76
+ data.sua = sua;
77
+ }
78
+
79
+ const userData = deepAccess(bid, 'ortb2.user.data');
80
+ if (userData) {
81
+ data.userData = userData;
82
+ }
83
+
84
+ return data;
72
85
  }
73
86
 
74
87
  registerBidder(spec);
@@ -127,6 +127,9 @@ export const spec = {
127
127
  'advertiserDomains': value['adomain']
128
128
  }
129
129
  };
130
+ if ('context' in value) {
131
+ bidResponse['mediasquare']['context'] = value['context'];
132
+ }
130
133
  if ('match' in value) {
131
134
  bidResponse['mediasquare']['match'] = value['match'];
132
135
  }
@@ -171,15 +174,20 @@ export const spec = {
171
174
  */
172
175
  onBidWon: function(bid) {
173
176
  // fires a pixel to confirm a winning bid
177
+ if (bid.hasOwnProperty('mediaType') && bid.mediaType == 'video') {
178
+ return;
179
+ }
174
180
  let params = { pbjs: '$prebid.version$', referer: encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation) };
175
181
  let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
176
- let paramsToSearchFor = ['cpm', 'size', 'mediaType', 'currency', 'creativeId', 'adUnitCode', 'timeToRespond', 'requestId', 'auctionId', 'originalCpm', 'originalCurrency'];
182
+ let paramsToSearchFor = ['bidder', 'code', 'match', 'hasConsent', 'context'];
177
183
  if (bid.hasOwnProperty('mediasquare')) {
178
- if (bid['mediasquare'].hasOwnProperty('bidder')) { params['bidder'] = bid['mediasquare']['bidder']; }
179
- if (bid['mediasquare'].hasOwnProperty('code')) { params['code'] = bid['mediasquare']['code']; }
180
- if (bid['mediasquare'].hasOwnProperty('match')) { params['match'] = bid['mediasquare']['match']; }
181
- if (bid['mediasquare'].hasOwnProperty('hasConsent')) { params['hasConsent'] = bid['mediasquare']['hasConsent']; }
184
+ for (let i = 0; i < paramsToSearchFor.length; i++) {
185
+ if (bid['mediasquare'].hasOwnProperty(paramsToSearchFor[i])) {
186
+ params[paramsToSearchFor[i]] = bid['mediasquare'][paramsToSearchFor[i]];
187
+ }
188
+ }
182
189
  };
190
+ paramsToSearchFor = ['cpm', 'size', 'mediaType', 'currency', 'creativeId', 'adUnitCode', 'timeToRespond', 'requestId', 'auctionId', 'originalCpm', 'originalCurrency'];
183
191
  for (let i = 0; i < paramsToSearchFor.length; i++) {
184
192
  if (bid.hasOwnProperty(paramsToSearchFor[i])) {
185
193
  params[paramsToSearchFor[i]] = bid[paramsToSearchFor[i]];
@@ -23,6 +23,7 @@ const ALIASES = [
23
23
  { code: 'adwebone' },
24
24
  { code: 'league-m', gvlid: 965 },
25
25
  { code: 'prjads' },
26
+ { code: 'pubtech' },
26
27
  ];
27
28
 
28
29
  export const storage = getStorageManager({
@@ -32,11 +32,16 @@ export const pairIdSubmodule = {
32
32
  */
33
33
  name: MODULE_NAME,
34
34
  /**
35
- * decode the stored id value for passing to bid requests
36
- * @function
37
- * @param { string | undefined } value
38
- * @returns {{pairId:string} | undefined }
39
- */
35
+ * used to specify vendor id
36
+ * @type {number}
37
+ */
38
+ gvlid: 755,
39
+ /**
40
+ * decode the stored id value for passing to bid requests
41
+ * @function
42
+ * @param { string | undefined } value
43
+ * @returns {{pairId:string} | undefined }
44
+ */
40
45
  decode(value) {
41
46
  return value && Array.isArray(value) ? {'pairId': value} : undefined
42
47
  },
@@ -88,23 +88,20 @@ function _createServerRequest(bidRequests, bidderRequest) {
88
88
  }
89
89
 
90
90
  function _assignSegments(bid) {
91
- if (
92
- bid.ortb2 &&
93
- bid.ortb2.user &&
94
- bid.ortb2.user.ext &&
95
- bid.ortb2.user.ext.data
96
- ) {
97
- return (
98
- bid.ortb2.user.ext.data || {
99
- segments: [],
100
- contextual_categories: {},
101
- }
102
- );
91
+ var segs = (bid.ortb2 && bid.ortb2.user && bid.ortb2.user.ext && bid.ortb2.user.ext.data && bid.ortb2.user.ext.data.sd_rtd && bid.ortb2.user.ext.data.sd_rtd.segments ? bid.ortb2.user.ext.data.sd_rtd.segments : []);
92
+ var cats = {};
93
+ if (bid.ortb2 && bid.ortb2.site && bid.ortb2.site.ext && bid.ortb2.site.ext.data && bid.ortb2.site.ext.data.sd_rtd) {
94
+ if (bid.ortb2.site.ext.data.sd_rtd.categories) {
95
+ segs = segs.concat(bid.ortb2.site.ext.data.sd_rtd.categories);
96
+ }
97
+ if (bid.ortb2.site.ext.data.sd_rtd.categories_score) {
98
+ cats = bid.ortb2.site.ext.data.sd_rtd.categories_score;
99
+ }
103
100
  }
104
101
 
105
102
  return {
106
- segments: [],
107
- contextual_categories: {},
103
+ segments: segs,
104
+ contextual_categories: cats
108
105
  };
109
106
  }
110
107
 
@@ -54,7 +54,8 @@ export const spec = {
54
54
  scr_rsl: raiGetResolution(),
55
55
  cpuc: (typeof window.navigator != 'undefined' ? window.navigator.hardwareConcurrency : null),
56
56
  kws: (!isEmpty(bid.params.keywords) ? bid.params.keywords : null),
57
- schain: bid.schain
57
+ schain: bid.schain,
58
+ gpid: raiSetPbAdSlot(bid)
58
59
  };
59
60
 
60
61
  // TODO: is 'page' the right value here?
@@ -283,6 +284,14 @@ function raiGetResolution() {
283
284
  return resolution;
284
285
  }
285
286
 
287
+ function raiSetPbAdSlot(bid) {
288
+ let pbAdSlot = '';
289
+ if (deepAccess(bid, 'ortb2Imp.ext.data.pbadslot') != null) {
290
+ pbAdSlot = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot')
291
+ }
292
+ return pbAdSlot
293
+ }
294
+
286
295
  function raiGetSyncInclude(config) {
287
296
  try {
288
297
  let raConfig = null;
@@ -417,7 +417,7 @@ function generateGeneralParams(generalObject, bidderRequest) {
417
417
  device_type: getDeviceType(navigator.userAgent),
418
418
  ua: navigator.userAgent,
419
419
  is_wrapper: !!generalBidParams.isWrapper,
420
- session_id: generalBidParams.sessionId || getBidIdParameter('auctionId', generalObject),
420
+ session_id: generalBidParams.sessionId || getBidIdParameter('bidderRequestId', generalObject),
421
421
  tmax: timeout
422
422
  };
423
423
 
package/modules/schain.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  isInteger,
11
11
  _each,
12
12
  logWarn,
13
- deepAccess, deepSetValue
13
+ deepAccess, deepSetValue, deepClone
14
14
  } from '../src/utils.js';
15
15
  import {registerOrtbProcessor, REQUEST} from '../src/pbjsORTB.js';
16
16
 
@@ -180,7 +180,7 @@ export function makeBidRequestsHook(fn, bidderRequests) {
180
180
  bidderRequest.bids.forEach(bid => {
181
181
  let result = resolveSchainConfig(schainConfig, bidder);
182
182
  if (result) {
183
- bid.schain = result;
183
+ bid.schain = deepClone(result);
184
184
  }
185
185
  });
186
186
  });