Type Alias CaptureEventsPayloadMap

CaptureEventsPayloadMap: {
    "$query-search": { hits?: string[]; query: string };
    "$query-suggest": { query: string; suggestions?: string[] };
    "$select-category": { id: string };
    "$select-location": { id: string };
}

Maps reserved analytics event names to their payload structures.

This type is used by the Analytics.capture method to provide type safety for reserved analytics events. When using these event names, the payload must match the corresponding structure.

Type declaration

  • $query-search: { hits?: string[]; query: string }

    Event fired when a search query is executed.

    • Optionalhits?: string[]

      Optional array of result IDs (hits).

    • query: string

      The search query string.

  • $query-suggest: { query: string; suggestions?: string[] }

    Event fired when query suggestions are generated.

    • query: string

      The search query string.

    • Optionalsuggestions?: string[]

      Optional array of suggestion strings.

  • $select-category: { id: string }

    Event fired when a category is selected.

    • id: string

      The ID of the selected category.

  • $select-location: { id: string }

    Event fired when a location is selected.

    • id: string

      The ID of the selected location.