[codex] Add PostHog telemetry for weekly active users#96
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
flashtype-website | 1d6d83f | Commit Preview URL Branch Preview URL |
Jun 12 2026, 12:17 AM |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit eb7c0e1. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Impact
Flashtype now emits one
app_openedevent per packaged app startup using a stable anonymous install ID stored in Electron userData. PostHog WAU can be tracked as unique users forapp_openedover a weekly interval.Validation
pnpm run build:env-variablespnpm run lintpnpm run typecheckNote
Medium Risk
Introduces outbound analytics on startup and bakes the PostHog project key into release artifacts via CI; failures are non-blocking but privacy and secret-handling in builds should be reviewed.
Overview
Adds PostHog telemetry for packaged macOS builds so weekly active use can be measured from a single
app_openedevent per startup.A new Electron main-process module sends an HTTP capture to PostHog when the app is ready, but only when
app.isPackagedand a token is present. It uses a stable anonymousdistinct_idstored under ElectronuserData(telemetry.json), with race-safe creation via exclusive file write.Build-time wiring:
scripts/write-env-variables.mjsgeneratesbuild/env-variables.mjsfromPUBLIC_POSTHOG_TOKEN/POSTHOG_PROJECT_API_KEY, optionalPUBLIC_POSTHOG_HOST/POSTHOG_HOST, andpackage.jsonversion.package:macandrelease:macrunbuild:env-variablesbefore packaging;electron-builder.ymlships that module in the app bundle. The macOS release workflow passes PostHog secrets/vars into the build step. Generatedbuild/*artifacts are gitignored.Reviewed by Cursor Bugbot for commit 1d6d83f. Bugbot is set up for automated code reviews on this repo. Configure here.