mixpanel-browser 2.75.0 → 2.77.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 +14 -0
- package/.github/dependabot.yml +8 -0
- package/.github/workflows/integration-tests.yml +4 -4
- package/.github/workflows/unit-tests.yml +4 -4
- package/CHANGELOG.md +14 -0
- package/build.sh +10 -8
- package/dist/async-modules/mixpanel-recorder-DLKbUIEE.js +23669 -0
- package/dist/async-modules/mixpanel-recorder-wIWnMDLA.min.js +2 -0
- package/dist/async-modules/mixpanel-recorder-wIWnMDLA.min.js.map +1 -0
- package/dist/async-modules/mixpanel-targeting-CTcftSJC.min.js +2 -0
- package/dist/async-modules/mixpanel-targeting-CTcftSJC.min.js.map +1 -0
- package/dist/async-modules/mixpanel-targeting-CmVvUyFM.js +2520 -0
- package/dist/mixpanel-core.cjs.d.ts +70 -1
- package/dist/mixpanel-core.cjs.js +724 -426
- package/dist/mixpanel-recorder.js +791 -41
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-targeting.js +6 -62
- package/dist/mixpanel-targeting.min.js +1 -1
- package/dist/mixpanel-targeting.min.js.map +1 -1
- package/dist/mixpanel-with-async-modules.cjs.d.ts +70 -1
- package/dist/mixpanel-with-async-modules.cjs.js +724 -426
- package/dist/mixpanel-with-async-recorder.cjs.d.ts +70 -1
- package/dist/mixpanel-with-async-recorder.cjs.js +724 -426
- package/dist/mixpanel-with-recorder.d.ts +70 -1
- package/dist/mixpanel-with-recorder.js +1471 -450
- package/dist/mixpanel-with-recorder.min.d.ts +70 -1
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.d.ts +70 -1
- package/dist/mixpanel.amd.js +1473 -504
- package/dist/mixpanel.cjs.d.ts +70 -1
- package/dist/mixpanel.cjs.js +1473 -504
- package/dist/mixpanel.globals.js +724 -426
- package/dist/mixpanel.min.js +189 -182
- package/dist/mixpanel.module.d.ts +70 -1
- package/dist/mixpanel.module.js +1473 -504
- package/dist/mixpanel.umd.d.ts +70 -1
- package/dist/mixpanel.umd.js +1473 -504
- package/dist/rrweb-bundled.js +61 -9
- package/dist/rrweb-compiled.js +56 -9
- package/logo.svg +5 -0
- package/package.json +6 -4
- package/rollup.config.mjs +163 -46
- package/src/autocapture/index.js +10 -27
- package/src/config.js +9 -3
- package/src/flags/index.js +1 -2
- package/src/index.d.ts +70 -1
- package/src/mixpanel-core.js +77 -112
- package/src/recorder/index.js +1 -1
- package/src/recorder/recorder.js +5 -1
- package/src/recorder/rrweb-network-plugin.js +649 -0
- package/src/recorder/session-recording.js +36 -12
- package/src/recorder/utils.js +27 -1
- package/src/recorder-manager.js +324 -0
- package/src/request-batcher.js +1 -1
- package/src/targeting/event-matcher.js +2 -57
- package/src/targeting/index.js +1 -1
- package/src/targeting/loader.js +1 -1
- package/src/utils.js +13 -1
- package/testServer.js +69 -1
- package/src/globals.js +0 -14
- /package/src/loaders/{loader-module-with-async-recorder.d.ts → loader-module-with-async-modules.d.ts} +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;
|
|
@@ -237,10 +252,12 @@ export interface Config {
|
|
|
237
252
|
record_mask_all_inputs: boolean;
|
|
238
253
|
record_min_ms: number;
|
|
239
254
|
record_max_ms: number;
|
|
240
|
-
|
|
255
|
+
record_allowed_iframe_origins: string[];
|
|
241
256
|
record_canvas: boolean;
|
|
257
|
+
recording_event_triggers: RecordingEventTriggers;
|
|
242
258
|
record_heatmap_data: boolean;
|
|
243
259
|
remote_settings_mode: RemoteSettingType;
|
|
260
|
+
record_sessions_percent: number;
|
|
244
261
|
hooks: {
|
|
245
262
|
before_identify?: (new_distinct_id: string) => string | null;
|
|
246
263
|
before_register?: (
|
|
@@ -518,5 +535,57 @@ export function get_session_recording_properties():
|
|
|
518
535
|
| { $mp_replay_id?: string }
|
|
519
536
|
| {};
|
|
520
537
|
|
|
538
|
+
// Network Recording Plugin Types
|
|
539
|
+
export type InitiatorType =
|
|
540
|
+
| 'audio'
|
|
541
|
+
| 'beacon'
|
|
542
|
+
| 'body'
|
|
543
|
+
| 'css'
|
|
544
|
+
| 'early-hint'
|
|
545
|
+
| 'embed'
|
|
546
|
+
| 'fetch'
|
|
547
|
+
| 'frame'
|
|
548
|
+
| 'iframe'
|
|
549
|
+
| 'icon'
|
|
550
|
+
| 'image'
|
|
551
|
+
| 'img'
|
|
552
|
+
| 'input'
|
|
553
|
+
| 'link'
|
|
554
|
+
| 'navigation'
|
|
555
|
+
| 'object'
|
|
556
|
+
| 'ping'
|
|
557
|
+
| 'script'
|
|
558
|
+
| 'track'
|
|
559
|
+
| 'video'
|
|
560
|
+
| 'xmlhttprequest';
|
|
561
|
+
|
|
562
|
+
export interface NetworkRequest {
|
|
563
|
+
url: string;
|
|
564
|
+
method?: string;
|
|
565
|
+
initiatorType: InitiatorType;
|
|
566
|
+
status?: number;
|
|
567
|
+
startTime: number;
|
|
568
|
+
endTime: number;
|
|
569
|
+
timeOrigin: number;
|
|
570
|
+
requestHeaders?: Record<string, string>;
|
|
571
|
+
requestBody?: string;
|
|
572
|
+
responseHeaders?: Record<string, string>;
|
|
573
|
+
responseBody?: string;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface NetworkRecordOptions {
|
|
577
|
+
initiatorTypes?: InitiatorType[];
|
|
578
|
+
ignoreRequestUrls?: string[];
|
|
579
|
+
ignoreRequestFn?: (data: NetworkRequest) => boolean;
|
|
580
|
+
recordHeaders?: { request: string[]; response: string[] };
|
|
581
|
+
recordBodyUrls?: { request: string[]; response: string[] };
|
|
582
|
+
recordInitialRequests?: boolean;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface NetworkData {
|
|
586
|
+
requests: NetworkRequest[];
|
|
587
|
+
isInitial?: boolean;
|
|
588
|
+
}
|
|
589
|
+
|
|
521
590
|
declare const mixpanel: OverridedMixpanel;
|
|
522
591
|
export default mixpanel;
|