@molecule/app-analytics-mixpanel 1.0.3 → 1.0.5
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/README.md +7 -2
- package/dist/provider.d.ts +5 -0
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +117 -0
- package/dist/provider.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-
|
|
6
|
+
Generated: 2026-11-01T06:11:47.514Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-analytics-mixpanel
|
|
@@ -184,6 +184,11 @@ VITE_MIXPANEL_TOKEN and returns a no-op provider, so bonding the lazy
|
|
|
184
184
|
`provider` export without configuration degrades gracefully instead of
|
|
185
185
|
becoming a silent event black hole.
|
|
186
186
|
|
|
187
|
+
SDK-added location/referrer properties are scrubbed at `before_send_events`,
|
|
188
|
+
`before_send_people` and `before_send_groups`. Skip-hooks identify/alias tuples are captured
|
|
189
|
+
at `on_track`; ordinary events walk only at their final event hook. Hooks are composed AFTER
|
|
190
|
+
init so a pre-initialized singleton keeps its existing hooks and the scrubber always runs last.
|
|
191
|
+
|
|
187
192
|
```typescript
|
|
188
193
|
function createProvider(options?: MixpanelOptions): AnalyticsProvider
|
|
189
194
|
```
|
|
@@ -232,7 +237,7 @@ if (token) {
|
|
|
232
237
|
|
|
233
238
|
Peer dependencies:
|
|
234
239
|
|
|
235
|
-
- `@molecule/app-analytics` ^1.
|
|
240
|
+
- `@molecule/app-analytics` ^1.1.1
|
|
236
241
|
|
|
237
242
|
### Environment Variables
|
|
238
243
|
|
package/dist/provider.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ import type { MixpanelOptions } from './types.js';
|
|
|
20
20
|
* `provider` export without configuration degrades gracefully instead of
|
|
21
21
|
* becoming a silent event black hole.
|
|
22
22
|
*
|
|
23
|
+
* SDK-added location/referrer properties are scrubbed at `before_send_events`,
|
|
24
|
+
* `before_send_people` and `before_send_groups`. Skip-hooks identify/alias tuples are captured
|
|
25
|
+
* at `on_track`; ordinary events walk only at their final event hook. Hooks are composed AFTER
|
|
26
|
+
* init so a pre-initialized singleton keeps its existing hooks and the scrubber always runs last.
|
|
27
|
+
*
|
|
23
28
|
* @param options - Mixpanel configuration including `token` and optional `debug` flag.
|
|
24
29
|
* @returns An `AnalyticsProvider` backed by the Mixpanel browser SDK.
|
|
25
30
|
*/
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAGV,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAGV,iBAAiB,EAElB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA6HjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,eAAe,KAAG,iBAgF1D,CAAA;AAID,8DAA8D;AAC9D,eAAO,MAAM,QAAQ,EAAE,iBAUrB,CAAA"}
|
package/dist/provider.js
CHANGED
|
@@ -6,6 +6,106 @@
|
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
8
8
|
import mixpanel from 'mixpanel-browser';
|
|
9
|
+
import { snapshotAnalyticsSdkUrls } from '@molecule/app-analytics';
|
|
10
|
+
/** One inert final capture shared by event, person and group transport hooks. */
|
|
11
|
+
const scrubSdkPayload = (payload) => snapshotAnalyticsSdkUrls(payload);
|
|
12
|
+
/** The SDK accepts ordered hook arrays at runtime; append without duplicating on HMR/re-bonding. */
|
|
13
|
+
const appendHook = (configured, hook) => {
|
|
14
|
+
const previous = Array.isArray(configured) ? configured : configured ? [configured] : [];
|
|
15
|
+
return [...previous.filter((candidate) => candidate !== hook), hook];
|
|
16
|
+
};
|
|
17
|
+
const TRACK_HOOK_HISTORY = Symbol('molecule.mixpanelTrackHookHistory');
|
|
18
|
+
const REPLAY_FETCH_CAPTURE = Symbol.for('@molecule/app-analytics-mixpanel/replay-fetch-capture');
|
|
19
|
+
/** Identify only this Mixpanel instance's replay endpoint, never an application's /record route. */
|
|
20
|
+
const isReplayRequest = (input) => {
|
|
21
|
+
const raw = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;
|
|
22
|
+
try {
|
|
23
|
+
const url = new URL(raw);
|
|
24
|
+
const instance = mixpanel;
|
|
25
|
+
const host = instance.get_api_host?.('record') ?? mixpanel.get_config('api_host');
|
|
26
|
+
return url.origin === new URL(host).origin && /\/record\/?$/.test(url.pathname);
|
|
27
|
+
}
|
|
28
|
+
catch (_error) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/** Capture each decoded metadata value while retaining SDK identifiers and safe URL components. */
|
|
33
|
+
const scrubReplayUrl = (input) => {
|
|
34
|
+
const raw = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;
|
|
35
|
+
const url = new URL(raw);
|
|
36
|
+
const entries = [];
|
|
37
|
+
url.searchParams.forEach((value, name) => entries.push([name, value]));
|
|
38
|
+
for (const [name, value] of entries) {
|
|
39
|
+
const captured = snapshotAnalyticsSdkUrls(value);
|
|
40
|
+
if (captured !== value)
|
|
41
|
+
url.searchParams.set(name, captured);
|
|
42
|
+
}
|
|
43
|
+
return url.toString();
|
|
44
|
+
};
|
|
45
|
+
/** Scrub the recorder's JSON before fetch, including its optional gzip representation. */
|
|
46
|
+
const scrubReplayBody = async (body, gzip) => {
|
|
47
|
+
if (typeof body === 'string')
|
|
48
|
+
return snapshotAnalyticsSdkUrls(body);
|
|
49
|
+
if (!gzip || typeof Blob === 'undefined' || !(body instanceof Blob))
|
|
50
|
+
return body;
|
|
51
|
+
if (typeof DecompressionStream === 'undefined' || typeof CompressionStream === 'undefined') {
|
|
52
|
+
throw new Error('Mixpanel replay transport capture is unavailable');
|
|
53
|
+
}
|
|
54
|
+
const text = await new Response(body.stream().pipeThrough(new DecompressionStream('gzip'))).text();
|
|
55
|
+
const captured = snapshotAnalyticsSdkUrls(text);
|
|
56
|
+
if (captured === text)
|
|
57
|
+
return body;
|
|
58
|
+
const compressed = new Blob([captured]).stream().pipeThrough(new CompressionStream('gzip'));
|
|
59
|
+
return new Response(compressed).blob();
|
|
60
|
+
};
|
|
61
|
+
/** Session replay bypasses Mixpanel hooks; make fetch its final data-only capture point. */
|
|
62
|
+
const installReplayTransportCapture = () => {
|
|
63
|
+
if (typeof window === 'undefined' || typeof window.fetch !== 'function')
|
|
64
|
+
return;
|
|
65
|
+
const original = window.fetch;
|
|
66
|
+
if (original[REPLAY_FETCH_CAPTURE])
|
|
67
|
+
return;
|
|
68
|
+
const captured = function (input, init) {
|
|
69
|
+
if (!isReplayRequest(input))
|
|
70
|
+
return Reflect.apply(original, this, [input, init]);
|
|
71
|
+
const gzip = new URL(typeof input === 'string' ? input : input instanceof URL ? input.href : input.url).searchParams.get('format') === 'gzip';
|
|
72
|
+
return scrubReplayBody(init?.body, gzip).then((body) => Reflect.apply(original, this, [scrubReplayUrl(input), { ...init, body }]));
|
|
73
|
+
};
|
|
74
|
+
Object.defineProperty(captured, REPLAY_FETCH_CAPTURE, { value: true });
|
|
75
|
+
window.fetch = captured;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Preserve the original event name to recognize skip-hooks identify/alias events after app hooks.
|
|
79
|
+
* Ordinary events return their original property object and walk only in before_send_events.
|
|
80
|
+
*/
|
|
81
|
+
const composeTrackHook = (configured) => {
|
|
82
|
+
const configuredHooks = Array.isArray(configured) ? configured : configured ? [configured] : [];
|
|
83
|
+
const previous = configuredHooks.flatMap((candidate) => candidate[TRACK_HOOK_HISTORY] ?? [candidate]);
|
|
84
|
+
const hook = (eventName, properties) => {
|
|
85
|
+
let name = eventName;
|
|
86
|
+
let currentProperties = properties;
|
|
87
|
+
for (const previousHook of previous) {
|
|
88
|
+
const result = previousHook(name, currentProperties);
|
|
89
|
+
if (result === null)
|
|
90
|
+
return null;
|
|
91
|
+
if (typeof result === 'string')
|
|
92
|
+
name = result;
|
|
93
|
+
else if (Array.isArray(result)) {
|
|
94
|
+
if (typeof result[0] === 'string')
|
|
95
|
+
name = result[0];
|
|
96
|
+
if (result.length > 1)
|
|
97
|
+
currentProperties = result[1];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (eventName !== '$identify' && eventName !== '$create_alias') {
|
|
101
|
+
return [name, currentProperties];
|
|
102
|
+
}
|
|
103
|
+
const captured = scrubSdkPayload({ event: name, properties: currentProperties });
|
|
104
|
+
return [captured.event, captured.properties];
|
|
105
|
+
};
|
|
106
|
+
Object.defineProperty(hook, TRACK_HOOK_HISTORY, { value: previous });
|
|
107
|
+
return hook;
|
|
108
|
+
};
|
|
9
109
|
/**
|
|
10
110
|
* Creates a Mixpanel analytics provider using `mixpanel-browser`. Initializes the SDK
|
|
11
111
|
* with the provided token and returns an `AnalyticsProvider` that maps molecule events to
|
|
@@ -19,6 +119,11 @@ import mixpanel from 'mixpanel-browser';
|
|
|
19
119
|
* `provider` export without configuration degrades gracefully instead of
|
|
20
120
|
* becoming a silent event black hole.
|
|
21
121
|
*
|
|
122
|
+
* SDK-added location/referrer properties are scrubbed at `before_send_events`,
|
|
123
|
+
* `before_send_people` and `before_send_groups`. Skip-hooks identify/alias tuples are captured
|
|
124
|
+
* at `on_track`; ordinary events walk only at their final event hook. Hooks are composed AFTER
|
|
125
|
+
* init so a pre-initialized singleton keeps its existing hooks and the scrubber always runs last.
|
|
126
|
+
*
|
|
22
127
|
* @param options - Mixpanel configuration including `token` and optional `debug` flag.
|
|
23
128
|
* @returns An `AnalyticsProvider` backed by the Mixpanel browser SDK.
|
|
24
129
|
*/
|
|
@@ -45,6 +150,18 @@ export const createProvider = (options) => {
|
|
|
45
150
|
debug: options?.debug ?? false,
|
|
46
151
|
track_pageview: false, // We handle page views manually via auto-tracking
|
|
47
152
|
});
|
|
153
|
+
const configuredHooks = mixpanel.get_config('hooks');
|
|
154
|
+
const hooks = {
|
|
155
|
+
...configuredHooks,
|
|
156
|
+
before_send_events: appendHook(configuredHooks?.before_send_events, scrubSdkPayload),
|
|
157
|
+
before_send_people: appendHook(configuredHooks?.before_send_people, scrubSdkPayload),
|
|
158
|
+
before_send_groups: appendHook(configuredHooks?.before_send_groups, scrubSdkPayload),
|
|
159
|
+
on_track: composeTrackHook(configuredHooks?.on_track),
|
|
160
|
+
};
|
|
161
|
+
// mixpanel-browser 2.84.0 accepts hook arrays and before_send_people at runtime,
|
|
162
|
+
// although its published Config declaration omits both.
|
|
163
|
+
mixpanel.set_config({ hooks });
|
|
164
|
+
installReplayTransportCapture();
|
|
48
165
|
return {
|
|
49
166
|
async identify(user) {
|
|
50
167
|
mixpanel.identify(user.userId);
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,QAAQ,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,QAAyB,MAAM,kBAAkB,CAAA;AAQxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAIlE,iFAAiF;AACjF,MAAM,eAAe,GAAG,CAAI,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AAI,EAAE,KAAK,CAAC,CAAA;IAC5C,CAAC;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-analytics-mixpanel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Mixpanel analytics provider for molecule.dev frontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"mixpanel-browser": "2.84.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@molecule/app-analytics": "^1.
|
|
33
|
+
"@molecule/app-analytics": "^1.1.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@molecule/app-analytics": "1.
|
|
36
|
+
"@molecule/app-analytics": "1.1.2",
|
|
37
37
|
"@types/node": "26.6.5",
|
|
38
38
|
"typescript": "6.0.3",
|
|
39
39
|
"vitest": "4.1.12"
|