From a4ef717b65c18be90867bdad6aef96f3cf49bbbf Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 31 Oct 2023 15:19:52 -0400 Subject: [PATCH] update analytics --- src/analytics/patches/useProjectPatchesAnalytics.ts | 2 +- src/analytics/patches/useUserPatchesAnalytics.ts | 2 +- src/components/PatchesPage/index.tsx | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/analytics/patches/useProjectPatchesAnalytics.ts b/src/analytics/patches/useProjectPatchesAnalytics.ts index 7c22d02fa7..a8854682c7 100644 --- a/src/analytics/patches/useProjectPatchesAnalytics.ts +++ b/src/analytics/patches/useProjectPatchesAnalytics.ts @@ -7,7 +7,7 @@ type Action = | { name: "Click Patch Link" } | { name: "Click Variant Icon"; variantIconStatus: string } | { name: "Filter Commit Queue" } - | { name: "Filter Hidden" } + | { name: "Filter Hidden"; includeHidden: boolean } | { name: "Filter Patches"; filterBy: string }; export const useProjectPatchesAnalytics = () => { diff --git a/src/analytics/patches/useUserPatchesAnalytics.ts b/src/analytics/patches/useUserPatchesAnalytics.ts index 3a73320a00..02d573fa5a 100644 --- a/src/analytics/patches/useUserPatchesAnalytics.ts +++ b/src/analytics/patches/useUserPatchesAnalytics.ts @@ -5,7 +5,7 @@ type Action = | { name: "Click Patch Link" } | { name: "Click Variant Icon"; variantIconStatus: string } | { name: "Filter Commit Queue" } - | { name: "Filter Hidden" } + | { name: "Filter Hidden"; includeHidden: boolean } | { name: "Filter Patches"; filterBy: string }; export const useUserPatchesAnalytics = () => diff --git a/src/components/PatchesPage/index.tsx b/src/components/PatchesPage/index.tsx index 3cc69cb7cd..64d85668a6 100644 --- a/src/components/PatchesPage/index.tsx +++ b/src/components/PatchesPage/index.tsx @@ -26,7 +26,7 @@ interface Props { analyticsObject: Analytics< | { name: "Filter Patches"; filterBy: string } | { name: "Filter Commit Queue" } - | { name: "Filter Hidden" } + | { name: "Filter Hidden"; includeHidden: boolean } | { name: "Change Page Size" } | { name: "Click Patch Link" } | { @@ -86,7 +86,10 @@ export const PatchesPage: React.FC = ({ ): void => { setIsIncludeHiddenCheckboxChecked(e.target.checked); Cookies.set(INCLUDE_HIDDEN_PATCHES, e.target.checked ? "true" : "false"); - analyticsObject.sendEvent({ name: "Filter Hidden" }); + analyticsObject.sendEvent({ + name: "Filter Hidden", + includeHidden: e.target.checked, + }); }; const handlePageSizeChange = (pageSize: number): void => {