1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

add analytic events

This commit is contained in:
Fedor Katurov 2023-12-29 12:59:01 +07:00
parent e483079baf
commit ccdea72437
5 changed files with 15 additions and 5 deletions

View file

@ -32,7 +32,10 @@ const Header: FC<HeaderProps> = observer(() => {
const { borisCommentedAt } = useUpdates();
const { indicatorEnabled } = useNotifications();
const onLogin = useCallback(() => showModal(Dialog.Login, {}), [showModal]);
const onLogin = useCallback(() => {
umami.track('login-button');
showModal(Dialog.Login, {});
}, [showModal]);
const top = useScrollTop();

View file

@ -25,6 +25,7 @@ const NodeCommentForm: FC<Props> = observer(({ saveComment }) => {
const onCommentSave = useCallback(
async (comment: IComment) => {
if (!isUser) {
umami.track('register-dialog-from-comment');
showRegisterDialog({});
return;
}

View file

@ -31,10 +31,10 @@ const NodeLayout = observer(() => {
useNodeCoverImage(node);
const onUnauthorizedLike = useCallback(
() => showRegisterDialog({}),
[showRegisterDialog],
);
const onUnauthorizedLike = useCallback(() => {
umami.track('register-dialog-from-like');
showRegisterDialog({});
}, [showRegisterDialog]);
return (
<div className={styles.wrap}>