The AnalyticsStrategy determines how search analytics are stored and retrieved for analysis.

interface AnalyticsStrategy {
    defineEntities?(): Type<any>[];
    getChartData(input: SearchAnalyticsChartInput): Promise<SearchAnalyticsChartData>;
    getEvents(input: SearchAnalyticsEventInput): Promise<SearchAnalyticsEventData>;
    getQueryData(input: SearchAnalyticsQueryInput): Promise<SearchAnalyticsQueryData>;
    logEvent(event: SearchEvent): Promise<void>;
    logQuery(logData: SearchQueryLogData): Promise<void>;
}

Hierarchy

  • InjectableStrategy
    • AnalyticsStrategy

Implemented by

Methods

  • Optionally allows the definition of database entities in the main server database.

    Returns Type<any>[]

  • Retrieves the chart data for the given input.

    Parameters

    • input: SearchAnalyticsChartInput

    Returns Promise<SearchAnalyticsChartData>

  • Retrieves the event data for the given input.

    Parameters

    • input: SearchAnalyticsEventInput

    Returns Promise<SearchAnalyticsEventData>

  • Retrieves the query data for the given input.

    Parameters

    • input: SearchAnalyticsQueryInput

    Returns Promise<SearchAnalyticsQueryData>

  • Logs a search event: either a list view or a result click.

    Parameters

    Returns Promise<void>

  • Logs a search query.

    Parameters

    Returns Promise<void>