Skip to main content

browser-tracker.eventstore

Home > @snowplow/browser-tracker > EventStore

EventStore interface

EventStore allows storing and retrieving events before they are sent to the collector

Signature:
interface EventStore 

Properties

PropertyTypeDescription
add(payload: EventStorePayload) => Promise<number>Add an event to the store
count() => Promise<number>Count all events in the store
getAll() => Promise<readonly EventStorePayload[]>Retrieve all payloads including their meta configuration in the store
getAllPayloads() => Promise<readonly Payload[]>Retrieve all pure payloads in the store
iterator() => EventStoreIteratorGet an iterator over all events in the store
removeHead(count: number) => Promise<void>Remove the first count events from the store