EventTypes:
    | {
        event_name: string;
        event_type: "view";
        items: string[];
        metadata?: unknown;
        request?: RequestInfo | null;
        user_id?: string | null;
    }
    | {
        event_name: string;
        event_type: "add_to_cart";
        is_conversion?: boolean | null;
        items: string[];
        metadata?: unknown;
        request?: RequestInfo | null;
        user_id?: string | null;
    }
    | {
        clicked_items: ChunkWithPosition;
        event_name: string;
        event_type: "click";
        is_conversion?: boolean | null;
        request?: RequestInfo | null;
        user_id?: string | null;
    }
    | {
        currency?: string | null;
        event_name: string;
        event_type: "purchase";
        is_conversion?: boolean | null;
        items: string[];
        request?: RequestInfo | null;
        user_id?: string | null;
        value?: number | null;
    }
    | {
        event_name: string;
        event_type: "filter_clicked";
        is_conversion?: boolean | null;
        items: {
            [key: string]: string;
        };
        request?: RequestInfo | null;
        user_id?: string | null;
    }
    | {
        event_type: "search";
        latency?: number | null;
        query: string;
        query_rating?: SearchQueryRating | null;
        request_params?: unknown;
        results?: unknown[] | null;
        search_type?: ClickhouseSearchTypes | null;
        top_score?: number | null;
        user_id?: string | null;
    }
    | {
        detected_hallucinations?: string[] | null;
        event_type: "rag";
        hallucination_score?: number | null;
        llm_response?: string | null;
        query_rating?: SearchQueryRating | null;
        rag_type?: ClickhouseRagTypes | null;
        results?: unknown[] | null;
        search_id?: string | null;
        user_id?: string | null;
        user_message: string;
    }
    | {
        event_type: "recommendation";
        negative_ids?: string[] | null;
        negative_tracking_ids?: string[] | null;
        positive_ids?: string[] | null;
        positive_tracking_ids?: string[] | null;
        recommendation_type?: ClickhouseRecommendationTypes | null;
        request_params?: unknown;
        results?: unknown[] | null;
        top_score?: number | null;
        user_id?: string | null;
    }

Type declaration

  • event_name: string

    The name of the event

  • event_type: "view"
  • items: string[]

    The items that were viewed

  • Optionalmetadata?: unknown

    Any other metadata associated with the event

  • Optionalrequest?: RequestInfo | null
  • Optionaluser_id?: string | null

    The user id of the user who viewed the items

Type declaration

  • event_name: string

    The name of the event

  • event_type: "add_to_cart"
  • Optionalis_conversion?: boolean | null

    Whether the event is a conversion event

  • items: string[]

    The items that were added to the cart

  • Optionalmetadata?: unknown

    Any other metadata associated with the event

  • Optionalrequest?: RequestInfo | null
  • Optionaluser_id?: string | null

    The user id of the user who added the items to the cart

Type declaration

  • clicked_items: ChunkWithPosition
  • event_name: string

    The name of the event

  • event_type: "click"
  • Optionalis_conversion?: boolean | null

    Whether the event is a conversion event

  • Optionalrequest?: RequestInfo | null
  • Optionaluser_id?: string | null

    The user id of the user who clicked the items

Type declaration

  • Optionalcurrency?: string | null

    The currency of the purchase

  • event_name: string

    The name of the event

  • event_type: "purchase"
  • Optionalis_conversion?: boolean | null

    Whether the event is a conversion event

  • items: string[]

    The items that were purchased

  • Optionalrequest?: RequestInfo | null
  • Optionaluser_id?: string | null

    The user id of the user who purchased the items

  • Optionalvalue?: number | null

    The value of the purchase

Type declaration

  • event_name: string

    The name of the event

  • event_type: "filter_clicked"
  • Optionalis_conversion?: boolean | null

    Whether the event is a conversion event

  • items: {
        [key: string]: string;
    }

    The filter items that were clicked in a hashmap ie. {filter_name: filter_value} where filter_name is filter_type::field_name

    • [key: string]: string
  • Optionalrequest?: RequestInfo | null
  • Optionaluser_id?: string | null

    The user id of the user who clicked the items

Type declaration

  • event_type: "search"
  • Optionallatency?: number | null

    Latency of the search

  • query: string

    The search query

  • Optionalquery_rating?: SearchQueryRating | null
  • Optionalrequest_params?: unknown

    The request params of the search

  • Optionalresults?: unknown[] | null

    The results of the search

  • Optionalsearch_type?: ClickhouseSearchTypes | null
  • Optionaltop_score?: number | null

    The top score of the search

  • Optionaluser_id?: string | null

    The user id of the user who made the search

Type declaration

  • Optionaldetected_hallucinations?: string[] | null

    The detected hallucinations of the RAG event

  • event_type: "rag"
  • Optionalhallucination_score?: number | null

    The hallucination score of the RAG event

  • Optionalllm_response?: string | null

    The response from the LLM

  • Optionalquery_rating?: SearchQueryRating | null
  • Optionalrag_type?: ClickhouseRagTypes | null
  • Optionalresults?: unknown[] | null

    The results of the RAG event

  • Optionalsearch_id?: string | null

    The search id to associate the RAG event with a search

  • Optionaluser_id?: string | null

    The user id of the user who made the RAG event

  • user_message: string

    The user message

Type declaration

  • event_type: "recommendation"
  • Optionalnegative_ids?: string[] | null

    Negative ids used for the recommendation

  • Optionalnegative_tracking_ids?: string[] | null

    Negative tracking ids used for the recommendation

  • Optionalpositive_ids?: string[] | null

    Positive ids used for the recommendation

  • Optionalpositive_tracking_ids?: string[] | null

    Positive tracking ids used for the recommendation

  • Optionalrecommendation_type?: ClickhouseRecommendationTypes | null
  • Optionalrequest_params?: unknown

    The request params of the recommendation

  • Optionalresults?: unknown[] | null

    The results of the Recommendation event

  • Optionaltop_score?: number | null

    Top score of the recommendation

  • Optionaluser_id?: string | null

    The user id of the user who made the recommendation