node-tracker.emitter
Home > @snowplow/node-tracker > Emitter
Emitter interface
Emitter is responsible for sending events to the collector. It manages the event queue and sends events in batches depending on configuration.
Signature:interface Emitter
Properties
Property | Type | Description |
---|---|---|
flush | () => Promise<void> | Forces the emitter to send all events in the event store to the collector. |
input | (payload: Payload) => Promise<void> | Adds a payload to the event store or sends it to the collector. |
setAnonymousTracking | (anonymous: boolean) => void | Sets the server anonymization flag. |
setBufferSize | (bufferSize: number) => void | Updates the buffer size of the emitter. |
setCollectorUrl | (url: string) => void | Updates the collector URL to which events will be sent. |