diff --git a/src/lib/analytics.ts b/src/lib/analytics.ts index 7fa740d..a83796d 100644 --- a/src/lib/analytics.ts +++ b/src/lib/analytics.ts @@ -14,6 +14,7 @@ export function initAnalytics() { "https://analytics.88oakapps.com", capture_pageview: true, capture_pageleave: true, + person_profiles: "never", }); initialized = true; } @@ -34,12 +35,6 @@ export function trackScreen(screenName: string) { } } -export function identifyUser(userId: string, traits?: Record) { - if (initialized) { - posthog.identify(userId, traits); - } -} - export function resetAnalytics() { if (initialized) { posthog.reset(); diff --git a/src/stores/auth.ts b/src/stores/auth.ts index 5ea7d9c..60252e2 100644 --- a/src/stores/auth.ts +++ b/src/stores/auth.ts @@ -1,7 +1,7 @@ import { create } from 'zustand'; import * as authApi from '@/lib/api/auth'; import { getQueryClient } from '@/lib/query/query-client'; -import { trackEvent, identifyUser, resetAnalytics, AnalyticsEvents } from '@/lib/analytics'; +import { trackEvent, resetAnalytics, AnalyticsEvents } from '@/lib/analytics'; import type { UserResponse } from '@/lib/api/auth'; interface AuthState { @@ -33,10 +33,6 @@ export const useAuthStore = create()((set) => ({ set({ isLoading: true, error: null }); try { const response = await authApi.login(credentials); - identifyUser(String(response.user.id), { - email: response.user.email, - name: `${response.user.first_name} ${response.user.last_name}`.trim(), - }); trackEvent(AnalyticsEvents.USER_SIGNED_IN, { method: 'email', platform: 'web' }); set({ user: response.user, isAuthenticated: true, isLoading: false }); window.location.href = '/app'; @@ -87,10 +83,6 @@ export const useAuthStore = create()((set) => ({ set({ isLoading: true, error: null }); try { const user = await authApi.getCurrentUser(); - identifyUser(String(user.id), { - email: user.email, - name: `${user.first_name} ${user.last_name}`.trim(), - }); set({ user, isAuthenticated: true, isLoading: false }); } catch { set({ user: null, isAuthenticated: false, isLoading: false });