Mappedin JS - v6.14.0
    Preparing search index...

    Interface Analytics

    interface Analytics {
        capture: {
            <T extends keyof CaptureEventsPayloadMap>(
                eventName: T,
                query: CaptureEventsPayloadMap[T],
            ): Promise<Response> | Promise<void>;
            <T extends (keyof CaptureEventsPayloadMap) | string & {}>(
                target: T,
                query: T extends keyof CaptureEventsPayloadMap
                    ? CaptureEventsPayloadMap[T<T>]
                    : Record<string, any>,
            ): Promise<Response> | Promise<void>;
        };
        updateState: (update: TAnalyticsUpdateState) => void;
    }
    Index

    Properties

    Properties

    capture: {
        <T extends keyof CaptureEventsPayloadMap>(
            eventName: T,
            query: CaptureEventsPayloadMap[T],
        ): Promise<Response> | Promise<void>;
        <T extends (keyof CaptureEventsPayloadMap) | string & {}>(
            target: T,
            query: T extends keyof CaptureEventsPayloadMap
                ? CaptureEventsPayloadMap[T<T>]
                : Record<string, any>,
        ): Promise<Response> | Promise<void>;
    }

    Captures an analytic event with a custom target and query payload.

    The event name or target can be one of: $select-location, $select-category, $query-suggest, $query-search

    The payload associated with the event.

    A promise that resolves to the server response or void.

    updateState: (update: TAnalyticsUpdateState) => void

    Updates the analytics state with the provided parameters.

    Type Declaration