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.

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: { eventName: string; data: Record<string, string | number> }

      Object describing the event.

      • eventName: string

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

      • data: Record<string, string | number>

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

    Returns Promise<undefined>