From c0327fa5a8a38e68f469b7bbaa13920851257ad7 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Thu, 26 Sep 2024 19:09:05 +0530 Subject: [PATCH] add comments --- src/Common/hooks/useFilters.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Common/hooks/useFilters.tsx b/src/Common/hooks/useFilters.tsx index 341d1f19bdb..a6974a5a43b 100644 --- a/src/Common/hooks/useFilters.tsx +++ b/src/Common/hooks/useFilters.tsx @@ -43,12 +43,17 @@ export default function useFilters({ ) => { query = FiltersCache.utils.clean(query); _setQueryParams(query, options); + + // For each of the newly applied filters (additional filters compared to + // previously applied ones), trigger a plausible goal "Advanced filter + // applied" with the applied filter's query key and current location as tags. Object.keys(query).forEach((filter) => triggerGoal("Advanced filter applied", { filter, location: location.pathname, }), ); + updateCache(query); };