Skip to content

Commit 1700703

Browse files
committed
chore: enhance umami tracking for adding managers and switching tabs in account management
1 parent 03f2a10 commit 1700703

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/components/Settings/Manager/AccountManager/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ const AccountManager = () => {
3535
/>
3636
{type === Type.MANAGERS && (
3737
<>
38-
<Button onClick={() => setShowAddManagerModal(true)} size="sm">
38+
<Button
39+
onClick={() => {
40+
umami.track("open_add_manager_modal");
41+
setShowAddManagerModal(true);
42+
}}
43+
size="sm"
44+
>
3945
Add manager
4046
</Button>
4147
<Modal

src/components/Shared/UI/Tabs.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const Tabs = ({ tabs, active, setActive, layoutId, className }: TabsProps) => {
2222
className="relative cursor-pointer px-3 py-1.5 text-sm outline-hidden transition-colors"
2323
key={tab.type}
2424
layout
25-
onClick={() => setActive(tab.type)}
25+
onClick={() => {
26+
umami.track(`switch_${layoutId}`, { tab: tab.type });
27+
setActive(tab.type);
28+
}}
2629
tabIndex={0}
2730
>
2831
{active === tab.type ? (

0 commit comments

Comments
 (0)