UNPKG

@raphaelscunha/event-tracker

Version:

A simple event tracking and user identification package with streaming capabilities

21 lines 624 B
interface EventTrackerConfig { serverUrl: string; apiKey: string; batchSize?: number; flushInterval?: number; } declare class EventTracker { private config; private user; private eventQueue; private flushTimeoutId; constructor(config: EventTrackerConfig); private setupFlushInterval; identify(userId: string, properties?: Record<string, any>): Promise<void>; track(eventName: string, properties?: Record<string, any>): Promise<void>; private flush; private sendToServer; shutdown(): Promise<void>; } export default EventTracker; //# sourceMappingURL=index.d.ts.map