mixpanel-browser 2.74.0 → 2.76.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/.claude/settings.local.json +3 -1
- package/.github/workflows/integration-tests.yml +2 -2
- package/.github/workflows/unit-tests.yml +3 -3
- package/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/build.sh +10 -8
- package/dist/async-modules/mixpanel-recorder-bIS4LMGd.js +23595 -0
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js +2 -0
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js.map +1 -0
- package/dist/async-modules/mixpanel-targeting-BcAPS-Mz.js +2520 -0
- package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js +2 -0
- package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js.map +1 -0
- package/dist/mixpanel-core.cjs.d.ts +68 -0
- package/dist/mixpanel-core.cjs.js +802 -337
- package/dist/mixpanel-recorder.js +828 -40
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-targeting.js +2520 -0
- package/dist/mixpanel-targeting.min.js +2 -0
- package/dist/mixpanel-targeting.min.js.map +1 -0
- package/dist/mixpanel-with-async-modules.cjs.d.ts +590 -0
- package/dist/mixpanel-with-async-modules.cjs.js +9867 -0
- package/dist/mixpanel-with-async-recorder.cjs.d.ts +68 -0
- package/dist/mixpanel-with-async-recorder.cjs.js +802 -337
- package/dist/mixpanel-with-recorder.d.ts +68 -0
- package/dist/mixpanel-with-recorder.js +1591 -343
- package/dist/mixpanel-with-recorder.min.d.ts +68 -0
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.d.ts +68 -0
- package/dist/mixpanel.amd.js +2124 -345
- package/dist/mixpanel.cjs.d.ts +68 -0
- package/dist/mixpanel.cjs.js +2124 -345
- package/dist/mixpanel.globals.js +802 -337
- package/dist/mixpanel.min.js +185 -175
- package/dist/mixpanel.module.d.ts +68 -0
- package/dist/mixpanel.module.js +2124 -345
- package/dist/mixpanel.umd.d.ts +68 -0
- package/dist/mixpanel.umd.js +2124 -345
- package/dist/rrweb-bundled.js +119 -5
- package/dist/rrweb-compiled.js +116 -5
- package/logo.svg +5 -0
- package/package.json +5 -3
- package/rollup.config.mjs +189 -40
- package/src/autocapture/index.js +10 -27
- package/src/config.js +9 -3
- package/src/flags/index.js +269 -9
- package/src/index.d.ts +68 -0
- package/src/loaders/loader-module.js +1 -0
- package/src/mixpanel-core.js +83 -109
- package/src/recorder/index.js +2 -1
- package/src/recorder/recorder.js +5 -1
- package/src/recorder/rrweb-network-plugin.js +649 -0
- package/src/recorder/session-recording.js +31 -11
- package/src/recorder-manager.js +216 -0
- package/src/request-batcher.js +1 -1
- package/src/targeting/event-matcher.js +42 -0
- package/src/targeting/index.js +11 -0
- package/src/targeting/loader.js +36 -0
- package/src/utils.js +14 -9
- package/testServer.js +55 -0
- /package/src/loaders/{loader-module-with-async-recorder.js → loader-module-with-async-modules.js} +0 -0
package/dist/mixpanel.cjs.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { RulesLogic } from 'json-logic-js';
|
|
2
|
+
|
|
1
3
|
export type Persistence = "cookie" | "localStorage";
|
|
2
4
|
|
|
3
5
|
export type ApiPayloadFormat = "base64" | "json";
|
|
@@ -8,6 +10,16 @@ export type Query = string | Element | Element[];
|
|
|
8
10
|
|
|
9
11
|
export type RemoteSettingType = "disabled" | "fallback" | "strict";
|
|
10
12
|
|
|
13
|
+
|
|
14
|
+
export interface EventTriggerProps {
|
|
15
|
+
percentage: number;
|
|
16
|
+
property_filters?: RulesLogic;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RecordingEventTriggers {
|
|
20
|
+
[eventName: string]: EventTriggerProps;
|
|
21
|
+
}
|
|
22
|
+
|
|
11
23
|
export interface Dict {
|
|
12
24
|
[key: string]: any;
|
|
13
25
|
}
|
|
@@ -225,6 +237,9 @@ export interface Config {
|
|
|
225
237
|
recorder_src: string;
|
|
226
238
|
record_block_class: string | RegExp;
|
|
227
239
|
record_block_selector: string;
|
|
240
|
+
record_console: boolean;
|
|
241
|
+
record_network: boolean;
|
|
242
|
+
record_network_options: NetworkRecordOptions;
|
|
228
243
|
record_collect_fonts: boolean;
|
|
229
244
|
record_idle_timeout_ms: number;
|
|
230
245
|
record_inline_images: boolean;
|
|
@@ -239,6 +254,7 @@ export interface Config {
|
|
|
239
254
|
record_max_ms: number;
|
|
240
255
|
record_sessions_percent: number;
|
|
241
256
|
record_canvas: boolean;
|
|
257
|
+
recording_event_triggers: RecordingEventTriggers;
|
|
242
258
|
record_heatmap_data: boolean;
|
|
243
259
|
remote_settings_mode: RemoteSettingType;
|
|
244
260
|
hooks: {
|
|
@@ -518,5 +534,57 @@ export function get_session_recording_properties():
|
|
|
518
534
|
| { $mp_replay_id?: string }
|
|
519
535
|
| {};
|
|
520
536
|
|
|
537
|
+
// Network Recording Plugin Types
|
|
538
|
+
export type InitiatorType =
|
|
539
|
+
| 'audio'
|
|
540
|
+
| 'beacon'
|
|
541
|
+
| 'body'
|
|
542
|
+
| 'css'
|
|
543
|
+
| 'early-hint'
|
|
544
|
+
| 'embed'
|
|
545
|
+
| 'fetch'
|
|
546
|
+
| 'frame'
|
|
547
|
+
| 'iframe'
|
|
548
|
+
| 'icon'
|
|
549
|
+
| 'image'
|
|
550
|
+
| 'img'
|
|
551
|
+
| 'input'
|
|
552
|
+
| 'link'
|
|
553
|
+
| 'navigation'
|
|
554
|
+
| 'object'
|
|
555
|
+
| 'ping'
|
|
556
|
+
| 'script'
|
|
557
|
+
| 'track'
|
|
558
|
+
| 'video'
|
|
559
|
+
| 'xmlhttprequest';
|
|
560
|
+
|
|
561
|
+
export interface NetworkRequest {
|
|
562
|
+
url: string;
|
|
563
|
+
method?: string;
|
|
564
|
+
initiatorType: InitiatorType;
|
|
565
|
+
status?: number;
|
|
566
|
+
startTime: number;
|
|
567
|
+
endTime: number;
|
|
568
|
+
timeOrigin: number;
|
|
569
|
+
requestHeaders?: Record<string, string>;
|
|
570
|
+
requestBody?: string;
|
|
571
|
+
responseHeaders?: Record<string, string>;
|
|
572
|
+
responseBody?: string;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export interface NetworkRecordOptions {
|
|
576
|
+
initiatorTypes?: InitiatorType[];
|
|
577
|
+
ignoreRequestUrls?: string[];
|
|
578
|
+
ignoreRequestFn?: (data: NetworkRequest) => boolean;
|
|
579
|
+
recordHeaders?: { request: string[]; response: string[] };
|
|
580
|
+
recordBodyUrls?: { request: string[]; response: string[] };
|
|
581
|
+
recordInitialRequests?: boolean;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface NetworkData {
|
|
585
|
+
requests: NetworkRequest[];
|
|
586
|
+
isInitial?: boolean;
|
|
587
|
+
}
|
|
588
|
+
|
|
521
589
|
declare const mixpanel: OverridedMixpanel;
|
|
522
590
|
export default mixpanel;
|