Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
update analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Oct 31, 2023
1 parent 7c59b4f commit a4ef717
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/analytics/patches/useProjectPatchesAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/analytics/patches/useUserPatchesAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () =>
Expand Down
7 changes: 5 additions & 2 deletions src/components/PatchesPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
| {
Expand Down Expand Up @@ -86,7 +86,10 @@ export const PatchesPage: React.FC<Props> = ({
): 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 => {
Expand Down

0 comments on commit a4ef717

Please sign in to comment.