Skip to content

Commit

Permalink
chore: add GA event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelRajodiya committed Aug 19, 2024
1 parent dad0de1 commit 242f374
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export default function NavBar({ urlPath }: { urlPath: string }) {
<button
className={styles.backBtn}
onClick={() => {
sendGAEvent("event", "buttonClicked", {
value: "back navigation",
});
if (previousStepPath) {
router.push("/" + previousStepPath);
} else {
Expand All @@ -80,7 +83,12 @@ export default function NavBar({ urlPath }: { urlPath: string }) {
dir="row"
align="center"
gap={"8px"}
onClick={onOpen}
onClick={() => {
onOpen();
sendGAEvent("event", "buttonClicked", {
value: "Outline Drawer (from breadcrumb)",
});
}}
cursor={"pointer"}
>
<div className={styles.chapterTitle}>
Expand Down

0 comments on commit 242f374

Please sign in to comment.