Skip to content

Commit 5f7a6d2

Browse files
committed
chore: integrate umami analytics tracking for post likes
1 parent affffba commit 5f7a6d2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/components/Post/Actions/Like.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ const Like = ({ post, showCount }: LikeProps) => {
9191
}
9292

9393
increment();
94+
umami.track("like_post");
9495

9596
return await addReaction({
9697
variables: {

src/vite-env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
/// <reference types="vite/client" />
2+
3+
declare const umami: {
4+
track: (event: string, data?: Record<string, unknown>) => void;
5+
};

0 commit comments

Comments
 (0)