Variable analyticsConst

analytics: {
    capture(...args: [target: (keyof CaptureEventsPayloadMap) | string & {}, query: Record<string, any> | {
        id: string;
    } | {
        id: string;
    }]): Promise<void> | Promise<Response>;
    init(...args: [options: AnalyticsOptions]): void;
    updateState(update: Partial<Pick<AnalyticState, "accessToken" | "logEvents" | "sendEvents">>): void;
} = ...

Type declaration

  • capture:function
    • Captures an analytic event with a custom target and query payload.

      Parameters

      • Rest...args: [target: (keyof CaptureEventsPayloadMap) | string & {}, query: Record<string, any> | {
            id: string;
        } | {
            id: string;
        }]

      Returns Promise<void> | Promise<Response>

      A promise that resolves to the server response or void.

  • init:function
    • Initializes the analytics with the provided options.

      Parameters

      • Rest...args: [options: AnalyticsOptions]

        The options to initialize the analytics.

      Returns void

  • updateState:function
    • Updates the analytics state with the provided parameters.

      Parameters

      • update: Partial<Pick<AnalyticState, "accessToken" | "logEvents" | "sendEvents">>

        The state parameters to update.

      Returns void