Skip to content

ClickIngestor

Defined in: src/clicks/ingestor.ts:35

A running ingestor.

Property Modifier Type Description Defined in
pending readonly number Events waiting to be flushed. src/clicks/ingestor.ts:46
capture(event, options?): void;

Defined in: src/clicks/ingestor.ts:40

Enqueue an event. Never throws, never awaits the sink. With waitUntil (edge runtimes), the queue is flushed in the background immediately.

Parameter Type
event AnalyticsEvent
options? { waitUntil?: WaitUntil; }
options.waitUntil? WaitUntil

void


close(): Promise<void>;

Defined in: src/clicks/ingestor.ts:44

Flush and stop the timer.

Promise<void>


flush(): Promise<void>;

Defined in: src/clicks/ingestor.ts:42

Flush everything queued now. Resolves when the sink acknowledged (or gave up).

Promise<void>