@formo/analytics 1.30.1 → 1.32.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.
- package/dist/cjs/src/event/EventFactory.d.ts +29 -0
- package/dist/cjs/src/event/EventFactory.js +134 -17
- package/dist/cjs/src/event/constants.d.ts +13 -1
- package/dist/cjs/src/event/constants.js +18 -1
- package/dist/cjs/src/types/base.d.ts +14 -0
- package/dist/esm/src/event/EventFactory.d.ts +29 -0
- package/dist/esm/src/event/EventFactory.js +135 -18
- package/dist/esm/src/event/constants.d.ts +13 -1
- package/dist/esm/src/event/constants.js +17 -1
- package/dist/esm/src/types/base.d.ts +14 -0
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,18 @@ declare const VERSION = "0";
|
|
|
6
6
|
* in src/types/events.ts derived from this array.
|
|
7
7
|
*/
|
|
8
8
|
declare const CLICK_ID_PARAMS: readonly ["gclid", "gad_source", "fbclid", "msclkid", "twclid", "li_fat_id", "rdt_cid", "ttclid"];
|
|
9
|
+
/**
|
|
10
|
+
* Query parameters that are ALWAYS stripped from forwarded and stored URLs,
|
|
11
|
+
* regardless of consumer configuration, because they carry high-sensitivity
|
|
12
|
+
* secrets that must never reach Formo:
|
|
13
|
+
* - privy_oauth_code: Privy OAuth authorization code
|
|
14
|
+
* - privy_oauth_state: Privy OAuth CSRF state token
|
|
15
|
+
* - privy_oauth_provider: Privy OAuth provider identifier
|
|
16
|
+
*
|
|
17
|
+
* Consumers can extend the denylist via `tracking.excludeQueryParams` but
|
|
18
|
+
* cannot remove these built-ins. Matched case-insensitively.
|
|
19
|
+
*/
|
|
20
|
+
declare const DEFAULT_EXCLUDED_QUERY_PARAMS: readonly ["privy_oauth_code", "privy_oauth_state", "privy_oauth_provider"];
|
|
9
21
|
/**
|
|
10
22
|
* Fields that should be excluded from page event properties parsing
|
|
11
23
|
* These are either:
|
|
@@ -13,5 +25,5 @@ declare const CLICK_ID_PARAMS: readonly ["gclid", "gad_source", "fbclid", "msclk
|
|
|
13
25
|
* - Semantic event properties that should not be overridden by URL params
|
|
14
26
|
*/
|
|
15
27
|
declare const PAGE_PROPERTIES_EXCLUDED_FIELDS: Set<string>;
|
|
16
|
-
export { CHANNEL, VERSION, CLICK_ID_PARAMS, PAGE_PROPERTIES_EXCLUDED_FIELDS };
|
|
28
|
+
export { CHANNEL, VERSION, CLICK_ID_PARAMS, DEFAULT_EXCLUDED_QUERY_PARAMS, PAGE_PROPERTIES_EXCLUDED_FIELDS, };
|
|
17
29
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -24,6 +24,22 @@ var CLICK_ID_PARAMS = [
|
|
|
24
24
|
"rdt_cid", // Reddit Ads
|
|
25
25
|
"ttclid", // TikTok Ads
|
|
26
26
|
];
|
|
27
|
+
/**
|
|
28
|
+
* Query parameters that are ALWAYS stripped from forwarded and stored URLs,
|
|
29
|
+
* regardless of consumer configuration, because they carry high-sensitivity
|
|
30
|
+
* secrets that must never reach Formo:
|
|
31
|
+
* - privy_oauth_code: Privy OAuth authorization code
|
|
32
|
+
* - privy_oauth_state: Privy OAuth CSRF state token
|
|
33
|
+
* - privy_oauth_provider: Privy OAuth provider identifier
|
|
34
|
+
*
|
|
35
|
+
* Consumers can extend the denylist via `tracking.excludeQueryParams` but
|
|
36
|
+
* cannot remove these built-ins. Matched case-insensitively.
|
|
37
|
+
*/
|
|
38
|
+
var DEFAULT_EXCLUDED_QUERY_PARAMS = [
|
|
39
|
+
"privy_oauth_code",
|
|
40
|
+
"privy_oauth_state",
|
|
41
|
+
"privy_oauth_provider",
|
|
42
|
+
];
|
|
27
43
|
/**
|
|
28
44
|
* Fields that should be excluded from page event properties parsing
|
|
29
45
|
* These are either:
|
|
@@ -50,5 +66,5 @@ var PAGE_PROPERTIES_EXCLUDED_FIELDS = new Set(__spreadArray(__spreadArray([
|
|
|
50
66
|
'hash',
|
|
51
67
|
'query',
|
|
52
68
|
], false));
|
|
53
|
-
export { CHANNEL, VERSION, CLICK_ID_PARAMS, PAGE_PROPERTIES_EXCLUDED_FIELDS };
|
|
69
|
+
export { CHANNEL, VERSION, CLICK_ID_PARAMS, DEFAULT_EXCLUDED_QUERY_PARAMS, PAGE_PROPERTIES_EXCLUDED_FIELDS, };
|
|
54
70
|
//# sourceMappingURL=constants.js.map
|
|
@@ -72,6 +72,20 @@ export interface TrackingOptions {
|
|
|
72
72
|
excludeHosts?: string[];
|
|
73
73
|
excludePaths?: string[];
|
|
74
74
|
excludeChains?: ChainID[];
|
|
75
|
+
/**
|
|
76
|
+
* Additional query parameter names to strip from forwarded and stored URLs,
|
|
77
|
+
* on top of a built-in always-on denylist (currently `privy_oauth_code`,
|
|
78
|
+
* `privy_oauth_state`, and `privy_oauth_provider`) that cannot be disabled.
|
|
79
|
+
* Matched case-insensitively. Excluded params are stripped from the captured
|
|
80
|
+
* page URL, query string, per-parameter page properties, and referrer before
|
|
81
|
+
* any event is sent. The URL hash/fragment is intentionally left untouched.
|
|
82
|
+
*
|
|
83
|
+
* Mirrors Mixpanel's `property_blacklist` and PostHog's `property_denylist`,
|
|
84
|
+
* scoped here to URL query parameters.
|
|
85
|
+
*
|
|
86
|
+
* @example ["token", "access_token", "email", "signature"]
|
|
87
|
+
*/
|
|
88
|
+
excludeQueryParams?: string[];
|
|
75
89
|
}
|
|
76
90
|
/**
|
|
77
91
|
* Configuration options for controlling wallet event autocapture
|