UNPKG

kromemo

Version:

Browser event capture SDK for Kromemo: batching, retries, dedupe, TypeScript-first.

33 lines 929 B
export declare class EventManager { private static EVENTS_KEY; private static DEFAULT_MAX_EVENTS_PER_BATCH; private static DEBOUNCE_INTERVAL; private maxEventsPerBatch; private deviceId; private lastEventTimestamp; constructor(maxEventsPerBatch?: number); /** * Tracks a new event with debounce. * @param name name of the event. * @param type type of the event. * @param data Additional data for the event. */ trackEvent(name: string, type: string, data?: any): void; /** * Adds the event to the queue. */ private enqueueEvent; /** * Gets the events in queue. */ private getQueuedEvents; /** * Sends the events to the server. */ private sendEvents; /** * Generates a unique ID for the event. */ private generateEventId; } //# sourceMappingURL=EventManager.d.ts.map