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
pass unit into revenue report
Francis Cao52f812d9e598
diff --git a/src/components/hooks/queries/useResultQuery.ts b/src/components/hooks/queries/useResultQuery.tsindex c6fce1289..1828e594a 100644--- a/src/components/hooks/queries/useResultQuery.ts+++ b/src/components/hooks/queries/useResultQuery.ts@@ -10,7 +10,7 @@ export function useResultQuery<T = any>() {const { websiteId, ...parameters } = params;const { post, useQuery } = useApi();- const { startDate, endDate, timezone } = useDateParameters();+ const { startDate, endDate, timezone, unit } = useDateParameters();const filters = useFilterParameters();return useQuery<T>({@@ -22,6 +22,7 @@ export function useResultQuery<T = any>(startDate,endDate,timezone,+ unit,...params,...filters,},@@ -35,6 +36,7 @@ export function useResultQuery<T = any>(startDate,endDate,timezone,+ unit,...parameters,},}),diff --git a/src/lib/schema.ts b/src/lib/schema.tsindex aafd8e43f..c860cee89 100644--- a/src/lib/schema.ts+++ b/src/lib/schema.ts@@ -174,6 +174,7 @@ export const revenueReportSchema = z.object({parameters: z.object({startDate: z.coerce.date(),endDate: z.coerce.date(),+ unit: unitParam.optional(),timezone: z.string().optional(),currency: z.string(),}),