Skip to content

chore: Analytics cleanup#3581

Merged
isTravis merged 7 commits intomainfrom
tr/analytics-cleanup
Apr 20, 2026
Merged

chore: Analytics cleanup#3581
isTravis merged 7 commits intomainfrom
tr/analytics-cleanup

Conversation

@isTravis
Copy link
Copy Markdown
Member

Now that the PG analytics migration is live (~19M rows imported, matviews populated, /api/ev endpoint receiving events), this PR removes the leftover Stitch/Redshift plumbing and adds a skeleton loading state to the Impact dashboard.

Stitch removal

  • Client sends to one endpointplugin.ts now only beacons to /api/ev (removed the dual-write to /api/analytics/track which was Fastly-rewritten to an AWS Lambda)
  • Removed isProd from all client analytics payloads (usePageOnce.ts, Download.tsx) — the server was already stripping it via DROPPED_FIELDS
  • Removed /api/analytics/track from middleware allowlists (readOnlyMiddleware.ts, communityBanGuard.ts) — that path never reached Express
  • Removed STITCH_WEBHOOK_URL and AM_REDSHIFT_* env vars from envSchema.ts, .env.test, ENV.md, env.example
  • Updated README.md — data flow diagram, endpoint paths, removed one-time migration section, updated file map

Skeleton loading

  • Replaced the <Spinner> loading state on the Impact dashboard with a skeleton that mirrors the actual layout (stat cards, chart area, table grids)
  • Pulsing animation, dark mode support
  • Removed the temporary SHOW_MIGRATION_BANNER constant and <Callout> block

Kept

  • tools/migrateRedshift.ts — retained for historical reference (consistent with existing pattern of keeping past migration tools). Updated header docs.
  • DROPPED_FIELDS in server/analytics/api.ts — keeps accepting isProd, communityName, etc. from cached clients gracefully

@isTravis isTravis merged commit d0a481d into main Apr 20, 2026
1 check passed
@isTravis isTravis deleted the tr/analytics-cleanup branch April 20, 2026 16:16
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