UNPKG

@hubhorizonllc/tracker

Version:

Tracks and analyzes user behavior using Chrome's TextClassifier

26 lines (25 loc) 764 B
import type { UserBehaviorOptions, TrackerCallback } from "./types"; export declare class UserBehaviorTracker { private options; private interactions; private startTime; private timeoutId; private callback; private isSupported; constructor(options?: UserBehaviorOptions); private checkSupport; start(callback: TrackerCallback): void; stop(): void; private attachEventListeners; private detachEventListeners; private handleClick; private handleScroll; private lastScrollTime; private handleInput; private handleError; private getElementInfo; private getElementPath; private recordInteraction; private processInteractions; addCustomInteraction(type: string, data: any): void; }