From f0742a0978fc80c9938d33f22ab3ae1dcaf7f7e4 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 10 Apr 2025 19:40:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88(frontend)=20add=20analytics=20on?= =?UTF-8?q?=20screen=20recording=20and=20transcript=20features?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use posthog to track whether user starts transcript or screen recording. --- .../recording/components/ScreenRecordingSidePanel.tsx | 6 ++++-- .../features/recording/components/TranscriptSidePanel.tsx | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx b/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx index b947fa46..659cc438 100644 --- a/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx +++ b/src/frontend/src/features/recording/components/ScreenRecordingSidePanel.tsx @@ -24,6 +24,7 @@ import { useNotifyParticipants, NotificationType, } from '@/features/notifications' +import posthog from 'posthog-js' export const ScreenRecordingSidePanel = () => { const [isLoading, setIsLoading] = useState(false) @@ -74,6 +75,7 @@ export const ScreenRecordingSidePanel = () => { await notifyParticipants({ type: NotificationType.ScreenRecordingStarted, }) + posthog.capture('screen-recording-started', {}) } } catch (error) { console.error('Failed to handle transcript:', error) @@ -124,7 +126,7 @@ export const ScreenRecordingSidePanel = () => {