mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
feat: add posthog signup and signin events, enable backend posthog events for oss version (#249)
This commit is contained in:
parent
9298116887
commit
f7c1f63e1b
10 changed files with 82 additions and 35 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import posthog from 'posthog-js';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { PostHogEvent } from '@/constants/posthog-events';
|
||||
import { useAuth } from '@/lib/auth';
|
||||
|
||||
/**
|
||||
|
|
@ -44,6 +45,7 @@ export default function PostHogIdentify() {
|
|||
...(email && { email }),
|
||||
...(name && { name }),
|
||||
});
|
||||
posthog.capture(PostHogEvent.SIGNED_IN);
|
||||
} catch (err) {
|
||||
console.warn('Failed to identify user in PostHog', err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ export const PostHogEvent = {
|
|||
RECORDING_PLAYED: "recording_played",
|
||||
TRANSCRIPT_VIEWED: "transcript_viewed",
|
||||
WEB_CALL_INITIATED: "web_call_initiated",
|
||||
SIGNED_IN: "signed_in",
|
||||
GITHUB_STAR_CLICKED: "github_star_clicked",
|
||||
SLACK_COMMUNITY_CLICKED: "slack_community_clicked",
|
||||
} as const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue