prebid.js 7.52.0 → 7.54.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 (236) 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/adhashBidAdapter.js +1 -1
  8. package/dist/adkernelBidAdapter.js +1 -1
  9. package/dist/adqueryBidAdapter.js +1 -1
  10. package/dist/adrelevantisBidAdapter.js +1 -1
  11. package/dist/adtrgtmeBidAdapter.js +1 -1
  12. package/dist/adxcgBidAdapter.js +1 -1
  13. package/dist/adyoulikeBidAdapter.js +1 -1
  14. package/dist/airgridRtdProvider.js +1 -1
  15. package/dist/ajaBidAdapter.js +1 -1
  16. package/dist/amxBidAdapter.js +1 -1
  17. package/dist/amxIdSystem.js +1 -1
  18. package/dist/appierAnalyticsAdapter.js +1 -1
  19. package/dist/appnexusBidAdapter.js +1 -1
  20. package/dist/asoBidAdapter.js +1 -1
  21. package/dist/axonixBidAdapter.js +1 -1
  22. package/dist/beopBidAdapter.js +1 -1
  23. package/dist/bidglassBidAdapter.js +1 -1
  24. package/dist/big-richmediaBidAdapter.js +1 -1
  25. package/dist/bridgewellBidAdapter.js +1 -1
  26. package/dist/brightMountainMediaBidAdapter.js +1 -1
  27. package/dist/carodaBidAdapter.js +1 -1
  28. package/dist/chtnwBidAdapter.js +1 -1
  29. package/dist/conceptxBidAdapter.js +1 -0
  30. package/dist/concertBidAdapter.js +1 -1
  31. package/dist/connectadBidAdapter.js +1 -1
  32. package/dist/consumableBidAdapter.js +1 -1
  33. package/dist/conversantAnalyticsAdapter.js +1 -1
  34. package/dist/conversantBidAdapter.js +1 -1
  35. package/dist/craftBidAdapter.js +1 -1
  36. package/dist/criteoBidAdapter.js +1 -1
  37. package/dist/cwireBidAdapter.js +1 -1
  38. package/dist/dspxBidAdapter.js +1 -1
  39. package/dist/eplanningBidAdapter.js +1 -1
  40. package/dist/eskimiBidAdapter.js +1 -1
  41. package/dist/euidIdSystem.js +1 -0
  42. package/dist/feedadBidAdapter.js +1 -1
  43. package/dist/finativeBidAdapter.js +1 -1
  44. package/dist/freepassIdSystem.js +1 -0
  45. package/dist/freewheel-sspBidAdapter.js +1 -1
  46. package/dist/glimpseBidAdapter.js +1 -1
  47. package/dist/gmosspBidAdapter.js +1 -1
  48. package/dist/goldbachBidAdapter.js +1 -1
  49. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  50. package/dist/greenbidsRtdProvider.js +1 -1
  51. package/dist/gridBidAdapter.js +1 -1
  52. package/dist/gumgumBidAdapter.js +1 -1
  53. package/dist/h12mediaBidAdapter.js +1 -1
  54. package/dist/hypelabBidAdapter.js +1 -0
  55. package/dist/id5IdSystem.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/justpremiumBidAdapter.js +1 -1
  61. package/dist/kargoBidAdapter.js +1 -1
  62. package/dist/konduitAnalyticsAdapter.js +1 -1
  63. package/dist/kueezBidAdapter.js +1 -1
  64. package/dist/kueezRtbBidAdapter.js +1 -1
  65. package/dist/kulturemediaBidAdapter.js +1 -1
  66. package/dist/lassoBidAdapter.js +1 -1
  67. package/dist/lifestreetBidAdapter.js +1 -1
  68. package/dist/limelightDigitalBidAdapter.js +1 -1
  69. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  70. package/dist/logicadBidAdapter.js +1 -1
  71. package/dist/loglyliftBidAdapter.js +1 -1
  72. package/dist/magniteAnalyticsAdapter.js +1 -1
  73. package/dist/malltvAnalyticsAdapter.js +1 -1
  74. package/dist/marsmediaBidAdapter.js +1 -1
  75. package/dist/mediafuseBidAdapter.js +1 -1
  76. package/dist/mediasquareBidAdapter.js +1 -1
  77. package/dist/mgidBidAdapter.js +1 -1
  78. package/dist/minutemediaBidAdapter.js +1 -1
  79. package/dist/minutemediaplusBidAdapter.js +1 -1
  80. package/dist/nexx360BidAdapter.js +1 -1
  81. package/dist/not-for-prod/prebid.js +153 -148
  82. package/dist/oguryBidAdapter.js +1 -1
  83. package/dist/onetagBidAdapter.js +1 -1
  84. package/dist/ooloAnalyticsAdapter.js +1 -1
  85. package/dist/optidigitalBidAdapter.js +1 -1
  86. package/dist/outbrainBidAdapter.js +1 -1
  87. package/dist/oxxionRtdProvider.js +1 -1
  88. package/dist/pairIdSystem.js +1 -1
  89. package/dist/parrableIdSystem.js +1 -1
  90. package/dist/pixfutureBidAdapter.js +1 -1
  91. package/dist/prebid-core.js +1 -1
  92. package/dist/proxistoreBidAdapter.js +1 -1
  93. package/dist/publinkIdSystem.js +1 -1
  94. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  95. package/dist/pubmaticBidAdapter.js +1 -1
  96. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  97. package/dist/pxyzBidAdapter.js +1 -1
  98. package/dist/quantcastBidAdapter.js +1 -1
  99. package/dist/readpeakBidAdapter.js +1 -1
  100. package/dist/relaidoBidAdapter.js +1 -1
  101. package/dist/retailspotBidAdapter.js +1 -1
  102. package/dist/rhythmoneBidAdapter.js +1 -1
  103. package/dist/richaudienceBidAdapter.js +1 -1
  104. package/dist/riseBidAdapter.js +1 -1
  105. package/dist/rubiconAnalyticsAdapter.js +1 -1
  106. package/dist/rubiconBidAdapter.js +1 -1
  107. package/dist/schain.js +1 -1
  108. package/dist/seedingAllianceBidAdapter.js +1 -1
  109. package/dist/seedtagBidAdapter.js +1 -1
  110. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  111. package/dist/sharethroughBidAdapter.js +1 -1
  112. package/dist/shinezBidAdapter.js +1 -1
  113. package/dist/sirdataRtdProvider.js +1 -1
  114. package/dist/smaatoBidAdapter.js +1 -1
  115. package/dist/smartadserverBidAdapter.js +1 -1
  116. package/dist/smartxBidAdapter.js +1 -1
  117. package/dist/smilewantedBidAdapter.js +1 -1
  118. package/dist/sonobiBidAdapter.js +1 -1
  119. package/dist/sovrnAnalyticsAdapter.js +1 -1
  120. package/dist/sovrnBidAdapter.js +1 -1
  121. package/dist/sspBCBidAdapter.js +1 -1
  122. package/dist/stroeerCoreBidAdapter.js +1 -1
  123. package/dist/stvBidAdapter.js +1 -1
  124. package/dist/sublimeBidAdapter.js +1 -1
  125. package/dist/synacormediaBidAdapter.js +1 -1
  126. package/dist/targetVideoBidAdapter.js +1 -1
  127. package/dist/teadsBidAdapter.js +1 -1
  128. package/dist/topicsFpdModule.js +1 -1
  129. package/dist/trionBidAdapter.js +1 -1
  130. package/dist/tripleliftBidAdapter.js +1 -1
  131. package/dist/ttdBidAdapter.js +1 -1
  132. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  133. package/dist/uid2IdSystem.js +1 -1
  134. package/dist/uid2IdSystem_shared.js +1 -0
  135. package/dist/underdogmediaBidAdapter.js +1 -1
  136. package/dist/undertoneBidAdapter.js +1 -1
  137. package/dist/userId.js +1 -1
  138. package/dist/vidazooBidAdapter.js +1 -1
  139. package/dist/videobyteBidAdapter.js +1 -1
  140. package/dist/videojsVideoProvider.js +1 -1
  141. package/dist/viouslyBidAdapter.js +1 -1
  142. package/dist/visxBidAdapter.js +1 -1
  143. package/dist/vrtcalBidAdapter.js +1 -1
  144. package/dist/vuukleBidAdapter.js +1 -1
  145. package/dist/weboramaRtdProvider.js +1 -1
  146. package/dist/widespaceBidAdapter.js +1 -1
  147. package/dist/winrBidAdapter.js +1 -1
  148. package/dist/yahoosspBidAdapter.js +1 -1
  149. package/dist/yieldlabBidAdapter.js +1 -1
  150. package/dist/yieldmoBidAdapter.js +1 -1
  151. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  152. package/dist/zeta_global_sspBidAdapter.js +1 -1
  153. package/integrationExamples/gpt/userId_example.html +20 -6
  154. package/modules/.submodules.json +3 -1
  155. package/modules/1plusXRtdProvider.js +31 -60
  156. package/modules/adagioBidAdapter.js +86 -24
  157. package/modules/adhashBidAdapter.js +56 -34
  158. package/modules/adkernelBidAdapter.js +2 -2
  159. package/modules/airgridRtdProvider.js +11 -12
  160. package/modules/asoBidAdapter.js +2 -1
  161. package/modules/beopBidAdapter.js +6 -0
  162. package/modules/conceptxBidAdapter.js +70 -0
  163. package/modules/conceptxBidAdapter.md +36 -0
  164. package/modules/criteoBidAdapter.js +9 -2
  165. package/modules/eskimiBidAdapter.js +171 -41
  166. package/modules/eskimiBidAdapter.md +35 -16
  167. package/modules/euidIdSystem.js +121 -0
  168. package/modules/euidIdSystem.md +131 -0
  169. package/modules/freepassIdSystem.js +61 -0
  170. package/modules/freepassIdSystem.md +47 -0
  171. package/modules/greenbidsAnalyticsAdapter.js +1 -1
  172. package/modules/hypelabBidAdapter.js +153 -0
  173. package/modules/hypelabBidAdapter.md +38 -0
  174. package/modules/id5IdSystem.js +3 -5
  175. package/modules/ixBidAdapter.js +12 -1
  176. package/modules/limelightDigitalBidAdapter.js +1 -1
  177. package/modules/logicadBidAdapter.js +14 -1
  178. package/modules/mediasquareBidAdapter.js +13 -5
  179. package/modules/nexx360BidAdapter.js +1 -0
  180. package/modules/oxxionRtdProvider.js +7 -29
  181. package/modules/pairIdSystem.js +10 -5
  182. package/modules/proxistoreBidAdapter.js +11 -14
  183. package/modules/pubmaticAnalyticsAdapter.js +31 -8
  184. package/modules/richaudienceBidAdapter.js +10 -1
  185. package/modules/riseBidAdapter.js +1 -1
  186. package/modules/schain.js +2 -2
  187. package/modules/sirdataRtdProvider.js +73 -146
  188. package/modules/sovrnBidAdapter.js +4 -1
  189. package/modules/stroeerCoreBidAdapter.js +55 -6
  190. package/modules/teadsBidAdapter.js +0 -1
  191. package/modules/topicsFpdModule.js +4 -1
  192. package/modules/uid2IdSystem.js +27 -210
  193. package/modules/uid2IdSystem.md +104 -23
  194. package/modules/uid2IdSystem_shared.js +232 -0
  195. package/modules/userId/eids.js +8 -0
  196. package/modules/userId/userId.md +2 -1
  197. package/modules/videojsVideoProvider.js +2 -0
  198. package/modules/viouslyBidAdapter.js +2 -2
  199. package/modules/vrtcalBidAdapter.js +5 -0
  200. package/modules/weboramaRtdProvider.js +25 -95
  201. package/modules/weboramaRtdProvider.md +4 -4
  202. package/modules/yieldlabBidAdapter.js +23 -14
  203. package/modules/zeta_global_sspBidAdapter.js +27 -22
  204. package/package.json +1 -1
  205. package/src/adloader.js +1 -0
  206. package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
  207. package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
  208. package/test/spec/modules/adhashBidAdapter_spec.js +18 -2
  209. package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
  210. package/test/spec/modules/beopBidAdapter_spec.js +24 -0
  211. package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
  212. package/test/spec/modules/criteoBidAdapter_spec.js +1 -1
  213. package/test/spec/modules/eids_spec.js +15 -0
  214. package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
  215. package/test/spec/modules/euidIdSystem_spec.js +130 -0
  216. package/test/spec/modules/freepassIdSystem_spec.js +186 -0
  217. package/test/spec/modules/hypelabBidAdapter_spec.js +281 -0
  218. package/test/spec/modules/id5IdSystem_spec.js +10 -3
  219. package/test/spec/modules/ixBidAdapter_spec.js +30 -0
  220. package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
  221. package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
  222. package/test/spec/modules/oxxionRtdProvider_spec.js +3 -2
  223. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +7 -0
  224. package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
  225. package/test/spec/modules/schain_spec.js +9 -0
  226. package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
  227. package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
  228. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
  229. package/test/spec/modules/teadsBidAdapter_spec.js +7 -0
  230. package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
  231. package/test/spec/modules/uid2IdSystem_spec.js +131 -86
  232. package/test/spec/modules/userId_spec.js +16 -12
  233. package/test/spec/modules/vrtcalBidAdapter_spec.js +9 -2
  234. package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
  235. package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
  236. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +200 -4
@@ -6,29 +6,48 @@ Maintainer: tech@eskimi.com
6
6
 
7
7
  # Description
8
8
 
9
- An adapter to get a bid from Eskimi DSP.
9
+ Module that connects to Eskimi demand sources to fetch bids using OpenRTB standard.
10
+ Banner and video formats are supported.
10
11
 
11
12
  # Test Parameters
12
13
  ```javascript
13
14
  var adUnits = [{
14
- code: 'div-gpt-ad-1460505748561-0',
15
- mediaTypes: {
16
- banner: {
17
- sizes: [[300, 250], [300, 600]]
18
- }
19
- },
20
-
21
- bids: [{
22
- bidder: 'eskimi',
23
- params: {
24
- placementId: 612
25
- }
26
- }]
27
-
28
- }];
15
+ code: '/19968336/prebid_banner_example_1',
16
+ mediaTypes: {
17
+ banner: {
18
+ sizes: [[ 300, 250 ]],
19
+ ... // battr
20
+ }
21
+ },
22
+ bids: [{
23
+ bidder: 'eskimi',
24
+ params: {
25
+ placementId: 612,
26
+ ... // bcat, badv, bapp
27
+ }
28
+ }]
29
+ }, {
30
+ code: '/19968336/prebid_video_example_1',
31
+ mediaTypes: {
32
+ video: {
33
+ context: 'outstream',
34
+ mimes: ['video/mp4'],
35
+ api: [1, 2, 4, 6],
36
+ ... // Aditional ORTB video params (including battr)
37
+ }
38
+ },
39
+ bids: [{
40
+ bidder: 'eskimi',
41
+ params: {
42
+ placementId: 612,
43
+ ... // bcat, badv, bapp
44
+ }
45
+ }]
46
+ }];
29
47
  ```
30
48
 
31
49
  Where:
32
50
 
33
51
  * placementId - Placement ID of the ad unit (required)
52
+ * bcat, badv, bapp, battr - ORTB blocking parameters as specified by OpenRTB 2.5
34
53
 
@@ -0,0 +1,121 @@
1
+ /**
2
+ * This module adds EUID ID support to the User ID module. It shares significant functionality with the UID2 module.
3
+ * The {@link module:modules/userId} module is required.
4
+ * @module modules/euidIdSystem
5
+ * @requires module:modules/userId
6
+ */
7
+
8
+ import { logInfo, logWarn, deepAccess } from '../src/utils.js';
9
+ import {submodule} from '../src/hook.js';
10
+ import {getStorageManager} from '../src/storageManager.js';
11
+ import {MODULE_TYPE_UID} from '../src/activities/modules.js';
12
+
13
+ // RE below lint exception: UID2 and EUID are separate modules, but the protocol is the same and shared code makes sense here.
14
+ // eslint-disable-next-line prebid/validate-imports
15
+ import { Uid2GetId, Uid2CodeVersion } from './uid2IdSystem_shared.js';
16
+
17
+ const MODULE_NAME = 'euid';
18
+ const MODULE_REVISION = Uid2CodeVersion;
19
+ const PREBID_VERSION = '$prebid.version$';
20
+ const EUID_CLIENT_ID = `PrebidJS-${PREBID_VERSION}-EUIDModule-${MODULE_REVISION}`;
21
+ const GVLID_TTD = 21; // The Trade Desk
22
+ const LOG_PRE_FIX = 'EUID: ';
23
+ const ADVERTISING_COOKIE = '__euid_advertising_token';
24
+
25
+ // eslint-disable-next-line no-unused-vars
26
+ const EUID_TEST_URL = 'https://integ.euid.eu';
27
+ const EUID_PROD_URL = 'https://prod.euid.eu';
28
+ const EUID_BASE_URL = EUID_PROD_URL;
29
+
30
+ function createLogger(logger, prefix) {
31
+ return function (...strings) {
32
+ logger(prefix + ' ', ...strings);
33
+ }
34
+ }
35
+ const _logInfo = createLogger(logInfo, LOG_PRE_FIX);
36
+ const _logWarn = createLogger(logWarn, LOG_PRE_FIX);
37
+
38
+ export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME});
39
+
40
+ function hasWriteToDeviceConsent(consentData) {
41
+ const gdprApplies = consentData?.gdprApplies === true;
42
+ const localStorageConsent = deepAccess(consentData, `vendorData.purpose.consents.1`)
43
+ const prebidVendorConsent = deepAccess(consentData, `vendorData.vendor.consents.${GVLID_TTD.toString()}`)
44
+ if (gdprApplies && (!localStorageConsent || !prebidVendorConsent)) {
45
+ return false;
46
+ }
47
+ return true;
48
+ }
49
+
50
+ /** @type {Submodule} */
51
+ export const euidIdSubmodule = {
52
+ /**
53
+ * used to link submodule with config
54
+ * @type {string}
55
+ */
56
+ name: MODULE_NAME,
57
+
58
+ /**
59
+ * Vendor id of The Trade Desk
60
+ * @type {Number}
61
+ */
62
+ gvlid: GVLID_TTD,
63
+ /**
64
+ * decode the stored id value for passing to bid requests
65
+ * @function
66
+ * @param {string} value
67
+ * @returns {{euid:{ id: string } }} or undefined if value doesn't exists
68
+ */
69
+ decode(value) {
70
+ const result = decodeImpl(value);
71
+ _logInfo('EUID decode returned', result);
72
+ return result;
73
+ },
74
+
75
+ /**
76
+ * performs action to obtain id and return a value.
77
+ * @function
78
+ * @param {SubmoduleConfig} [configparams]
79
+ * @param {ConsentData|undefined} consentData
80
+ * @returns {euidId}
81
+ */
82
+ getId(config, consentData) {
83
+ if (consentData?.gdprApplies !== true) {
84
+ logWarn('EUID is intended for use within the EU. The module will not run when GDPR does not apply.');
85
+ return;
86
+ }
87
+ if (!hasWriteToDeviceConsent(consentData)) {
88
+ // The module cannot operate without this permission.
89
+ _logWarn(`Unable to use EUID module due to insufficient consent. The EUID module requires storage permission.`)
90
+ return;
91
+ }
92
+
93
+ const mappedConfig = {
94
+ apiBaseUrl: config?.params?.euidApiBase ?? EUID_BASE_URL,
95
+ paramToken: config?.params?.euidToken,
96
+ serverCookieName: config?.params?.euidCookie,
97
+ storage: config?.params?.storage ?? 'localStorage',
98
+ clientId: EUID_CLIENT_ID,
99
+ internalStorage: ADVERTISING_COOKIE
100
+ };
101
+
102
+ const result = Uid2GetId(mappedConfig, storage, _logInfo, _logWarn);
103
+ _logInfo(`EUID getId returned`, result);
104
+ return result;
105
+ },
106
+ };
107
+
108
+ function decodeImpl(value) {
109
+ if (typeof value === 'string') {
110
+ _logInfo('Found server-only token. Refresh is unavailable for this token.');
111
+ const result = { euid: { id: value } };
112
+ return result;
113
+ }
114
+ if (Date.now() < value.latestToken.identity_expires) {
115
+ return { euid: { id: value.latestToken.advertising_token } };
116
+ }
117
+ return null;
118
+ }
119
+
120
+ // Register submodule for userId
121
+ submodule('userId', euidIdSubmodule);
@@ -0,0 +1,131 @@
1
+ ## EUID User ID Submodule
2
+
3
+ EUID requires initial tokens to be generated server-side. The EUID module handles storing, providing, and optionally refreshing them. The module can operate in one of two different modes: *Client Refresh* mode or *Server Only* mode.
4
+
5
+ *Server Only* mode was originally referred to as *legacy mode*, but it is a popular mode for new integrations where publishers prefer to handle token refresh server-side.
6
+
7
+ ## Client Refresh mode
8
+
9
+ This is the recommended mode for most scenarios. In this mode, the full response body from the EUID Token Generate or Token Refresh endpoint must be provided to the module. As long as the refresh token remains valid, the module will refresh the advertising token as needed.
10
+
11
+ To configure the module to use this mode, you must **either**:
12
+ 1. Set `params.euidCookie` to the name of the cookie which contains the response body as a JSON string, **or**
13
+ 2. Set `params.euidToken` to the response body as a JavaScript object.
14
+
15
+ ### Client refresh cookie example
16
+
17
+ In this example, the cookie is called `euid_pub_cookie`.
18
+
19
+ Cookie:
20
+ ```
21
+ euid_pub_cookie={"advertising_token":"...advertising token...","refresh_token":"...refresh token...","identity_expires":1684741472161,"refresh_from":1684741425653,"refresh_expires":1684784643668,"refresh_response_key":"...response key..."}
22
+ ```
23
+
24
+ Configuration:
25
+ ```
26
+ pbjs.setConfig({
27
+ userSync: {
28
+ userIds: [{
29
+ name: 'euid',
30
+ params: {
31
+ euidCookie: 'euid_pub_cookie'
32
+ }
33
+ }]
34
+ }
35
+ });
36
+ ```
37
+
38
+ ### Client refresh euidToken example
39
+
40
+ Configuration:
41
+ ```
42
+ pbjs.setConfig({
43
+ userSync: {
44
+ userIds: [{
45
+ name: 'euid',
46
+ params: {
47
+ euidToken: {
48
+ 'advertising_token': '...advertising token...',
49
+ 'refresh_token': '...refresh token...',
50
+ // etc. - see the Sample Token below for contents of this object
51
+ }
52
+ }
53
+ }]
54
+ }
55
+ });
56
+ ```
57
+
58
+ ## Server-Only Mode
59
+
60
+ In this mode, only the advertising token is provided to the module. The module will not be able to refresh the token. The publisher is responsible for implementing some other way to refresh the token.
61
+
62
+ To configure the module to use this mode, you must **either**:
63
+ 1. Set a cookie named `__euid_advertising_token` to the advertising token, **or**
64
+ 2. Set `value` to an ID block containing the advertising token.
65
+
66
+ ### Server only cookie example
67
+
68
+ Cookie:
69
+ ```
70
+ __euid_advertising_token=...advertising token...
71
+ ```
72
+
73
+ Configuration:
74
+ ```
75
+ pbjs.setConfig({
76
+ userSync: {
77
+ userIds: [{
78
+ name: 'euid'
79
+ }]
80
+ }
81
+ });
82
+ ```
83
+
84
+ ### Server only value example
85
+
86
+ Configuration:
87
+ ```
88
+ pbjs.setConfig({
89
+ userSync: {
90
+ userIds: [{
91
+ name: 'euid'
92
+ value: {
93
+ 'euid': {
94
+ 'id': '...advertising token...'
95
+ }
96
+ }
97
+ }]
98
+ }
99
+ });
100
+ ```
101
+
102
+ ## Storage
103
+
104
+ The module stores a number of internal values. By default, all values are stored in HTML5 local storage. You can switch to cookie storage by setting `params.storage` to `cookie`. The cookie size can be significant and this is not recommended, but is provided as an option if local storage is not an option.
105
+
106
+ ## Sample token
107
+
108
+ `{`<br />&nbsp;&nbsp;`"advertising_token": "...",`<br />&nbsp;&nbsp;`"refresh_token": "...",`<br />&nbsp;&nbsp;`"identity_expires": 1633643601000,`<br />&nbsp;&nbsp;`"refresh_from": 1633643001000,`<br />&nbsp;&nbsp;`"refresh_expires": 1636322000000,`<br />&nbsp;&nbsp;`"refresh_response_key": "wR5t6HKMfJ2r4J7fEGX9Gw=="`<br />`}`
109
+
110
+ ### Notes
111
+
112
+ If you are trying to limit the size of cookies, provide the token in configuration and use the default option of local storage.
113
+
114
+ If you provide an expired identity and the module has a valid identity which was refreshed from the identity you provide, it will use the refreshed identity. The module stores the original token used for refreshing the token, and it will use the refreshed tokens as long as the original token matches the one supplied.
115
+
116
+ If a new token is supplied which does not match the original token used to generate any refreshed tokens, all stored tokens will be discarded and the new token used instead (refreshed if necessary).
117
+
118
+ You can set `params.euidApiBase` to `"https://integ.euid.eu"` during integration testing. Be aware that you must use the same environment (production or integration) here as you use for generating tokens.
119
+
120
+ ## Parameter Descriptions for the `usersync` Configuration Section
121
+
122
+ The below parameters apply only to the EUID User ID Module integration.
123
+
124
+ | Param under userSync.userIds[] | Scope | Type | Description | Example |
125
+ | --- | --- | --- | --- | --- |
126
+ | name | Required | String | ID value for the EUID module - `"euid"` | `"euid"` |
127
+ | value | Optional, Server only | Object | An object containing the value for the advertising token. | See the example above. |
128
+ | params.euidToken | Optional, Client refresh | Object | The initial EUID token. This should be `body` element of the decrypted response from a call to the `/token/generate` or `/token/refresh` endpoint. | See the sample token above. |
129
+ | params.euidCookie | Optional, Client refresh | String | The name of a cookie which holds the initial EUID token, set by the server. The cookie should contain JSON in the same format as the euidToken param. **If euidToken is supplied, this param is ignored.** | See the sample token above. |
130
+ | params.euidApiBase | Optional, Client refresh | String | Overrides the default EUID API endpoint. | `"https://prod.euid.eu"` _(default)_|
131
+ | params.storage | Optional, Client refresh | String | Specify whether to use `cookie` or `localStorage` for module-internal storage. It is recommended to not provide this and allow the module to use the default. | `localStorage` _(default)_ |
@@ -0,0 +1,61 @@
1
+ import { submodule } from '../src/hook.js';
2
+ import {generateUUID, logMessage} from '../src/utils.js';
3
+
4
+ const MODULE_NAME = 'freepassId';
5
+
6
+ export const freepassIdSubmodule = {
7
+ name: MODULE_NAME,
8
+ decode: function (value, config) {
9
+ logMessage('Decoding FreePass ID: ', value);
10
+
11
+ return { [MODULE_NAME]: value };
12
+ },
13
+
14
+ getId: function (config, consent, cachedIdObject) {
15
+ logMessage('Getting FreePass ID using config: ' + JSON.stringify(config));
16
+
17
+ const freepassData = config.params !== undefined ? (config.params.freepassData || {}) : {}
18
+ let idObject = {userId: generateUUID()};
19
+
20
+ if (freepassData.commonId !== undefined) {
21
+ idObject.commonId = config.params.freepassData.commonId;
22
+ }
23
+
24
+ if (freepassData.userIp !== undefined) {
25
+ idObject.userIp = config.params.freepassData.userIp;
26
+ }
27
+
28
+ return {id: idObject};
29
+ },
30
+
31
+ extendId: function (config, consent, cachedIdObject) {
32
+ let freepassData = config.params.freepassData;
33
+ let hasFreepassData = freepassData !== undefined;
34
+ if (!hasFreepassData) {
35
+ logMessage('No Freepass Data. CachedIdObject will not be extended: ' + JSON.stringify(cachedIdObject));
36
+ return {
37
+ id: cachedIdObject
38
+ };
39
+ }
40
+
41
+ if (freepassData.commonId === cachedIdObject.commonId && freepassData.userIp === cachedIdObject.userIp) {
42
+ logMessage('FreePass ID is already up-to-date: ' + JSON.stringify(cachedIdObject));
43
+ return {
44
+ id: cachedIdObject
45
+ };
46
+ }
47
+
48
+ logMessage('Extending FreePass ID object: ' + JSON.stringify(cachedIdObject));
49
+ logMessage('Extending FreePass ID using config: ' + JSON.stringify(config));
50
+
51
+ return {
52
+ id: {
53
+ commonId: freepassData.commonId,
54
+ userIp: freepassData.userIp,
55
+ userId: cachedIdObject.userId,
56
+ },
57
+ };
58
+ }
59
+ };
60
+
61
+ submodule('userId', freepassIdSubmodule);
@@ -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: {
@@ -0,0 +1,153 @@
1
+ import { registerBidder } from '../src/adapters/bidderFactory.js';
2
+ import { BANNER } from '../src/mediaTypes.js';
3
+ import { generateUUID } from '../src/utils.js';
4
+ import { ajax } from '../src/ajax.js';
5
+
6
+ export const BIDDER_CODE = 'hypelab';
7
+ export const ENDPOINT_URL = 'https://api.hypelab.com';
8
+
9
+ export const REQUEST_ROUTE = '/v1/prebid_requests';
10
+ export const EVENT_ROUTE = '/v1/events';
11
+ export const REPORTING_ROUTE = '';
12
+
13
+ const PREBID_VERSION = '$prebid.version$';
14
+ const PROVIDER_NAME = 'prebid';
15
+ const PROVIDER_VERSION = '0.0.1';
16
+
17
+ const url = (route) => ENDPOINT_URL + route;
18
+
19
+ export function mediaSize(data) {
20
+ if (!data || !data.creative_set) return { width: 0, height: 0 };
21
+ const media = data.creative_set.video || data.creative_set.image || {};
22
+ return { width: media.width, height: media.height };
23
+ }
24
+
25
+ function isBidRequestValid(bidderRequest) {
26
+ return (
27
+ !!bidderRequest.params?.property_slug &&
28
+ !!bidderRequest.params?.placement_slug
29
+ );
30
+ }
31
+
32
+ function buildRequests(validBidRequests, bidderRequest) {
33
+ const result = validBidRequests.map((request) => {
34
+ const uids = (request.userIdAsEids || []).reduce((a, c) => {
35
+ const ids = c.uids.map((uid) => uid.id);
36
+ return [...a, ...ids];
37
+ }, []);
38
+
39
+ const uuid = uids[0] ? uids[0] : generateTemporaryUUID();
40
+
41
+ const payload = {
42
+ property_slug: request.params.property_slug,
43
+ placement_slug: request.params.placement_slug,
44
+ provider_version: PROVIDER_VERSION,
45
+ provider_name: PROVIDER_NAME,
46
+ referrer:
47
+ bidderRequest.refererInfo?.page || typeof window != 'undefined'
48
+ ? window.location.href
49
+ : '',
50
+ sdk_version: PREBID_VERSION,
51
+ sizes: request.sizes,
52
+ wids: [],
53
+ uuid,
54
+ bidRequestsCount: request.bidRequestsCount,
55
+ bidderRequestsCount: request.bidderRequestsCount,
56
+ bidderWinsCount: request.bidderWinsCount,
57
+ wp: {
58
+ ada: typeof window != 'undefined' && !!window.cardano,
59
+ bnb: typeof window != 'undefined' && !!window.BinanceChain,
60
+ eth: typeof window != 'undefined' && !!window.ethereum,
61
+ sol: typeof window != 'undefined' && !!window.solana,
62
+ tron: typeof window != 'undefined' && !!window.tron,
63
+ },
64
+ };
65
+
66
+ return {
67
+ method: 'POST',
68
+ url: url(REQUEST_ROUTE),
69
+ options: { contentType: 'application/json', withCredentials: false },
70
+ data: payload,
71
+ bidId: request.bidId,
72
+ };
73
+ });
74
+
75
+ return result;
76
+ }
77
+
78
+ function generateTemporaryUUID() {
79
+ return 'tmp_' + generateUUID();
80
+ }
81
+
82
+ function interpretResponse(serverResponse, bidRequest) {
83
+ const { data } = serverResponse.body;
84
+
85
+ if (!data.cpm || !data.html) return [];
86
+
87
+ const size = mediaSize(data);
88
+
89
+ const result = {
90
+ requestId: bidRequest.bidId,
91
+ cpm: data.cpm,
92
+ width: size.width,
93
+ height: size.height,
94
+ creativeId: data.creative_set_slug,
95
+ currency: data.currency,
96
+ netRevenue: true,
97
+ referrer: bidRequest.data.referrer,
98
+ ttl: data.ttl,
99
+ ad: data.html,
100
+ mediaType: serverResponse.body.data.media_type,
101
+ meta: {
102
+ advertiserDomains: data.advertiserDomains || [],
103
+ },
104
+ };
105
+
106
+ return [result];
107
+ }
108
+
109
+ export function report(eventType, data, route = REPORTING_ROUTE) {
110
+ if (!route) return;
111
+
112
+ const options = {
113
+ method: 'POST',
114
+ contentType: 'application/json',
115
+ withCredentials: true,
116
+ };
117
+
118
+ const request = { type: eventType, data };
119
+ ajax(url(route), null, request, options);
120
+ }
121
+
122
+ function onTimeout(timeoutData) {
123
+ this.report('timeout', timeoutData);
124
+ }
125
+
126
+ function onBidWon(bid) {
127
+ this.report('bidWon', bid);
128
+ }
129
+
130
+ function onSetTargeting(bid) {
131
+ this.report('setTargeting', bid);
132
+ }
133
+
134
+ function onBidderError(errorData) {
135
+ this.report('bidderError', errorData);
136
+ }
137
+
138
+ export const spec = {
139
+ code: BIDDER_CODE,
140
+ supportedMediaTypes: [BANNER],
141
+ aliases: ['hype'],
142
+ isBidRequestValid,
143
+ buildRequests,
144
+ interpretResponse,
145
+ onTimeout,
146
+ onBidWon,
147
+ onSetTargeting,
148
+ onBidderError,
149
+ report,
150
+ REPORTING_ROUTE: 'a',
151
+ };
152
+
153
+ registerBidder(spec);
@@ -0,0 +1,38 @@
1
+ # Overview
2
+
3
+ ```
4
+ Module Name: HypeLab Bid Adapter
5
+ Module Type: Bidder Adapter
6
+ Maintainer: sdk@hypelab.com
7
+ ```
8
+
9
+ # Description
10
+
11
+ Prebid.JS adapter that connects to HypeLab ad network for bids.
12
+ *NOTE*: The HypeLab Adapter requires setup and approval before use. Please reach out to `partnerships@hypelab.com` for more details. To get started, replace the `property_slug` with your property_slug and the `placement_slug` with your placement slug to receive bids. The placement slug will depend on the required size and can be set via the HypeLab interface.
13
+
14
+ # Test Parameters
15
+
16
+ ## Sample Banner Ad Unit
17
+
18
+ ```js
19
+ var adUnits = [
20
+ {
21
+ code: 'banner-div',
22
+ mediaTypes: {
23
+ banner: {
24
+ sizes: [[728, 90]],
25
+ },
26
+ },
27
+ bids: [
28
+ {
29
+ bidder: 'hypelab',
30
+ params: {
31
+ property_slug: 'prebid',
32
+ placement_slug: 'test_placement'
33
+ }
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ ```
@@ -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
  *