feat: PostHog product analytics (#58)

* wip: posthog analytics

* wip: remove posthog-rs crate; call endpoint directly

* make analytics non-blocking

* session start event

* configure analytics for release builds

* remove dev_server_stopped event

* address review comments

* simplify analytics enabled logic

* analytics on by default; send start_session when user enables analytics; new task_attempt_start event

* lower visibility of analytics logs

* chore: bump version to 0.0.37-0

* set analytics to true if previously unset

---------

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Gabriel Gordon-Hall
2025-07-04 16:24:19 +01:00
committed by GitHub
parent 21af641491
commit 2c5eecc845
19 changed files with 452 additions and 35 deletions

View File

@@ -4,7 +4,7 @@
export type ApiResponse<T> = { success: boolean, data: T | null, message: string | null, };
export type Config = { theme: ThemeMode, executor: ExecutorConfig, disclaimer_acknowledged: boolean, onboarding_acknowledged: boolean, sound_alerts: boolean, sound_file: SoundFile, push_notifications: boolean, editor: EditorConfig, github: GitHubConfig, };
export type Config = { theme: ThemeMode, executor: ExecutorConfig, disclaimer_acknowledged: boolean, onboarding_acknowledged: boolean, sound_alerts: boolean, sound_file: SoundFile, push_notifications: boolean, editor: EditorConfig, github: GitHubConfig, analytics_enabled: boolean | null, };
export type ThemeMode = "light" | "dark" | "system" | "purple" | "green" | "blue" | "orange" | "red";