Every time a user clicks a feature, you want to know: Which features drive retention? Where do funnels leak? Who are your power users? Mixpanel and Amplitude answer these questions, but they'll cost you $400–$2000/mo depending on event volume. If you're running a small-to-mid SaaS, that's a tax on growth you can't justify.
Velocity X's events system flips the script: log button_click, page_view, feature_used events directly into a Supabase table. Query funnels in SQL. Build dashboards on top. Zero vendor lock-in. Zero monthly bill. The tradeoff is you own the infrastructure — but for a 20-person startup logging 1M events/month, that tradeoff is math.
Why Event Tracking Beats Guessing
Without events, you're flying blind. You see pageviews, but not which features users actually tried. You see churn, but not where in the flow they dropped. You can't answer "which 3 features drive LTV?" without instrumenting the product first.
Event tracking inverts the problem: you log every action, then ask questions of the data. A power user becomes observable — 40 searches/day, 15 saved deals, 8 exports. A churned user becomes a pattern — logged in once, clicked pricing, never came back. Funnels become visible: 100 free signups → 30 activate feature A → 8 purchase. Once you have the data, the business questions practically answer themselves.
The Architecture
Events Table. Supabase Postgres table with user_id, event_name, metadata (JSON), and created_at. RLS locked so users see only their own events (admin unrestricted). Event names are enums: button_click, page_view, feature_used, error_logged. Metadata is where context lives — which button, which page, which feature, which error.
Lightweight Client SDK. A 200-line hook in your React app: useTrack(). Call it wherever you need events. It batches events in-memory and POSTs them every 10 seconds (configurable) to a Supabase RPC function. If the user leaves before a batch posts, the beforeunload hook flushes them. Retries on 5xx, silently fails on network errors (don't break the UI for analytics).
Query Patterns. Funnels are SQL: count users at each step, compute drop rate. Retention is a self-join: WHERE created_at BETWEEN day1 AND day1+30 GROUP BY user_id HAVING COUNT(DISTINCT DATE(created_at)) > 15. Cohorts are one WHERE clause. Dashboards are Recharts on top. The friction is gone — no waiting for Mixpanel's UI, no export delays.
Mixpanel vs DIY — The Reality Check
Mixpanel wins on: Pre-built funnels UI, advanced cohort builder, real-time dashboards, predictive churn scoring. Team of 50+ engineers supporting features. If your business is analytics-first (e.g., marketing agency selling insights), the UX payoff is worth $400/mo.
DIY wins on: Cost (literally $0), cross-CRM queries (join events with Stripe customers, Pipedrive leads), data ownership, latency (SQL is instant, no sync delays), and extensibility (want a custom funnel metric? It's a 2-minute SQL tweak). PostHog is the middle ground — self-hostable, free, but more operational overhead and feature-flagging cruft you may not need.
The Catch
You own the storage, query optimization, and instrumentation. If your events table hits 100M rows and queries get slow, you're rewriting indexes, not filing a support ticket. You have to remember to track events — it doesn't auto-instrument like Mixpanel does. And if you want advanced features (predictive churn, machine-learning cohorts), you're rolling them yourself or bolting on a second tool.
The pattern works at 1M–50M events/month. Beyond that, storage + query cost creep up; Mixpanel becomes justifiable. Below 1M/month, the math is insane: Mixpanel's base plan or $0 for Supabase and 4 hours of setup.
Frequently Asked Questions
How do I handle PII in events?
Don't log it. Track user_id, not email. Log plan_tier, not credit card. RLS locks the table so user 123 can't query user 456. If you accidentally log PII, Supabase has purge tools — use them.
What if I need real-time dashboards?
Supabase Realtime subscriptions work on the events table. Query 15 min of recent events, subscribe to new ones, stream into a React component. Latency is ~200ms. Mixpanel is similar. Neither is true real-time (that's for trading floors, not SaaS).
Can I use this with a headless CMS or static site?
Yes — events are HTTP. Any client can POST JSON. Desktop apps, mobile, CLI tools. Just validate the signature server-side so strangers can't spam your events table.
How do I know if this is right for my product?
If you're asking "which features do users love?", event tracking is essential. If you're asking "how many people visited our homepage?", GA4 is enough. If you're building a data product and selling insights, Mixpanel's UX is worth it.
The Bottom Line
Event tracking is a leverage point for any early-stage product team. Mixpanel is an enterprise tool masquerading as a startup tool. For sub-$1M ARR, build it yourself in Supabase — 4 hours now, infinite ROI when you realise your cohort analysis is wrong and need to re-run it instantly. The pattern lives in our pricing guide. Same RLS model, same batch insertion, same extensibility you see in the unified analytics dashboard. Once you own your event data, you stop guessing.