Skip to content

Stop sending analytics to PostHog; D1 is the only store - #78

Merged
yaacovcorcos merged 2 commits into
mainfrom
claude/retire-posthog-export-20261117
Nov 17, 2026
Merged

yaacovcorcos merged 2 commits into
mainfrom
claude/retire-posthog-export-20261117

Conversation

@yaacovcorcos

Copy link
Copy Markdown
Contributor

Stops every copy of analytics to PostHog. Our D1 database becomes the only analytics store.

  • Removed: desktop and website event export, identity-link export, the export cron jobs, PostHog dashboard, reconcile and HogQL scripts, and the DESKTOP_POSTHOG_EXPORT_ENABLED / POSTHOG_PROJECT_TOKEN config.
  • Kept: installation deletions still reach PostHog for events sent before today. That code goes when the PostHog project is deleted.
  • Reports: analytics:report no longer lists PostHog delivery. The rows that were never exported are not reported as a backlog.
  • Privacy page: usage is no longer copied to PostHog; analytics include the names of websites opened in Scient's built-in browser.

D1 still has the history: its oldest event (2026-07-20) is also the oldest one sent to PostHog. 22 rows are gone from D1: expired failure records and 3 completed erasures. No deletion requests are pending or blocked.

Platforms: server-side only (Cloudflare Worker and static pages). No difference between macOS, Windows and Linux clients.

Checks: bun run check passes (162 tests). Codex light review found no issues. The opt-in desktopPipeline test fails the same way on unmodified main, because it builds from a desktop checkout on another branch.

Documentation impact: Updated — README.md, src/pages/privacy.astro

🤖 Generated with Claude Code

yaacovcorcos and others added 2 commits November 17, 2026 03:07
Remove the desktop and website event export, the identity-link export and
the PostHog-only operator scripts (dashboards, API client, HogQL insights,
D1-vs-PostHog reconciliation). Nothing is sent to PostHog any more.

Installation erasure still deletes copies PostHog already holds, using
POSTHOG_PERSONAL_API_KEY and POSTHOG_PROJECT_ID under its own lease. That
is the only remaining PostHog code and goes once the PostHog project is
deleted. POSTHOG_PROJECT_TOKEN and DESKTOP_POSTHOG_EXPORT_ENABLED are no
longer read, /health drops the forwarding fields, and the analytics report
no longer treats posthog_state='pending' as a delivery backlog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…owser sites

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Deploying scientfactory-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: a7b5d72
Status: ✅  Deploy successful!
Preview URL: https://50031301.scientfactory-website.pages.dev
Branch Preview URL: https://claude-retire-posthog-export.scientfactory-website.pages.dev

View logs

@yaacovcorcos
yaacovcorcos merged commit 8bd3807 into main Nov 17, 2026
2 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/retire-posthog-export-20261117 branch November 17, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant