@loamly/tracker 1.8.0 → 2.0.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/README.md +146 -47
- package/dist/index.cjs +1244 -357
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +78 -65
- package/dist/index.d.ts +78 -65
- package/dist/index.mjs +1244 -357
- package/dist/index.mjs.map +1 -1
- package/dist/loamly.iife.global.js +1291 -140
- package/dist/loamly.iife.global.js.map +1 -1
- package/dist/loamly.iife.min.global.js +16 -1
- package/dist/loamly.iife.min.global.js.map +1 -1
- package/package.json +2 -2
- package/src/behavioral/form-tracker.ts +325 -0
- package/src/behavioral/index.ts +9 -0
- package/src/behavioral/scroll-tracker.ts +163 -0
- package/src/behavioral/time-tracker.ts +174 -0
- package/src/browser.ts +127 -36
- package/src/config.ts +1 -1
- package/src/core.ts +278 -156
- package/src/infrastructure/event-queue.ts +225 -0
- package/src/infrastructure/index.ts +8 -0
- package/src/infrastructure/ping.ts +149 -0
- package/src/spa/index.ts +7 -0
- package/src/spa/router.ts +147 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic Browser Detection
|
|
3
|
+
*
|
|
4
|
+
* LOA-187: Detects AI agentic browsers like Perplexity Comet, ChatGPT Atlas,
|
|
5
|
+
* and other automated browsing agents.
|
|
6
|
+
*
|
|
7
|
+
* Detection methods:
|
|
8
|
+
* - DOM fingerprinting (Perplexity Comet overlay)
|
|
9
|
+
* - Mouse movement patterns (teleporting clicks)
|
|
10
|
+
* - CDP (Chrome DevTools Protocol) automation fingerprint
|
|
11
|
+
* - navigator.webdriver detection
|
|
12
|
+
*
|
|
13
|
+
* @module @loamly/tracker/detection/agentic-browser
|
|
14
|
+
* @license MIT
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Agentic detection result
|
|
18
|
+
*/
|
|
19
|
+
interface AgenticDetectionResult {
|
|
20
|
+
/** Whether Perplexity Comet DOM element was detected */
|
|
21
|
+
cometDOMDetected: boolean;
|
|
22
|
+
/** Whether CDP automation was detected */
|
|
23
|
+
cdpDetected: boolean;
|
|
24
|
+
/** Mouse movement patterns */
|
|
25
|
+
mousePatterns: {
|
|
26
|
+
teleportingClicks: number;
|
|
27
|
+
totalMovements: number;
|
|
28
|
+
};
|
|
29
|
+
/** Overall agentic probability (0-1) */
|
|
30
|
+
agenticProbability: number;
|
|
31
|
+
/** Detection signals */
|
|
32
|
+
signals: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Agentic Browser Analyzer
|
|
36
|
+
*
|
|
37
|
+
* Combines all detection methods into a unified result.
|
|
38
|
+
*/
|
|
39
|
+
declare class AgenticBrowserAnalyzer {
|
|
40
|
+
private cometDetector;
|
|
41
|
+
private mouseAnalyzer;
|
|
42
|
+
private cdpDetector;
|
|
43
|
+
private initialized;
|
|
44
|
+
constructor();
|
|
45
|
+
/**
|
|
46
|
+
* Initialize all detectors
|
|
47
|
+
*/
|
|
48
|
+
init(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get current detection result
|
|
51
|
+
*/
|
|
52
|
+
getResult(): AgenticDetectionResult;
|
|
53
|
+
/**
|
|
54
|
+
* Cleanup resources
|
|
55
|
+
*/
|
|
56
|
+
destroy(): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create and initialize an agentic browser analyzer
|
|
60
|
+
*/
|
|
61
|
+
declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
62
|
+
|
|
1
63
|
/**
|
|
2
64
|
* Loamly Tracker Types
|
|
3
65
|
* @module @loamly/tracker
|
|
@@ -106,7 +168,18 @@ interface LoamlyTracker {
|
|
|
106
168
|
/**
|
|
107
169
|
* Loamly Tracker Core
|
|
108
170
|
*
|
|
109
|
-
* Cookie-free, privacy-first analytics with AI traffic detection.
|
|
171
|
+
* Cookie-free, privacy-first analytics with comprehensive AI traffic detection.
|
|
172
|
+
*
|
|
173
|
+
* Features:
|
|
174
|
+
* - Navigation Timing API (paste vs click detection)
|
|
175
|
+
* - Behavioral ML Classifier (mouse, scroll, interaction patterns)
|
|
176
|
+
* - Focus/Blur Sequence Analysis (copy-paste detection)
|
|
177
|
+
* - Agentic Browser Detection (Comet, CDP, teleporting clicks)
|
|
178
|
+
* - Advanced Scroll Tracking (30% chunk reporting)
|
|
179
|
+
* - Universal Form Tracking (HubSpot, Typeform, native)
|
|
180
|
+
* - SPA Navigation Support (History API hooks)
|
|
181
|
+
* - Event Queue with Retry (offline support)
|
|
182
|
+
* - Real-time Ping (heartbeat)
|
|
110
183
|
*
|
|
111
184
|
* @module @loamly/tracker
|
|
112
185
|
*/
|
|
@@ -114,7 +187,9 @@ interface LoamlyTracker {
|
|
|
114
187
|
/**
|
|
115
188
|
* The Loamly Tracker instance
|
|
116
189
|
*/
|
|
117
|
-
declare const loamly: LoamlyTracker
|
|
190
|
+
declare const loamly: LoamlyTracker & {
|
|
191
|
+
getAgentic: () => AgenticDetectionResult | null;
|
|
192
|
+
};
|
|
118
193
|
|
|
119
194
|
/**
|
|
120
195
|
* Navigation Timing API Detection
|
|
@@ -163,68 +238,6 @@ declare function detectAIFromReferrer(referrer: string): AIDetectionResult | nul
|
|
|
163
238
|
*/
|
|
164
239
|
declare function detectAIFromUTM(url: string): AIDetectionResult | null;
|
|
165
240
|
|
|
166
|
-
/**
|
|
167
|
-
* Agentic Browser Detection
|
|
168
|
-
*
|
|
169
|
-
* LOA-187: Detects AI agentic browsers like Perplexity Comet, ChatGPT Atlas,
|
|
170
|
-
* and other automated browsing agents.
|
|
171
|
-
*
|
|
172
|
-
* Detection methods:
|
|
173
|
-
* - DOM fingerprinting (Perplexity Comet overlay)
|
|
174
|
-
* - Mouse movement patterns (teleporting clicks)
|
|
175
|
-
* - CDP (Chrome DevTools Protocol) automation fingerprint
|
|
176
|
-
* - navigator.webdriver detection
|
|
177
|
-
*
|
|
178
|
-
* @module @loamly/tracker/detection/agentic-browser
|
|
179
|
-
* @license MIT
|
|
180
|
-
*/
|
|
181
|
-
/**
|
|
182
|
-
* Agentic detection result
|
|
183
|
-
*/
|
|
184
|
-
interface AgenticDetectionResult {
|
|
185
|
-
/** Whether Perplexity Comet DOM element was detected */
|
|
186
|
-
cometDOMDetected: boolean;
|
|
187
|
-
/** Whether CDP automation was detected */
|
|
188
|
-
cdpDetected: boolean;
|
|
189
|
-
/** Mouse movement patterns */
|
|
190
|
-
mousePatterns: {
|
|
191
|
-
teleportingClicks: number;
|
|
192
|
-
totalMovements: number;
|
|
193
|
-
};
|
|
194
|
-
/** Overall agentic probability (0-1) */
|
|
195
|
-
agenticProbability: number;
|
|
196
|
-
/** Detection signals */
|
|
197
|
-
signals: string[];
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Agentic Browser Analyzer
|
|
201
|
-
*
|
|
202
|
-
* Combines all detection methods into a unified result.
|
|
203
|
-
*/
|
|
204
|
-
declare class AgenticBrowserAnalyzer {
|
|
205
|
-
private cometDetector;
|
|
206
|
-
private mouseAnalyzer;
|
|
207
|
-
private cdpDetector;
|
|
208
|
-
private initialized;
|
|
209
|
-
constructor();
|
|
210
|
-
/**
|
|
211
|
-
* Initialize all detectors
|
|
212
|
-
*/
|
|
213
|
-
init(): void;
|
|
214
|
-
/**
|
|
215
|
-
* Get current detection result
|
|
216
|
-
*/
|
|
217
|
-
getResult(): AgenticDetectionResult;
|
|
218
|
-
/**
|
|
219
|
-
* Cleanup resources
|
|
220
|
-
*/
|
|
221
|
-
destroy(): void;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Create and initialize an agentic browser analyzer
|
|
225
|
-
*/
|
|
226
|
-
declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
227
|
-
|
|
228
241
|
/**
|
|
229
242
|
* Loamly Tracker Configuration
|
|
230
243
|
*
|
|
@@ -232,7 +245,7 @@ declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
|
232
245
|
* @license MIT
|
|
233
246
|
* @see https://github.com/loamly/loamly
|
|
234
247
|
*/
|
|
235
|
-
declare const VERSION = "
|
|
248
|
+
declare const VERSION = "2.0.0";
|
|
236
249
|
/**
|
|
237
250
|
* Known AI platforms for referrer detection
|
|
238
251
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic Browser Detection
|
|
3
|
+
*
|
|
4
|
+
* LOA-187: Detects AI agentic browsers like Perplexity Comet, ChatGPT Atlas,
|
|
5
|
+
* and other automated browsing agents.
|
|
6
|
+
*
|
|
7
|
+
* Detection methods:
|
|
8
|
+
* - DOM fingerprinting (Perplexity Comet overlay)
|
|
9
|
+
* - Mouse movement patterns (teleporting clicks)
|
|
10
|
+
* - CDP (Chrome DevTools Protocol) automation fingerprint
|
|
11
|
+
* - navigator.webdriver detection
|
|
12
|
+
*
|
|
13
|
+
* @module @loamly/tracker/detection/agentic-browser
|
|
14
|
+
* @license MIT
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Agentic detection result
|
|
18
|
+
*/
|
|
19
|
+
interface AgenticDetectionResult {
|
|
20
|
+
/** Whether Perplexity Comet DOM element was detected */
|
|
21
|
+
cometDOMDetected: boolean;
|
|
22
|
+
/** Whether CDP automation was detected */
|
|
23
|
+
cdpDetected: boolean;
|
|
24
|
+
/** Mouse movement patterns */
|
|
25
|
+
mousePatterns: {
|
|
26
|
+
teleportingClicks: number;
|
|
27
|
+
totalMovements: number;
|
|
28
|
+
};
|
|
29
|
+
/** Overall agentic probability (0-1) */
|
|
30
|
+
agenticProbability: number;
|
|
31
|
+
/** Detection signals */
|
|
32
|
+
signals: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Agentic Browser Analyzer
|
|
36
|
+
*
|
|
37
|
+
* Combines all detection methods into a unified result.
|
|
38
|
+
*/
|
|
39
|
+
declare class AgenticBrowserAnalyzer {
|
|
40
|
+
private cometDetector;
|
|
41
|
+
private mouseAnalyzer;
|
|
42
|
+
private cdpDetector;
|
|
43
|
+
private initialized;
|
|
44
|
+
constructor();
|
|
45
|
+
/**
|
|
46
|
+
* Initialize all detectors
|
|
47
|
+
*/
|
|
48
|
+
init(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get current detection result
|
|
51
|
+
*/
|
|
52
|
+
getResult(): AgenticDetectionResult;
|
|
53
|
+
/**
|
|
54
|
+
* Cleanup resources
|
|
55
|
+
*/
|
|
56
|
+
destroy(): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create and initialize an agentic browser analyzer
|
|
60
|
+
*/
|
|
61
|
+
declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
62
|
+
|
|
1
63
|
/**
|
|
2
64
|
* Loamly Tracker Types
|
|
3
65
|
* @module @loamly/tracker
|
|
@@ -106,7 +168,18 @@ interface LoamlyTracker {
|
|
|
106
168
|
/**
|
|
107
169
|
* Loamly Tracker Core
|
|
108
170
|
*
|
|
109
|
-
* Cookie-free, privacy-first analytics with AI traffic detection.
|
|
171
|
+
* Cookie-free, privacy-first analytics with comprehensive AI traffic detection.
|
|
172
|
+
*
|
|
173
|
+
* Features:
|
|
174
|
+
* - Navigation Timing API (paste vs click detection)
|
|
175
|
+
* - Behavioral ML Classifier (mouse, scroll, interaction patterns)
|
|
176
|
+
* - Focus/Blur Sequence Analysis (copy-paste detection)
|
|
177
|
+
* - Agentic Browser Detection (Comet, CDP, teleporting clicks)
|
|
178
|
+
* - Advanced Scroll Tracking (30% chunk reporting)
|
|
179
|
+
* - Universal Form Tracking (HubSpot, Typeform, native)
|
|
180
|
+
* - SPA Navigation Support (History API hooks)
|
|
181
|
+
* - Event Queue with Retry (offline support)
|
|
182
|
+
* - Real-time Ping (heartbeat)
|
|
110
183
|
*
|
|
111
184
|
* @module @loamly/tracker
|
|
112
185
|
*/
|
|
@@ -114,7 +187,9 @@ interface LoamlyTracker {
|
|
|
114
187
|
/**
|
|
115
188
|
* The Loamly Tracker instance
|
|
116
189
|
*/
|
|
117
|
-
declare const loamly: LoamlyTracker
|
|
190
|
+
declare const loamly: LoamlyTracker & {
|
|
191
|
+
getAgentic: () => AgenticDetectionResult | null;
|
|
192
|
+
};
|
|
118
193
|
|
|
119
194
|
/**
|
|
120
195
|
* Navigation Timing API Detection
|
|
@@ -163,68 +238,6 @@ declare function detectAIFromReferrer(referrer: string): AIDetectionResult | nul
|
|
|
163
238
|
*/
|
|
164
239
|
declare function detectAIFromUTM(url: string): AIDetectionResult | null;
|
|
165
240
|
|
|
166
|
-
/**
|
|
167
|
-
* Agentic Browser Detection
|
|
168
|
-
*
|
|
169
|
-
* LOA-187: Detects AI agentic browsers like Perplexity Comet, ChatGPT Atlas,
|
|
170
|
-
* and other automated browsing agents.
|
|
171
|
-
*
|
|
172
|
-
* Detection methods:
|
|
173
|
-
* - DOM fingerprinting (Perplexity Comet overlay)
|
|
174
|
-
* - Mouse movement patterns (teleporting clicks)
|
|
175
|
-
* - CDP (Chrome DevTools Protocol) automation fingerprint
|
|
176
|
-
* - navigator.webdriver detection
|
|
177
|
-
*
|
|
178
|
-
* @module @loamly/tracker/detection/agentic-browser
|
|
179
|
-
* @license MIT
|
|
180
|
-
*/
|
|
181
|
-
/**
|
|
182
|
-
* Agentic detection result
|
|
183
|
-
*/
|
|
184
|
-
interface AgenticDetectionResult {
|
|
185
|
-
/** Whether Perplexity Comet DOM element was detected */
|
|
186
|
-
cometDOMDetected: boolean;
|
|
187
|
-
/** Whether CDP automation was detected */
|
|
188
|
-
cdpDetected: boolean;
|
|
189
|
-
/** Mouse movement patterns */
|
|
190
|
-
mousePatterns: {
|
|
191
|
-
teleportingClicks: number;
|
|
192
|
-
totalMovements: number;
|
|
193
|
-
};
|
|
194
|
-
/** Overall agentic probability (0-1) */
|
|
195
|
-
agenticProbability: number;
|
|
196
|
-
/** Detection signals */
|
|
197
|
-
signals: string[];
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Agentic Browser Analyzer
|
|
201
|
-
*
|
|
202
|
-
* Combines all detection methods into a unified result.
|
|
203
|
-
*/
|
|
204
|
-
declare class AgenticBrowserAnalyzer {
|
|
205
|
-
private cometDetector;
|
|
206
|
-
private mouseAnalyzer;
|
|
207
|
-
private cdpDetector;
|
|
208
|
-
private initialized;
|
|
209
|
-
constructor();
|
|
210
|
-
/**
|
|
211
|
-
* Initialize all detectors
|
|
212
|
-
*/
|
|
213
|
-
init(): void;
|
|
214
|
-
/**
|
|
215
|
-
* Get current detection result
|
|
216
|
-
*/
|
|
217
|
-
getResult(): AgenticDetectionResult;
|
|
218
|
-
/**
|
|
219
|
-
* Cleanup resources
|
|
220
|
-
*/
|
|
221
|
-
destroy(): void;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Create and initialize an agentic browser analyzer
|
|
225
|
-
*/
|
|
226
|
-
declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
227
|
-
|
|
228
241
|
/**
|
|
229
242
|
* Loamly Tracker Configuration
|
|
230
243
|
*
|
|
@@ -232,7 +245,7 @@ declare function createAgenticAnalyzer(): AgenticBrowserAnalyzer;
|
|
|
232
245
|
* @license MIT
|
|
233
246
|
* @see https://github.com/loamly/loamly
|
|
234
247
|
*/
|
|
235
|
-
declare const VERSION = "
|
|
248
|
+
declare const VERSION = "2.0.0";
|
|
236
249
|
/**
|
|
237
250
|
* Known AI platforms for referrer detection
|
|
238
251
|
*/
|