@loamly/tracker 2.0.2 → 2.1.1
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 +27 -3
- package/dist/index.cjs +395 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.mjs +395 -145
- package/dist/index.mjs.map +1 -1
- package/dist/loamly.iife.global.js +412 -148
- package/dist/loamly.iife.global.js.map +1 -1
- package/dist/loamly.iife.min.global.js +1 -1
- package/dist/loamly.iife.min.global.js.map +1 -1
- package/package.json +1 -1
- package/src/behavioral/form-tracker.ts +5 -0
- package/src/browser.ts +25 -6
- package/src/config.ts +1 -1
- package/src/core.ts +400 -136
- package/src/index.ts +1 -1
- package/src/infrastructure/event-queue.ts +58 -32
- package/src/infrastructure/ping.ts +19 -3
- package/src/types.ts +28 -0
package/dist/index.d.mts
CHANGED
|
@@ -67,6 +67,8 @@ declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
|
67
67
|
interface LoamlyConfig {
|
|
68
68
|
/** Your Loamly API key (found in dashboard) */
|
|
69
69
|
apiKey?: string;
|
|
70
|
+
/** Workspace ID (required when using public tracker key) */
|
|
71
|
+
workspaceId?: string;
|
|
70
72
|
/** Custom API host (default: https://app.loamly.ai) */
|
|
71
73
|
apiHost?: string;
|
|
72
74
|
/** Enable debug mode for console logging */
|
|
@@ -77,6 +79,30 @@ interface LoamlyConfig {
|
|
|
77
79
|
disableBehavioral?: boolean;
|
|
78
80
|
/** Custom session timeout in milliseconds (default: 30 minutes) */
|
|
79
81
|
sessionTimeout?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Feature flags for lightweight mode
|
|
84
|
+
* Set to false to reduce initialization overhead
|
|
85
|
+
*/
|
|
86
|
+
features?: {
|
|
87
|
+
/** Scroll depth tracking (default: true) */
|
|
88
|
+
scroll?: boolean;
|
|
89
|
+
/** Time on page tracking (default: true) */
|
|
90
|
+
time?: boolean;
|
|
91
|
+
/** Form interaction tracking (default: true) */
|
|
92
|
+
forms?: boolean;
|
|
93
|
+
/** SPA navigation support (default: true) */
|
|
94
|
+
spa?: boolean;
|
|
95
|
+
/** Behavioral ML classification (default: true) */
|
|
96
|
+
behavioralML?: boolean;
|
|
97
|
+
/** Focus/blur paste detection (default: true) */
|
|
98
|
+
focusBlur?: boolean;
|
|
99
|
+
/** Agentic browser detection (default: true) */
|
|
100
|
+
agentic?: boolean;
|
|
101
|
+
/** Event queue with retry (default: true) */
|
|
102
|
+
eventQueue?: boolean;
|
|
103
|
+
/** Heartbeat ping service (default: false - opt-in) */
|
|
104
|
+
ping?: boolean;
|
|
105
|
+
};
|
|
80
106
|
}
|
|
81
107
|
interface TrackEventOptions {
|
|
82
108
|
/** Custom properties to attach to the event */
|
|
@@ -246,7 +272,7 @@ declare function detectAIFromUTM(url: string): AIDetectionResult | null;
|
|
|
246
272
|
* @license MIT
|
|
247
273
|
* @see https://github.com/loamly/loamly
|
|
248
274
|
*/
|
|
249
|
-
declare const VERSION = "2.
|
|
275
|
+
declare const VERSION = "2.1.1";
|
|
250
276
|
/**
|
|
251
277
|
* Known AI platforms for referrer detection
|
|
252
278
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
|
67
67
|
interface LoamlyConfig {
|
|
68
68
|
/** Your Loamly API key (found in dashboard) */
|
|
69
69
|
apiKey?: string;
|
|
70
|
+
/** Workspace ID (required when using public tracker key) */
|
|
71
|
+
workspaceId?: string;
|
|
70
72
|
/** Custom API host (default: https://app.loamly.ai) */
|
|
71
73
|
apiHost?: string;
|
|
72
74
|
/** Enable debug mode for console logging */
|
|
@@ -77,6 +79,30 @@ interface LoamlyConfig {
|
|
|
77
79
|
disableBehavioral?: boolean;
|
|
78
80
|
/** Custom session timeout in milliseconds (default: 30 minutes) */
|
|
79
81
|
sessionTimeout?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Feature flags for lightweight mode
|
|
84
|
+
* Set to false to reduce initialization overhead
|
|
85
|
+
*/
|
|
86
|
+
features?: {
|
|
87
|
+
/** Scroll depth tracking (default: true) */
|
|
88
|
+
scroll?: boolean;
|
|
89
|
+
/** Time on page tracking (default: true) */
|
|
90
|
+
time?: boolean;
|
|
91
|
+
/** Form interaction tracking (default: true) */
|
|
92
|
+
forms?: boolean;
|
|
93
|
+
/** SPA navigation support (default: true) */
|
|
94
|
+
spa?: boolean;
|
|
95
|
+
/** Behavioral ML classification (default: true) */
|
|
96
|
+
behavioralML?: boolean;
|
|
97
|
+
/** Focus/blur paste detection (default: true) */
|
|
98
|
+
focusBlur?: boolean;
|
|
99
|
+
/** Agentic browser detection (default: true) */
|
|
100
|
+
agentic?: boolean;
|
|
101
|
+
/** Event queue with retry (default: true) */
|
|
102
|
+
eventQueue?: boolean;
|
|
103
|
+
/** Heartbeat ping service (default: false - opt-in) */
|
|
104
|
+
ping?: boolean;
|
|
105
|
+
};
|
|
80
106
|
}
|
|
81
107
|
interface TrackEventOptions {
|
|
82
108
|
/** Custom properties to attach to the event */
|
|
@@ -246,7 +272,7 @@ declare function detectAIFromUTM(url: string): AIDetectionResult | null;
|
|
|
246
272
|
* @license MIT
|
|
247
273
|
* @see https://github.com/loamly/loamly
|
|
248
274
|
*/
|
|
249
|
-
declare const VERSION = "2.
|
|
275
|
+
declare const VERSION = "2.1.1";
|
|
250
276
|
/**
|
|
251
277
|
* Known AI platforms for referrer detection
|
|
252
278
|
*/
|