Skip to content

armgit / umami

Public Imported from GitHub
0

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.

585 B
Raw Blame
import type { AnalyticsParameters } from '@/lib/analytics-query';
import type { ReactQueryOptions } from '@/lib/types';
import type { PerformanceMetricsData } from '@/queries/sql/performance/getPerformanceMetrics';
import { useAnalyticsQuery } from './useAnalyticsQuery';

export function usePerformanceMetricsQuery(
  params: AnalyticsParameters & { metric: string } & {
    type: 'path' | 'title' | 'device' | 'browser';
  },
  options?: ReactQueryOptions<PerformanceMetricsData[]>,
) {
  return useAnalyticsQuery<PerformanceMetricsData[]>('performance/metrics', params, options);
}