userlens-analytics-sdk 0.1.39 → 0.1.41
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/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +13 -5
- package/dist/userlens.cjs.js +2 -2
- package/dist/userlens.cjs.js.map +1 -1
- package/dist/userlens.esm.js +2 -2
- package/dist/userlens.esm.js.map +1 -1
- package/dist/userlens.umd.js +2 -2
- package/dist/userlens.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/EventCollector/index.ts +107 -57
- package/src/index.ts +2 -1
- package/src/types/index.ts +14 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as SessionRecorder } from "./SessionRecorder";
|
|
2
2
|
export { default as EventCollector } from "./EventCollector";
|
|
3
3
|
export { default as UserlensProvider, useUserlens } from "./react";
|
|
4
|
-
export type { SessionRecorderConfig, SessionRecordingOptions,
|
|
4
|
+
export type { SessionRecorderConfig, SessionRecordingOptions, SnapshotNode, SnapshotOptions, RawEvent, PageViewEvent, PushedEvent, MaskingOption, } from "./types";
|
|
@@ -26,21 +26,29 @@ export interface UserContext {
|
|
|
26
26
|
$ul_device_type: "Mobile" | "Desktop";
|
|
27
27
|
$ul_timezone: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
text: string | null;
|
|
29
|
+
export type SnapshotNode = {
|
|
31
30
|
tag_name: string;
|
|
32
31
|
attr_class: string[] | null;
|
|
33
|
-
href: string | null;
|
|
34
32
|
attr_id: string | null;
|
|
33
|
+
href: string | null;
|
|
35
34
|
nth_child: number;
|
|
36
35
|
nth_of_type: number;
|
|
37
36
|
attributes: Record<string, string>;
|
|
38
|
-
|
|
37
|
+
text: string | null;
|
|
38
|
+
is_target?: true;
|
|
39
|
+
leads_to_target?: true;
|
|
40
|
+
children?: SnapshotNode[];
|
|
41
|
+
};
|
|
42
|
+
export type SnapshotOptions = {
|
|
43
|
+
isTarget?: boolean;
|
|
44
|
+
includeChildren?: boolean;
|
|
45
|
+
leadsToTarget?: boolean;
|
|
46
|
+
};
|
|
39
47
|
export interface RawEvent {
|
|
40
48
|
userId?: string;
|
|
41
49
|
event: string;
|
|
42
50
|
is_raw: true;
|
|
43
|
-
snapshot:
|
|
51
|
+
snapshot: SnapshotNode | null;
|
|
44
52
|
current_url: string;
|
|
45
53
|
properties: UserContext;
|
|
46
54
|
}
|