Collection of functions responsible for tracking user activity in an Eitri-App using Singular SDK.

Requirements: This feature must be enabled in the Eitri Shopping App native configuration by setting both singularSdkKey and singularSdkSecret in the app configuration file.

User identity is not set here, but in session.notifyLogin and session.notifyLogout.

Methods

Methods

  • Registers an event in Singular SDK. To use standard event names, refer to the Singular Standard Events documentation.

    Example:

    const modules = await Eitri.modules();
    const logEvent = modules?.singular?.logEvent;
    if (!logEvent) return;
    await logEvent({
    eventName: "purchase_completed",
    data: { product_id: "12345", price: 99.99 }
    })

    Parameters

    • param: { data: Record<string, string | number>; eventName: string }

      Object describing the event.

      • data: Record<string, string | number>

        Object describing the event's data. Attributes and values are limited to 500 ASCII characters.

      • eventName: string

        Name of the event. Event names are limited to 32 ASCII characters.

    Returns Promise<undefined>