Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
import type { AnalyticsParameters } from '@/lib/analytics-query';
import type { ReactQueryOptions } from '@/lib/types';
import type { PerformanceResult } from '@/queries/sql/performance/getPerformance';
import { useAnalyticsQuery } from './useAnalyticsQuery';
export function usePerformanceChartQuery(
params: AnalyticsParameters & { metric: string },
options?: ReactQueryOptions<Pick<PerformanceResult, 'chart'>>,
) {
return useAnalyticsQuery<Pick<PerformanceResult, 'chart'>>('performance/chart', params, options);
}