diff --git a/ui/desktop/src/utils/analytics.ts b/ui/desktop/src/utils/analytics.ts index a62b6f2e1309..1169ad44184a 100644 --- a/ui/desktop/src/utils/analytics.ts +++ b/ui/desktop/src/utils/analytics.ts @@ -1,51 +1,19 @@ /** * Frontend Analytics Module * - * Provides privacy-respecting analytics by routing events through the backend. - * The backend uses posthog-rs which handles the PostHog API correctly. - * - * What we track: - * - Feature usage (which features users interact with) - * - Screen/view navigation - * - Onboarding funnel completion - * - Error types (without sensitive details) - * - * What we never track: - * - Conversation content - * - Code or file contents - * - API keys or credentials - * - Tool arguments or outputs - * - Personal identifiable information + * Compatibility layer for existing UI tracking call sites. Frontend telemetry is + * disabled during the ACP migration, so events are intentionally not sent. */ -import { sendTelemetryEvent } from '../api'; - -let telemetryEnabled: boolean | null = null; - -export function setTelemetryEnabled(enabled: boolean): void { - telemetryEnabled = enabled; +export function setTelemetryEnabled(_enabled: boolean): void { + // Frontend telemetry is disabled. } -function canTrack(): boolean { - return telemetryEnabled === true; -} - -async function sendEvent( - eventName: string, - properties: Record = {} -): Promise { - if (!canTrack()) return; - - try { - await sendTelemetryEvent({ - body: { - event_name: eventName, - properties: properties as Record, - }, - }); - } catch (error) { - console.debug('[Analytics] Failed to send event:', error); - } +function sendEvent( + _eventName: string, + _properties: Record = {} +): void { + // Frontend telemetry is disabled. } // ============================================================================ @@ -338,8 +306,6 @@ export function trackTelemetryPreference( enabled: boolean, location: 'settings' | 'onboarding' | 'modal' ): void { - // Always send this event, even if telemetry is disabled - // This is the one exception - we need to know opt-out rates sendEvent('telemetry_preference_set', { enabled, location }); }