# DataFast vs PostHog for Next.js

Both are analytics batteries. A repo takes one of them, not both.

| | DataFast | PostHog |
| --- | --- | --- |
| What it is | Revenue-first web analytics. The DataFast script loads from your own origin after hydration. A route handler forwards events, so ad blockers have no hostname to match. Goals are typed against a catalogue and stripped of personal data. Server-side goals go through the Goals API after the response. With Stripe, Polar or Dodo selected, every checkout carries the visitor id in its metadata. Revenue lands on the channel that earned it. | Product analytics with a typed event catalogue. The browser client captures page views on App Router navigations. The server client flushes with `after()`, so events go out before the serverless function exits. Identity helpers refuse to send PII. An /ingest reverse proxy sends events through your own domain, so fewer get blocked. |
| Pricing | No free plan. A 14-day trial with no card. Starter is $9/month (1 site, 1 team member) and Growth $19/month (30 sites, 30 team members), both at 10k monthly events. Go over and tracking continues, but you must upgrade to open the dashboard. API, CLI and MCP access are on both plans. | Free every month, card or not: 1M analytics events, 5,000 session recordings and 1M feature flag requests. Past that, each product bills by usage, and you can set a billing limit per product. Self-hosting exists, but PostHog does not support it. |
| Best for | Indie hackers and small SaaS teams who want one answer: which referrer, campaign or page produced revenue. Checkout attribution is wired for Stripe, Polar and Dodo. One script tag, no event plan needed on day one. | Product teams who want funnels, retention, replay, flags, experiments and surveys on one event stream. One stream means one definition of "active user", not four. Good for early-stage teams, and SQL access answers the questions the dashboards cannot. |

- [Build with DataFast](https://agenticboilerplate.com/build?b=datafast)
- [Build with PostHog](https://agenticboilerplate.com/build?b=posthog)

---

Agentic Boilerplate: A Next.js repo your agent already knows. Free during launch, then $99 once.

- Site map for agents: https://agenticboilerplate.com/llms.txt
- Public API: https://agenticboilerplate.com/openapi.json
- Contact: agenticstudio@gmail.com
