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
@@ -0,0 +1,73 @@
1
+ # Overview
2
+
3
+ ```
4
+ Module Name: Dianomi Bidder Adapter
5
+ Module Type: Bidder Adapter
6
+ Maintainer: eng@dianomi.com
7
+ ```
8
+
9
+ # Description
10
+
11
+ Module that connects to Dianomi's demand sources. Both Native and Banner formats supported. Using oRTB standard.
12
+
13
+ # Test Parameters
14
+
15
+ ```js
16
+ var adUnits = [
17
+ {
18
+ code: 'test-div-1',
19
+ mediaTypes: {
20
+ native: {
21
+ rendererUrl: "https://dev.dianomi.com/chris/prebid/dianomiRenderer.js",
22
+ image: {
23
+ required: true,
24
+ sizes: [360, 360]
25
+ },
26
+ title: {
27
+ required: true,
28
+ len: 800
29
+ },
30
+ sponsoredBy: {
31
+ required: true
32
+ },
33
+ clickUrl: {
34
+ required: true
35
+ },
36
+ privacyLink: {
37
+ required: false
38
+ },
39
+ body: {
40
+ required: false
41
+ },
42
+ icon: {
43
+ required: false,
44
+ sizes: [75, 75]
45
+ },
46
+ }
47
+ },
48
+ bids: [
49
+ {
50
+ bidder: "dianomi",
51
+ params: {
52
+ smartadId: 12345 // required, provided by Account Manager
53
+ }
54
+ }
55
+ ]
56
+ },{
57
+ code: 'test-div-2',
58
+ mediaTypes: {
59
+ banner: {
60
+ sizes: [750, 650], // a below-article size
61
+ }
62
+ },
63
+ bids: [
64
+ {
65
+ bidder: "dianomi",
66
+ params: {
67
+ smartadId: 23456, // required provided by Account Manager
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ];
73
+ ```
@@ -0,0 +1,235 @@
1
+ // jshint esversion: 6, es3: false, node: true
2
+ 'use strict';
3
+
4
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
5
+ import { NATIVE } from '../src/mediaTypes.js';
6
+ import { _map, deepSetValue, isEmpty, deepAccess } from '../src/utils.js';
7
+ import { config } from '../src/config.js';
8
+
9
+ const BIDDER_CODE = 'finative';
10
+ const DEFAULT_CUR = 'EUR';
11
+ const ENDPOINT_URL = 'https://b.finative.cloud/cds/rtb/bid?format=openrtb2.5&ssp=pb';
12
+
13
+ const NATIVE_ASSET_IDS = {0: 'title', 1: 'body', 2: 'sponsoredBy', 3: 'image', 4: 'cta', 5: 'icon'};
14
+
15
+ const NATIVE_PARAMS = {
16
+ title: {
17
+ id: 0,
18
+ name: 'title'
19
+ },
20
+
21
+ body: {
22
+ id: 1,
23
+ name: 'data',
24
+ type: 2
25
+ },
26
+
27
+ sponsoredBy: {
28
+ id: 2,
29
+ name: 'data',
30
+ type: 1
31
+ },
32
+
33
+ image: {
34
+ id: 3,
35
+ type: 3,
36
+ name: 'img'
37
+ },
38
+
39
+ cta: {
40
+ id: 4,
41
+ type: 12,
42
+ name: 'data'
43
+ },
44
+
45
+ icon: {
46
+ id: 5,
47
+ type: 1,
48
+ name: 'img'
49
+ }
50
+ };
51
+
52
+ export const spec = {
53
+ code: BIDDER_CODE,
54
+
55
+ supportedMediaTypes: [NATIVE],
56
+
57
+ isBidRequestValid: function(bid) {
58
+ return !!bid.params.adUnitId;
59
+ },
60
+
61
+ buildRequests: (validBidRequests, bidderRequest) => {
62
+ const pt = setOnAny(validBidRequests, 'params.pt') || setOnAny(validBidRequests, 'params.priceType') || 'net';
63
+ const tid = validBidRequests[0].transactionId;
64
+ const cur = [config.getConfig('currency.adServerCurrency') || DEFAULT_CUR];
65
+ let url = bidderRequest.refererInfo.referer;
66
+
67
+ const imp = validBidRequests.map((bid, id) => {
68
+ const assets = _map(bid.nativeParams, (bidParams, key) => {
69
+ const props = NATIVE_PARAMS[key];
70
+
71
+ const asset = {
72
+ required: bidParams.required & 1
73
+ };
74
+
75
+ if (props) {
76
+ asset.id = props.id;
77
+
78
+ let w, h;
79
+
80
+ if (bidParams.sizes) {
81
+ w = bidParams.sizes[0];
82
+ h = bidParams.sizes[1];
83
+ }
84
+
85
+ asset[props.name] = {
86
+ len: bidParams.len,
87
+ type: props.type,
88
+ w,
89
+ h
90
+ };
91
+
92
+ return asset;
93
+ }
94
+ })
95
+ .filter(Boolean);
96
+
97
+ if (bid.params.url) {
98
+ url = bid.params.url;
99
+ }
100
+
101
+ return {
102
+ id: String(id + 1),
103
+ tagid: bid.params.adUnitId,
104
+ tid: tid,
105
+ pt: pt,
106
+ native: {
107
+ request: {
108
+ assets
109
+ }
110
+ }
111
+ };
112
+ });
113
+
114
+ const request = {
115
+ id: bidderRequest.auctionId,
116
+ site: {
117
+ page: url
118
+ },
119
+ device: {
120
+ ua: navigator.userAgent
121
+ },
122
+ cur,
123
+ imp,
124
+ user: {},
125
+ regs: {
126
+ ext: {
127
+ gdpr: 0,
128
+ pb_ver: '$prebid.version$'
129
+ }
130
+ }
131
+ };
132
+
133
+ if (bidderRequest && bidderRequest.gdprConsent) {
134
+ deepSetValue(request, 'user.ext.consent', bidderRequest.gdprConsent.consentString);
135
+ deepSetValue(request, 'regs.ext.gdpr', (typeof bidderRequest.gdprConsent.gdprApplies === 'boolean' && bidderRequest.gdprConsent.gdprApplies) ? 1 : 0);
136
+ }
137
+
138
+ return {
139
+ method: 'POST',
140
+ url: ENDPOINT_URL,
141
+ data: JSON.stringify(request),
142
+ options: {
143
+ contentType: 'application/json'
144
+ },
145
+ bids: validBidRequests
146
+ };
147
+ },
148
+
149
+ interpretResponse: function(serverResponse, { bids }) {
150
+ if (isEmpty(serverResponse.body)) {
151
+ return [];
152
+ }
153
+
154
+ const { seatbid, cur } = serverResponse.body;
155
+
156
+ const bidResponses = (typeof seatbid != 'undefined') ? flatten(seatbid.map(seat => seat.bid)).reduce((result, bid) => {
157
+ result[bid.impid - 1] = bid;
158
+ return result;
159
+ }, []) : [];
160
+
161
+ return bids
162
+ .map((bid, id) => {
163
+ const bidResponse = bidResponses[id];
164
+
165
+ if (bidResponse) {
166
+ return {
167
+ requestId: bid.bidId,
168
+ cpm: bidResponse.price,
169
+ creativeId: bidResponse.crid,
170
+ ttl: 1000,
171
+ netRevenue: (!bid.netRevenue || bid.netRevenue === 'net'),
172
+ currency: cur,
173
+ mediaType: NATIVE,
174
+ bidderCode: BIDDER_CODE,
175
+ native: parseNative(bidResponse),
176
+ meta: {
177
+ advertiserDomains: bidResponse.adomain && bidResponse.adomain.length > 0 ? bidResponse.adomain : []
178
+ }
179
+ };
180
+ }
181
+ })
182
+ .filter(Boolean);
183
+ }
184
+ };
185
+
186
+ registerBidder(spec);
187
+
188
+ function parseNative(bid) {
189
+ const {assets, link, imptrackers} = bid.adm.native;
190
+
191
+ let clickUrl = link.url.replace(/\$\{AUCTION_PRICE\}/g, bid.price);
192
+
193
+ if (link.clicktrackers) {
194
+ link.clicktrackers.forEach(function (clicktracker, index) {
195
+ link.clicktrackers[index] = clicktracker.replace(/\$\{AUCTION_PRICE\}/g, bid.price);
196
+ });
197
+ }
198
+
199
+ if (imptrackers) {
200
+ imptrackers.forEach(function (imptracker, index) {
201
+ imptrackers[index] = imptracker.replace(/\$\{AUCTION_PRICE\}/g, bid.price);
202
+ });
203
+ }
204
+
205
+ const result = {
206
+ url: clickUrl,
207
+ clickUrl: clickUrl,
208
+ clickTrackers: link.clicktrackers || undefined,
209
+ impressionTrackers: imptrackers || undefined
210
+ };
211
+
212
+ assets.forEach(asset => {
213
+ const kind = NATIVE_ASSET_IDS[asset.id];
214
+ const content = kind && asset[NATIVE_PARAMS[kind].name];
215
+
216
+ if (content) {
217
+ result[kind] = content.text || content.value || { url: content.url, width: content.w, height: content.h };
218
+ }
219
+ });
220
+
221
+ return result;
222
+ }
223
+
224
+ function setOnAny(collection, key) {
225
+ for (let i = 0, result; i < collection.length; i++) {
226
+ result = deepAccess(collection[i], key);
227
+ if (result) {
228
+ return result;
229
+ }
230
+ }
231
+ }
232
+
233
+ function flatten(arr) {
234
+ return [].concat(...arr);
235
+ }
@@ -0,0 +1,45 @@
1
+ # Overview
2
+ Module Name: Finative Bidder Adapter
3
+ Type: Finative Adapter
4
+ Maintainer: tech@finative.cloud
5
+
6
+ # Description
7
+ Finative Bidder Adapter for Prebid.js.
8
+
9
+ # Test Parameters
10
+ ```
11
+ var adUnits = [{
12
+ code: 'test-div',
13
+
14
+ mediaTypes: {
15
+ native: {
16
+ title: {
17
+ required: true,
18
+ len: 50
19
+ },
20
+ body: {
21
+ required: true,
22
+ len: 350
23
+ },
24
+ url: {
25
+ required: true
26
+ },
27
+ image: {
28
+ required: true,
29
+ sizes : [300, 175]
30
+ },
31
+ sponsoredBy: {
32
+ required: true
33
+ }
34
+ }
35
+ },
36
+ bids: [{
37
+ bidder: 'finative',
38
+ params: {
39
+ url : "https://mockup.finative.cloud",
40
+ adUnitId: "1uyo"
41
+ }
42
+ }]
43
+ }];
44
+ ```
45
+
@@ -7,13 +7,14 @@ import { module, getHook } from '../../src/hook.js';
7
7
 
8
8
  let submodules = [];
9
9
 
10
- /**
11
- * enable submodule in User ID
12
- */
13
10
  export function registerSubmodules(submodule) {
14
11
  submodules.push(submodule);
15
12
  }
16
13
 
14
+ export function reset() {
15
+ submodules.length = 0;
16
+ }
17
+
17
18
  export function processFpd({global = {}, bidder = {}} = {}) {
18
19
  let modConf = config.getConfig('firstPartyData') || {};
19
20
 
@@ -26,8 +27,8 @@ export function processFpd({global = {}, bidder = {}} = {}) {
26
27
  return {global, bidder};
27
28
  }
28
29
 
29
- function startAuctionHook(fn, req) {
30
- Object.assign(req, processFpd({global: req.ortb2, bidder: req.bidderOrtb2}));
30
+ export function startAuctionHook(fn, req) {
31
+ Object.assign(req.ortb2Fragments, processFpd(req.ortb2Fragments));
31
32
  fn.call(this, req);
32
33
  }
33
34
 
@@ -18,8 +18,6 @@ const TCF2 = {
18
18
  'purpose7': { id: 7, name: 'measurement' }
19
19
  }
20
20
 
21
- const VENDORLESS_MODULE_TYPES = ['fpid-module'];
22
-
23
21
  /*
24
22
  These rules would be used if `consentManagement.gdpr.rules` is undefined by the publisher.
25
23
  */
@@ -125,10 +123,9 @@ function getGvlidForAnalyticsAdapter(code) {
125
123
  * @param {Object} consentData - gdpr consent data
126
124
  * @param {string=} currentModule - Bidder code of the current module
127
125
  * @param {number=} gvlId - GVL ID for the module
128
- * @param {string=} moduleType module type
129
126
  * @returns {boolean}
130
127
  */
131
- export function validateRules(rule, consentData, currentModule, gvlId, moduleType) {
128
+ export function validateRules(rule, consentData, currentModule, gvlId) {
132
129
  const purposeId = TCF2[Object.keys(TCF2).filter(purposeName => TCF2[purposeName].name === rule.purpose)[0]].id;
133
130
 
134
131
  // return 'true' if vendor present in 'vendorExceptions'
@@ -141,14 +138,12 @@ export function validateRules(rule, consentData, currentModule, gvlId, moduleTyp
141
138
  const vendorConsent = deepAccess(consentData, `vendorData.vendor.consents.${gvlId}`);
142
139
  const liTransparency = deepAccess(consentData, `vendorData.purpose.legitimateInterests.${purposeId}`);
143
140
 
144
- const vendorlessModule = includes(VENDORLESS_MODULE_TYPES, moduleType);
145
-
146
141
  /*
147
142
  Since vendor exceptions have already been handled, the purpose as a whole is allowed if it's not being enforced
148
143
  or the user has consented. Similar with vendors.
149
144
  */
150
145
  const purposeAllowed = rule.enforcePurpose === false || purposeConsent === true;
151
- const vendorAllowed = rule.enforceVendor === false || vendorConsent === true || vendorlessModule === true;
146
+ const vendorAllowed = rule.enforceVendor === false || vendorConsent === true;
152
147
 
153
148
  /*
154
149
  Few if any vendors should be declaring Legitimate Interest for Device Access (Purpose 1), but some are claiming
@@ -167,16 +162,15 @@ export function validateRules(rule, consentData, currentModule, gvlId, moduleTyp
167
162
  * @param {Function} fn reference to original function (used by hook logic)
168
163
  * @param {Number=} gvlid gvlid of the module
169
164
  * @param {string=} moduleName name of the module
170
- * @param {string=} moduleType module type
171
165
  */
172
- export function deviceAccessHook(fn, gvlid, moduleName, moduleType, result) {
166
+ export function deviceAccessHook(fn, gvlid, moduleName, result) {
173
167
  result = Object.assign({}, {
174
168
  hasEnforcementHook: true
175
169
  });
176
170
  if (!hasDeviceAccess()) {
177
171
  logWarn('Device access is disabled by Publisher');
178
172
  result.valid = false;
179
- fn.call(this, gvlid, moduleName, moduleType, result);
173
+ fn.call(this, gvlid, moduleName, result);
180
174
  } else {
181
175
  const consentData = gdprDataHandler.getConsentData();
182
176
  if (consentData && consentData.gdprApplies) {
@@ -188,19 +182,19 @@ export function deviceAccessHook(fn, gvlid, moduleName, moduleType, result) {
188
182
  gvlid = getGvlid(moduleName) || gvlid;
189
183
  }
190
184
  const curModule = moduleName || curBidder;
191
- let isAllowed = validateRules(purpose1Rule, consentData, curModule, gvlid, moduleType);
185
+ let isAllowed = validateRules(purpose1Rule, consentData, curModule, gvlid);
192
186
  if (isAllowed) {
193
187
  result.valid = true;
194
- fn.call(this, gvlid, moduleName, moduleType, result);
188
+ fn.call(this, gvlid, moduleName, result);
195
189
  } else {
196
190
  curModule && logWarn(`TCF2 denied device access for ${curModule}`);
197
191
  result.valid = false;
198
192
  storageBlocked.push(curModule);
199
- fn.call(this, gvlid, moduleName, moduleType, result);
193
+ fn.call(this, gvlid, moduleName, result);
200
194
  }
201
195
  } else {
202
196
  result.valid = true;
203
- fn.call(this, gvlid, moduleName, moduleType, result);
197
+ fn.call(this, gvlid, moduleName, result);
204
198
  }
205
199
  }
206
200
  }
@@ -370,6 +370,8 @@ function buildRequests(validBidRequests, bidderRequest) {
370
370
  data.pi = 5;
371
371
  } else if (mediaTypes.video) {
372
372
  data.pi = mediaTypes.video.linearity === 2 ? 6 : 7; // invideo : video
373
+ } else if (params.product && params.product.toLowerCase() === 'skin') {
374
+ data.pi = 8;
373
375
  }
374
376
  } else { // legacy params
375
377
  data = { ...data, ...handleLegacyParams(params, sizes) }
@@ -10,7 +10,7 @@ Maintainer: engineering@gumgum.com
10
10
 
11
11
  GumGum adapter for Prebid.js
12
12
  Please note that both video and in-video products require a mediaType of video.
13
- In-screen and slot products should have a mediaType of banner.
13
+ In-screen, slot, and skin products should have a mediaType of banner.
14
14
 
15
15
  # Test Parameters
16
16
  ```
@@ -50,6 +50,24 @@ var adUnits = [
50
50
  }
51
51
  }
52
52
  ]
53
+ },{
54
+ code: 'skin-placement',
55
+ sizes: [[300, 50]],
56
+ mediaTypes: {
57
+ banner: {
58
+ sizes: [[1, 1]],
59
+ }
60
+ },
61
+ bids: [
62
+ {
63
+ bidder: 'gumgum',
64
+ params: {
65
+ zone: 'dc9d6be1', // GumGum Zone ID given to the client
66
+ product: 'skin',
67
+ bidfloor: 0.03 // CPM bid floor
68
+ }
69
+ }
70
+ ]
53
71
  },{
54
72
  code: 'video-placement',
55
73
  sizes: [[300, 50]],
@@ -33,7 +33,7 @@ The following configuration parameters are available:
33
33
 
34
34
  ```javascript
35
35
  pbjs.enableAnalytics({
36
- provider: 'hadron',
36
+ provider: 'hadronAnalytics',
37
37
  options: {
38
38
  partnerId: 1234, // change to the Partner ID you got from Audigent
39
39
  eventsToTrack: ['auctionEnd','bidWon']
@@ -41,8 +41,8 @@ pbjs.enableAnalytics({
41
41
  });
42
42
  ```
43
43
 
44
- | Parameter | Scope | Type | Description | Example |
45
- | --- | --- | --- |---------------------------------------------------------| --- |
46
- | provider | Required | String | The name of this module: `hadronAnalytics` | `hadronAnalytics` |
47
- | options.partnerId | Required | Number | This is the Audigent Partner ID obtained from Audigent. | `1234` |
44
+ | Parameter | Scope | Type | Description | Example |
45
+ |-----------------------|----------|------------------|---------------------------------------------------------|---------------------------|
46
+ | provider | Required | String | The name of this module: `hadronAnalytics` | `hadronAnalytics` |
47
+ | options.partnerId | Required | Number | This is the Audigent Partner ID obtained from Audigent. | `1234` |
48
48
  | options.eventsToTrack | Optional | Array of strings | Overrides the set of tracked events | `['auctionEnd','bidWon']` |
@@ -12,6 +12,7 @@ import { isFn, isStr, isPlainObject, logError } from '../src/utils.js';
12
12
 
13
13
  const MODULE_NAME = 'hadronId';
14
14
  const AU_GVLID = 561;
15
+ const DEFAULT_HADRON_URL_ENDPOINT = 'https://id.hadron.ad.gt/api/v1/pbhid';
15
16
 
16
17
  export const storage = getStorageManager({gvlid: AU_GVLID, moduleName: 'hadron'});
17
18
 
@@ -29,6 +30,15 @@ function paramOrDefault(param, defaultVal, arg) {
29
30
  return defaultVal;
30
31
  }
31
32
 
33
+ /**
34
+ * @param {string} url
35
+ * @param {string} params
36
+ * @returns {string}
37
+ */
38
+ const urlAddParams = (url, params) => {
39
+ return url + (url.indexOf('?') > -1 ? '&' : '?') + params
40
+ }
41
+
32
42
  /** @type {Submodule} */
33
43
  export const hadronIdSubmodule = {
34
44
  /**
@@ -39,8 +49,8 @@ export const hadronIdSubmodule = {
39
49
  /**
40
50
  * decode the stored id value for passing to bid requests
41
51
  * @function
42
- * @param {{value:string}} value
43
- * @returns {{hadronId:Object}}
52
+ * @param {string} value
53
+ * @returns {Object}
44
54
  */
45
55
  decode(value) {
46
56
  let hadronId = storage.getDataFromLocalStorage('auHadronId');
@@ -59,9 +69,12 @@ export const hadronIdSubmodule = {
59
69
  if (!isPlainObject(config.params)) {
60
70
  config.params = {};
61
71
  }
62
- const url = paramOrDefault(config.params.url,
63
- `https://id.hadron.ad.gt/api/v1/pbhid`,
64
- config.params.urlArg);
72
+ const partnerId = config.params.partnerId | 0;
73
+
74
+ const url = urlAddParams(
75
+ paramOrDefault(config.params.url, DEFAULT_HADRON_URL_ENDPOINT, config.params.urlArg),
76
+ `partner_id=${partnerId}&_it=prebid`
77
+ );
65
78
 
66
79
  const resp = function (callback) {
67
80
  let hadronId = storage.getDataFromLocalStorage('auHadronId');
@@ -11,6 +11,9 @@ pbjs.setConfig({
11
11
  usersync: {
12
12
  userIds: [{
13
13
  name: 'hadronId',
14
+ params: {
15
+ partnerId: 1234 // change it to the Partner ID you'll get from Audigent
16
+ },
14
17
  storage: {
15
18
  name: 'hadronId',
16
19
  type: 'html5'
@@ -22,14 +25,15 @@ pbjs.setConfig({
22
25
  ## Parameter Descriptions for the `usersync` Configuration Section
23
26
  The below parameters apply only to the HadronID User ID Module integration.
24
27
 
25
- | Param under usersync.userIds[] | Scope | Type | Description | Example |
26
- | --- | --- | --- | --- | --- |
27
- | name | Required | String | ID value for the HadronID module - `"hadronId"` | `"hadronId"` |
28
- | storage | Required | Object | The publisher must specify the local storage in which to store the results of the call to get the user ID. This can be either cookie or HTML5 storage. | |
29
- | storage.type | Required | String | This is where the results of the user ID will be stored. The recommended method is `localStorage` by specifying `html5`. | `"html5"` |
30
- | storage.name | Required | String | The name of the cookie or html5 local storage where the user ID will be stored. | `"hadronid"` |
31
- | storage.expires | Optional | Integer | How long (in days) the user ID information will be stored. | `365` |
32
- | value | Optional | Object | Used only if the page has a separate mechanism for storing the Hadron ID. The value is an object containing the values to be sent to the adapters. In this scenario, no URL is called and nothing is added to local storage | `{"hadronId": "eb33b0cb-8d35-4722-b9c0-1a31d4064888"}` |
33
- | params | Optional | Object | Used to store params for the id system |
34
- | params.url | Optional | String | Set an alternate GET url for HadronId with this parameter |
35
- | params.urlArg | Optional | Object | Optional url parameter for params.url |
28
+ | Param under usersync.userIds[] | Scope | Type | Description | Example |
29
+ |--------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
30
+ | name | Required | String | ID value for the HadronID module - `"hadronId"` | `"hadronId"` |
31
+ | storage | Required | Object | The publisher must specify the local storage in which to store the results of the call to get the user ID. This can be either cookie or HTML5 storage. | |
32
+ | storage.type | Required | String | This is where the results of the user ID will be stored. The recommended method is `localStorage` by specifying `html5`. | `"html5"` |
33
+ | storage.name | Required | String | The name of the cookie or html5 local storage where the user ID will be stored. | `"hadronid"` |
34
+ | storage.expires | Optional | Integer | How long (in days) the user ID information will be stored. | `365` |
35
+ | value | Optional | Object | Used only if the page has a separate mechanism for storing the Hadron ID. The value is an object containing the values to be sent to the adapters. In this scenario, no URL is called and nothing is added to local storage | `{"hadronId": "eb33b0cb-8d35-4722-b9c0-1a31d4064888"}` |
36
+ | params | Optional | Object | Used to store params for the id system |
37
+ | params.partnerId | Required | Number | This is the Audigent Partner ID obtained from Audigent. | `1234` |
38
+ | params.url | Optional | String | Set an alternate GET url for HadronId with this parameter |
39
+ | params.urlArg | Optional | Object | Optional url parameter for params.url |
@@ -23,6 +23,15 @@ export const HALOID_LOCAL_NAME = 'auHadronId';
23
23
  export const RTD_LOCAL_NAME = 'auHadronRtd';
24
24
  export const storage = getStorageManager({gvlid: AU_GVLID, moduleName: SUBMODULE_NAME});
25
25
 
26
+ /**
27
+ * @param {string} url
28
+ * @param {string} params
29
+ * @returns {string}
30
+ */
31
+ const urlAddParams = (url, params) => {
32
+ return url + (url.indexOf('?') > -1 ? '&' : '?') + params
33
+ }
34
+
26
35
  /**
27
36
  * Deep set an object unless value present.
28
37
  * @param {Object} obj
@@ -165,8 +174,12 @@ export function getRealTimeData(bidConfig, onDone, rtdConfig, userConsent) {
165
174
  userIds.hadronId = hadronId;
166
175
  getRealTimeDataAsync(bidConfig, onDone, rtdConfig, userConsent, userIds);
167
176
  }
177
+ const partnerId = rtdConfig.params.partnerId | 0;
168
178
  const hadronIdUrl = rtdConfig.params && rtdConfig.params.hadronIdUrl;
169
- const scriptUrl = paramOrDefault(hadronIdUrl, HADRON_ID_DEFAULT_URL, userIds);
179
+ const scriptUrl = urlAddParams(
180
+ paramOrDefault(hadronIdUrl, HADRON_ID_DEFAULT_URL, userIds),
181
+ `partner_id=${partnerId}&_it=prebid`
182
+ );
170
183
  loadExternalScript(scriptUrl, 'hadron', () => {
171
184
  logInfo(LOG_PREFIX, 'hadronIdTag loaded', scriptUrl);
172
185
  })