Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export function App() {
const {
hasAcceptedTermsOfService,
analyticsConsent,
language,
setAnalyticsConsent,
shouldShowAnalyticsBanner,
incrementLaunchCount,
Expand Down Expand Up @@ -284,13 +285,14 @@ export function App() {
os: osInfo.os,
os_version: osInfo.os_version,
arch: osInfo.arch,
language,
});
} catch (error) {
launcherStartTracked = false;
console.error('[App] launcher_started tracking failed:', error);
}
})();
}, [analyticsConsent.decision]);
}, [analyticsConsent.decision, language]);

// Fetch notifications when user is logged in
useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions src/store/useThemeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ export const useThemeStore = create<ThemeState>()(
setLanguage: (lang: SupportedLanguage) => {
set({ language: lang });
import("../i18n/i18n").then((mod) => mod.default.changeLanguage(lang));
void import("../services/analytics-service").then(({ trackEvent }) => {
trackEvent("language_changed", { language: lang }).catch(console.error);
});
},

// Analytics consent functions
Expand Down
Loading