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

@@ -421,6 +421,36 @@ export function Settings() {
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Privacy</CardTitle>
<CardDescription>
Help improve Vibe-Kanban by sharing anonymous usage data.
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center space-x-2">
<Checkbox
id="analytics-enabled"
checked={config.analytics_enabled ?? false}
onCheckedChange={(checked: boolean) =>
updateConfig({ analytics_enabled: checked })
}
/>
<div className="space-y-0.5">
<Label htmlFor="analytics-enabled" className="cursor-pointer">
Enable Telemetry
</Label>
<p className="text-sm text-muted-foreground">
Enables anonymous usage events tracking to help improve the
application. No prompts or project information are
collected.
</p>
</div>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Safety & Disclaimers</CardTitle>