Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Fix goal fitlers

Bill Yang177e340c8e62
diff --git a/client/src/api/analytics/goals/useGetGoals.ts b/client/src/api/analytics/goals/useGetGoals.ts
index 94b3c3615..0864cafba 100644
--- a/client/src/api/analytics/goals/useGetGoals.ts
+++ b/client/src/api/analytics/goals/useGetGoals.ts
@@ -53,7 +53,7 @@ export function useGetGoals({
queryFn: async () => {
return authedFetch<GoalsResponse>(`/goals/${site}`, {
...timeParams,
- filteredFilters,
+ filters: filteredFilters,
page,
pageSize,
sort,
diff --git a/server/src/api/analytics/goals/getGoals.ts b/server/src/api/analytics/goals/getGoals.ts
index 583f2f817..3652763c5 100644
--- a/server/src/api/analytics/goals/getGoals.ts
+++ b/server/src/api/analytics/goals/getGoals.ts
@@ -45,18 +45,7 @@ export async function getGoals(
reply: FastifyReply
) {
const { site } = request.params;
- const {
- startDate,
- endDate,
- timeZone,
- filters,
- page = "1",
- pageSize = "10",
- sort = "createdAt",
- order = "desc",
- pastMinutesStart,
- pastMinutesEnd,
- } = request.query;
+ const { filters, page = "1", pageSize = "10", sort = "createdAt", order = "desc" } = request.query;
const pageNumber = parseInt(page, 10);
const pageSizeNumber = parseInt(pageSize, 10);