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

Commit

Permalink
Wire up analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Oct 19, 2023
1 parent 585dcaa commit 7ed0b5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/analytics/task/useTaskAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ type Action =
parsleyAvailable: boolean;
fileName: string;
}
| {
name: "Click Task File Parsley Link";
fileName: string;
}
| { name: "Click Trace Link" }
| { name: "Click Trace Metrics Link" }
| { name: "Submit Previous Commit Selector"; type: CommitType };
Expand Down
13 changes: 13 additions & 0 deletions src/pages/task/taskTabs/FileTable/GroupedFileTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ const columns = (
href={value.row.original.link}
data-cy="file-link"
target="_blank"
onClick={() => {
taskAnalytics.sendEvent({
name: "Click Task File Link",
parsleyAvailable: value.row.original.urlParsley !== null,
fileName: value.getValue() as GroupedFilesFile["name"],
});
}}
>
{value.getValue()}
</StyledLink>
Expand All @@ -38,6 +45,12 @@ const columns = (
target="_blank"
disabled={value.row.original.urlParsley === null}
size="small"
onClick={() => {
taskAnalytics.sendEvent({
name: "Click Task File Parsley Link",
fileName: value.getValue() as GroupedFilesFile["name"],
});
}}
>
Parsley
</Button>
Expand Down

0 comments on commit 7ed0b5f

Please sign in to comment.