Interface Event

event tracking data structure

represents a user interaction or system event. used for analytics, personalization model training, and tracking user behavior across sessions.

interface Event {
    eventType: string;
    payload?: Record<string, any>;
    predictionIds?: string[];
    predictionId?: string;
    timestamp?: string;
    sessionId?: string | number;
    units?: Record<string, string>;
    value?: string;
}

Properties

eventType: string

event type name or uuid (e.g., "click", "purchase", "view")

payload?: Record<string, any>

event-specific payload data (e.g., { item_id: "123", price: 99.99 })

predictionIds?: string[]

associated prediction uuids (when event follows predictions)

predictionId?: string

single associated prediction uuid

timestamp?: string

event timestamp in iso format (defaults to server time if not provided)

sessionId?: string | number

session identifier (can be uuid, string, or number)

units?: Record<string, string>

legacy field for units

value?: string

legacy field for value