In-depth: PostHog vs Dataflare

In-depth: PostHog vs Dataflare

Contents

PostHog and Dataflare are both open source tools that put web analytics, product analytics, session replay, feature flags, and A/B tests behind one SDK, and both are built to be driven by AI agents; the difference is where each one runs and how far it goes.

  1. Dataflare is an MIT-licensed analytics tool that deploys into your own Cloudflare account with one command: a Worker, a D1 database, and an R2 bucket. There's no hosted version, no vendor account, and no subscription, so you only pay Cloudflare for what it uses. It covers websites and web apps, and it's built for developers who already ship on Cloudflare. It's also brand new: the first public release was in November 2026.

  2. PostHog is your product's context layer. On top of product analytics and web analytics, it includes session replay, feature flags, experiments, error tracking, logs, AI observability, surveys, an AI assistant, and more. A data warehouse and Data Pipelines tie it all together and unify that context into one source agents can read across. You can work with all of it from Slack, the CLI, or your own editor via the MCP. It's built for engineers, AI builders, and product teams.

In this post, we compare features, pricing, self-hosting, and agent access, and say where each one is the better fit.

PostHog vs Dataflare: the short version
  • Choose Dataflare if you're a solo developer or a small team on Cloudflare, your product is a website or web app, and you want the core tools running in your own account, usually for $0 to $5 a month, with no servers to manage and no vendor in the loop.

  • Choose PostHog if you need more than the browser (mobile and server SDKs), more than the core tools (error tracking, logs, AI observability, surveys, a data warehouse, and a CDP), teammates with their own logins and permissions, or a hosted service with support and compliance paperwork.

Both are open source, both have a free way to start, and both give your agents an MCP server.

How is PostHog different?

1. It covers your whole product, not just the browser

Dataflare has one SDK, for the browser, plus an HTTP endpoint for server events. PostHog has SDKs for web, iOS, Android, React Native, Flutter, and server languages including Python, Node, Go, Ruby, PHP, Java, .NET, Rust, and Elixir, so the same user is one person across your site, your app, and your backend. Session replay, feature flags, and experiments work on mobile too.

2. It's a context layer, not just the core tools

Dataflare covers what it calls the core: web and product analytics, replay, flags, and experiments. PostHog adds everything around them:

  • Error tracking for grouping exceptions into issues, with the replay attached
  • Logs for searching what your servers wrote, next to the replay and error they relate to
  • AI observability for tracing LLM generations with their cost, latency, and errors
  • Surveys to capture user feedback, track NPS, and book interviews
  • A data warehouse and CDP to sync in your external data (Stripe, HubSpot, or Postgres, for example) and push it back out

3. Someone else runs it, and your team can join

Dataflare is self-hosted by design. It runs in your Cloudflare account, you sign in with an API key, and upgrades, limits, and data are yours to manage.

PostHog Cloud is hosted in the US or EU, with unlimited team members on the free plan, SSO and role-based access on paid plans, SOC 2 Type 2, and a BAA if you need HIPAA.

It's also free to start. More than 97% of companies use PostHog for free, and startups can get $50,000 in credits. If you'd rather self-host, you can, though Dataflare's version of self-hosting is a lot lighter than ours (more on that below).

Install PostHog with one command

Paste this into your terminal and make AI do all the work.

Learn more
PostHog Wizard hedgehog

Comparing PostHog and Dataflare

Dataflare
Web Analytics
Privacy-focused web analytics with real-time data and no sampling
✓
✓
Product Analytics
Track usage, retention, and feature adoption with comprehensive analytics
✓
✓
Session Replay
Watch real user sessions to understand behavior and fix issues
✓
✓
Feature Flags
Control feature access with precision and safely roll out changes
✓
✓
Experiments
Run statistically rigorous A/B/n tests and validate ideas with confidence
✓
✓
Heatmaps
Visualize where users click and scroll on your website
✓
✗
Surveys
Collect product feedback with no-code surveys and customizable targeting
✓
✗
Error tracking
Track and monitor errors and exceptions in your code
✓
✗
AI Observability
Monitor and debug your LLM-powered features
✓
✗
Logs
Search and analyze your application logs with OpenTelemetry.
✓
✗
Data Stack
Import, query, model & visualize product and third party data together
✓
✗
CDP
Ingest, transform, and send data between 145+ tools
✓
✗

Web analytics

Both cover the essentials: visitors and pageviews, sessions, bounce rate, sources, UTM campaigns, entry and exit pages, and Core Web Vitals. Both can run without cookies.

Dataflare's edge is weight; its browser SDK is about 4 KB gzipped, and it can be served from your own domain so ad blockers are less likely to catch it.

PostHog adds value by integrating web analytics with other features: the same events feed product analytics, session replay, and experiments, and a reverse proxy does the same first-party job.

Dataflare
Pageviews
Track visitors and their views
✓
✓
Sessions
Track unique sessions and their durations
✓
✓
Traffic breakdown
See where your visitors and conversions are coming from
✓
✓
UTM tracking
Track marketing campaigns with UTM tags
✓
✓
Bounce rate
See the percentage of users that leave after one pageview
✓
✓
Entry and exit paths
See the pages users first visit and the last ones before they leave
✓
✓
Conversions
Track actions you want users to take
✓
Event goals
Outbound clicks
See the links that take users away
✓
As an event property
Web vitals
Monitor the performance of your website
✓
✓
Cookieless tracking
Track users without cookies
✓
✓
Snippet install
Install HTML snippet
✓
✓
Script size
Size of the script that runs on your site
56.8 kb
~4 KB gzipped

Product analytics

Both offer trends, funnels, retention, user profiles, and SQL on your raw events. Dataflare shows the SQL behind every chart, which is a nice touch for you and for your agent.

PostHog goes deeper. Autocapture records every click, input, and form submission rather than links and buttons only, and you get user paths, lifecycle, stickiness, group analytics for B2B products, custom formulas, and alerts. Paths, stickiness, lifecycle, and alerts are on Dataflare's roadmap.

Dataflare
Free usage
Monthly free tier
1 million events
No fee; you pay Cloudflare for usage
Core features
Autocapture
Capture events without manual tracking
✓
Pageviews, link and button clicks
Custom events
Manually capture custom events and properties wherever they happen
✓
✓
User profiles
Track personally-identifiable user info like name, email, and usage data
✓
✓
Cohorts
Combine users based on properties and events for group analysis
✓
As query filters
SQL query editor
Write SQL queries directly against your data without a separate data warehouse
✓
Read-only SQL
Alerts
Alert when types of events happen
✓
✗
Insights & visualizations
Graphs & trends
Build custom insights and visualizations
✓
✓
Funnels
Track users through a sequence of events to find drop-off and improve conversion
✓
✓
Retention
Track user retention over time to understand how long users stay with your product
✓
✓
User paths
Understand how users navigate through your product and where they get stuck
✓
✗
Lifecycle
Track user lifecycle to understand how users interact with your product
✓
✗
Stickiness
Track user stickiness over time to understand how long users stay with your product
✓
✗
Group analytics
Track metrics at a company and account level
✓
✗

Session replay

Both record web sessions with console logs and network requests alongside, and both mask inputs. Dataflare's replay is off until you set a sample rate, and it can keep the last minute in memory and upload it only when an error happens.

It also turns every session into a text transcript of the pages, clicks (with their CSS selectors), errors, and failed requests, so a coding agent can read what happened.

PostHog adds mobile replay for iOS, Android, React Native, and Flutter, canvas recording, a DOM explorer, performance monitoring, and heatmaps.

And you don't have to watch every recording: Replay Vision runs AI scanners across them to flag dead ends and frustration, and logs what it finds as events you can chart or alert on. The first 2,500 credits a month are free.

Dataflare
Free usage
Monthly free tier
5,000 web recordings, 2,500 mobile recordings
No fee; recordings stored in your R2 bucket
Supported platforms
Web app recordings
Capture recordings from single-page apps and websites
✓
✓
Mobile app recordings
Capture recordings in iOS and Android apps
✓
✗
Analysis tools
Console logs
Capture console output from the browser for debugging
✓
✓
Network monitoring
Monitor network activity during sessions
✓
✓
Heatmaps
Visualize where users click in your app or website
✓
✗
AI summaries
AI-generated summaries of session recordings
✓
Text transcript for your agent
AI scanners across recordings
Point configurable AI scanners at many sessions to flag dead ends, frustration, intent, and outcomes, with citations to the exact moment in each recording
✓
Via your own agent
Recording controls
Conditional recording
Only capture the sessions you want based on conditions
✓
On error, or from code
Privacy masking for sensitive content
Automatic and manual masking of sensitive user data
✓
✓
Sample recorded sessions
Restrict the percentage of sessions that will be recorded
✓
✓
Canvas recording
Capture canvas elements in your app
✓
✗
Recording retention policy
Configure how long recordings are stored before deletion
Up to 5 years
30 days by default, configurable

Feature flags

Both have boolean and multivariate flags, percentage rollouts, and targeting on person properties and location. Dataflare evaluates flags in your own Worker, so rules that mention person properties never reach the browser.

PostHog flags also carry JSON payloads for remote config, target cohorts and groups, can be scheduled, and work in mobile and server SDKs with local evaluation.

Dataflare
Free usage
Monthly free tier
1 million API requests
No fee; evaluated in your Worker
Flag types
Boolean flags
Simple on/off flags to enable or disable features
✓
✓
Multivariate flags
Test multiple variants of a feature in a single flag
✓
✓
Payloads
Pass structured data (strings, numbers, or JSON objects) to variants for dynamic configuration without code changes
✓
✗
Targeting
Percentage-based rollouts
Roll out features gradually to a percentage of users
✓
✓
Custom targeting
Target features based on user properties and attributes
✓
✓
Geographic targeting
Limit flags to specific countries or regions based on IP address
✓
Country
Target by cohorts
Target features to specific user segments or behavioral cohorts
✓
✗
Group-level targeting
Run flags at the organization, account, or team level for B2B products
✓
✗
Implementation
SDK support
Full support across all major SDKs including JavaScript, Python, Ruby, and more
✓
Browser SDK only
API access
Evaluate flags programmatically using PostHog API
✓
✓

Experiments

In both tools, an experiment is a flag plus a goal. Dataflare's stats are strong for such a young product: a Bayesian model for conversion rates, Welch's t-test for value metrics, and a sample ratio check that refuses to declare a winner when the split looks broken. It documents one goal event per experiment.

PostHog lets you choose Bayesian or frequentist statistics and adds funnel, ratio, and count metrics, secondary metrics, holdouts, a shared metrics library, and experiments on mobile and on data warehouse tables.

Dataflare
Free usage
Monthly free tier
1 million API requests
No fee; runs in your Worker
Supported platforms
Web experiments
Run experiments on your website or app
✓
✓
Mobile experiments
Supports Android, iOS, React Native, and Flutter
✓
✗
Metrics & analysis
A/B testing
Compare two versions of a feature or flow using count, value, funnel, or ratio metrics
✓
✓
Custom goals
Define your own goals and metrics to track
✓
One goal event
Statistical significance
Automatic calculation of statistical significance with configurable confidence levels
✓
✓
Statistics engine
How the results of an experiment are calculated
Bayesian or Frequentist
Bayesian

Error tracking, logs, and AI observability

This is where the two stop overlapping. Dataflare captures uncaught JavaScript errors as events and shows them in replays with their stack frames, but it has no error tracking product, no logs, and no AI observability.

In PostHog, error tracking groups exceptions into issues with source maps, alerts, and the replay attached. Logs sit next to the session and error they belong to. AI observability captures every LLM generation with its tokens, cost, latency, and output, and lets you run evals on production traffic or A/B test a prompt behind a feature flag.

AI and MCP

Both tools assume an agent will do much of the querying, and both give it an MCP server.

  • Dataflare runs its MCP server on your own Worker. Setup writes an AGENTS.md, a Claude Code skill, and an MCP config into your repo, so your coding agent can query trends, funnels, retention, people, and replays, run read-only SQL, and create flags and experiments right away. Every result comes back with its SQL and a dashboard link, and there's a read-only key for agents that shouldn't change anything. There's no built-in assistant, so you bring your own agent.

  • PostHog has PostHog AI for questions, SQL, and fixes (500 credits a month free), a free MCP server with a read-only mode, a Slack app you can tag in a thread, a CLI, Replay Vision for scanning recordings in bulk, and Scouts that watch your data and send reports to an Inbox where agents open PRs.

Install PostHog with one command

Paste this into your terminal and make AI do all the work.

Learn more
PostHog Wizard hedgehog

Platform and SDKs

Dataflare
Open source
Audit code, contribute to roadmap, and build integrations
✓
✓
Self-host option
Deploy and run on your own infrastructure
✓
✓
Hosted cloud
A managed service you do not run yourself
✓
✗
EU hosting
Access and store your data in the EU
✓
Optional EU storage
Reverse proxy
Avoid tracking blockers and capture more data
✓
First-party route option
Client-side SDKs
Capture events and use features from JavaScript, React, and more
✓
✓
Server-side SDKs
Capture events and use features from Python, Node, and more
✓
HTTP endpoint only
Mobile SDKs
Capture events and use features from Android, iOS, and more
✓
✗
API
Capture events, get stats, and make changes via API
✓
✓
SQL
Query flag and product data directly via SQL
✓
Read-only
MCP scope
How much of the platform agents can reach through the MCP server
Every product, read and write
Analytics, replays, flags, experiments
Agent surfaces
Where you can steer agents from
App, Slack, desktop, CLI, MCP, editor
MCP, CLI, HTTP API
Collaboration
Share your projects and sites with teammates
Invite teammates to collaborate on all features
Shared API keys

How does self-hosting PostHog compare to Dataflare?

Self-hosting is where Dataflare is at its best. One command creates a Worker, a D1 database, and an R2 bucket in your Cloudflare account, and that's the whole deployment: no servers, no Docker, and upgrades that ship from CI.

Self-hosted PostHog is a different proposition. It's the same MIT-licensed product we run on PostHog Cloud, deployed with Docker Compose on a VM with around 4 vCPU and 16 GB of RAM. We don't offer support or guarantees for it, paid-plan features are Cloud-only, and we recommend PostHog Cloud for almost everyone.

So if "it must run in my own account" is the requirement and you're on Cloudflare, Dataflare is the lighter way to get there.

That said, you don't need to self-host PostHog to use it with Cloudflare. PostHog works in Cloudflare Workers, and you can proxy it through Cloudflare so events are sent from your own domain.

Price comparison

PostHog pricing philosophy

PostHog charges based on usage. Every product has a free monthly allowance, and past that you pay published per-unit rates, with billing limits you can set per product. The price covers the infrastructure, upgrades, and support, and we've written up what you pay for per event.

Dataflare pricing philosophy

Dataflare doesn't charge anything. There's no subscription and no per-event price. Cloudflare bills you for the Worker requests, D1 rows, and R2 storage Dataflare uses, and by its own estimate a small site fits Cloudflare's free plan and most others fit the $5 a month Workers Paid plan, which you may already be paying.

PostHog and Dataflare pricing comparison

PostHogDataflare
Free plan1M events, 5,000 web + 2,500 mobile replays, 1M flag requests, 100k errors, 10 GB logs, 1M warehouse rows, and 1,500 survey responses a monthThe software is free. Cloudflare's free plan covers small sites: 100,000 Worker requests and 100,000 D1 row writes a day, 500 MB per database
Users on the free planUnlimitedNo user accounts. One admin key and one read-only key
Paid plansNo base fee; usage-based per product, with a billing limit you can set per productNone. Cloudflare's Workers Paid plan is $5 a month and includes 10M requests and 50M D1 row writes
Public pricingYes, with a calculatorYes: Cloudflare's list prices, with a calculator
Startup program$50k in credits for 12 months (under 2 years old, under $5M raised)Not applicable
Self-hostingFree (MIT, open core) with Docker Compose on your own VM, unsupportedThe only option: serverless, in your own Cloudflare account
Who runs itPostHog, in the US or EUYou

Security and compliance

With Dataflare, your data never leaves your own Cloudflare account. IP addresses aren't stored, and there's a cookieless mode, a consent API, and a command to delete a person. That's a strong privacy position, with no processor in the loop beyond Cloudflare.

What it doesn't have is the organizational layer. There are no user accounts, SSO, or roles: you sign in with an admin key or a read-only key (Cloudflare Access support is on its roadmap). There are no compliance statements either, because there's no vendor to make them. Whether your deployment meets GDPR or HIPAA is yours to work out.

PostHog Cloud is SOC 2 Type 2 certified and GDPR-ready with US and EU hosting, signs BAAs on its platform packages, and has SSO, role-based access, and audit logs on paid plans.

Dataflare
Cookieless tracking option
Track users without cookies
✓
✓
Data anonymization
Anonymize user data for privacy
✓
IP addresses never stored
User privacy options
Anonymize users, drop personal data
✓
Cookieless mode, consent API, person deletion
Bot blocking
Block scrapers, crawlers, and other unwanted traffic from stats
✓
✓
Role-based access control
Control access to features and data based on user roles and permissions
Enterprise
Admin and read-only keys
SAML/SSO
Use SAML or single sign-on authentication
Scale
✗
2FA
Enforce login with two-factor authentication
✓
✗
SOC 2 Type 2
SOC 2 security certification
✓
✗
GDPR-ready
Can be compliant with GDPR
✓
Self-managed

When to choose PostHog vs Dataflare

Recommendations by team type

For solo developers and side projects on Cloudflare

  • Dataflare – One command + no servers + a bill that's usually $0 to $5 a month is a great combo. PostHog's free tier is the alternative if you'd rather not run anything, even something this small.

For product and engineering teams

For mobile apps

  • PostHog – SDKs and session replay for iOS, Android, React Native, and Flutter. Dataflare has no mobile SDKs.

For teams building AI features

  • PostHog – AI observability traces every LLM generation with its cost, latency, and errors, tied to the user's session replay, with 100k AI events a month free. Dataflare has no equivalent.

For teams that work mostly through coding agents

  • Tied – Both are built for it. Dataflare writes the agent setup into your repo on install and returns the SQL with every answer. PostHog gives the agent far more to read, and adds Slack, the CLI, and agents that open PRs on their own.

For privacy-conscious and regulated organizations

  • PostHog if you need a vendor with SOC 2 Type 2, a DPA, EU hosting, and a BAA. Dataflare if the requirement is that no third party holds the data at all and you're prepared to own compliance yourself.

For early-stage startups

  • PostHog – Generous free tiers on every product, $50k in credits if you qualify, and nothing to migrate when you add a mobile app, a second engineer, or an AI feature.

Install PostHog with one command

Paste this into your terminal and make AI do all the work.

Learn more
PostHog Wizard hedgehog

Frequently asked questions

What does it mean for PostHog to be your product's context layer?

Dataflare can tell you what a visitor did on your site, show you the replay, and tell you which flag they saw. PostHog knows that too, plus what broke, what your server logged, what your LLM said to them, what they told you in a survey, and what they pay you, across web, mobile, and backend. That's because product analytics, session replay, error tracking, feature flags, logs, and AI observability all write to the same place and share one model of users and sessions.

The data warehouse and CDP extend that to the business data that lives elsewhere, like Stripe, HubSpot, and Postgres. It's synced in, and anything can be pushed back out. As a result, a question like "did the users who hit this error last week churn, and what were they paying us?" is one SQL query, and an agent working from Slack, the web app, or your editor via the MCP sees your product as a whole.

PostHog says it makes your product "self-driving" – what does that mean?

It means PostHog digs through your product data, finds what's worth fixing, and has agents do the work.

It starts with the context layer described above: every product writes to one place, and the data warehouse unifies it into a single source agents can read across. From there, Scouts read across all of it and sort what's worth knowing from what's just noise. What clears the bar becomes a report in your inbox: an agent picks it up, roots out the cause, and opens a PR. You review and merge.

You can steer it from Slack, the web app, or your own editor via the MCP or CLI.

What are the main differences between PostHog and Dataflare?
  • Where it runs: PostHog is a hosted cloud (US or EU) that you can also self-host; Dataflare only runs in your own Cloudflare account
  • Scope: Dataflare covers web analytics, product analytics, session replay, feature flags, and A/B tests; PostHog adds error tracking, logs, AI observability, surveys, a data warehouse, and a CDP
  • Platforms: Dataflare has a browser SDK and an HTTP endpoint; PostHog has web, mobile, and server SDKs
  • Pricing: PostHog has a free tier and then usage-based pricing per product; Dataflare is free, and you pay Cloudflare for what it uses
  • Teams: PostHog has user accounts, roles, and SSO; Dataflare has an admin key and a read-only key
  • Maturity: PostHog has run in production for years at very large scale; Dataflare's first release was in November 2026
What are the main similarities between PostHog and Dataflare?
  • Both are open source under the MIT license (PostHog is open core)
  • Both combine web analytics, product analytics, session replay, feature flags, and A/B tests on one event stream
  • Both let you query your raw events with SQL
  • Both have an MCP server that lets agents query data and manage flags and experiments, plus a CLI
  • Both offer cookieless tracking and can be served from your own domain
Can Dataflare replace PostHog?

It depends on how much of PostHog you use. For a website or web app that only needs the basics, Dataflare covers trends, funnels, retention, replay, flags, and A/B tests, and event names and properties carry over if you switch. It's a young project, though, and its migration steps don't cover historical data.

It's not a like-for-like replacement if you rely on mobile or server SDKs, error tracking, logs, AI observability, surveys, the data warehouse, group analytics, user paths, or team accounts with SSO and permissions.

Is PostHog cheaper than Dataflare?

Under PostHog's free tier, both cost nothing: PostHog's first 1M events, 5,000 recordings, and 1M flag requests each month are free. Beyond that, Dataflare's Cloudflare bill will usually be lower than PostHog's usage-based pricing, and is often just $5 a month.

It's worth considering what's included; with PostHog you're paying for a hosted service with support, team accounts, compliance, and every other product on the same data. With Dataflare, you run it, and you'll need other tools for the things it doesn't cover.

Is Dataflare ready for production?

Dataflare describes itself as "new (0.x) and used in production by its authors." Its first public release was in early November 2026, and it shipped more than ten releases in its first week. It's MIT-licensed and covered by automated tests, but it doesn't yet have a long track record or a company behind it. That's fine for a side project and worth weighing for anything business-critical.

Is Dataflare made by Cloudflare?

No. Dataflare is an independent open source project that runs on Cloudflare's developer platform, and it isn't affiliated with Cloudflare. It's also different from Cloudflare Web Analytics, Cloudflare's own free traffic dashboard, and from a couple of unrelated products that share the Dataflare name. This post is about the analytics tool at dataflare.dev.

Can I run PostHog on Cloudflare?

Not PostHog itself, which needs more than a Worker and a D1 database to run. But you can use PostHog in apps deployed on Cloudflare Workers, and route events through a Cloudflare reverse proxy so they're sent from your own domain.

Does Dataflare work for mobile apps?

Not natively. Dataflare has a browser SDK and an HTTP endpoint you can post events to from a backend, but no mobile SDKs and no mobile session replay. PostHog has SDKs and replay for iOS, Android, React Native, and Flutter.

How do I move from Dataflare to PostHog?

Run the PostHog wizard to install the SDK, then swap your capture, identify, and flag calls for their PostHog equivalents. Your event names and properties can stay the same. Dataflare stores events in a D1 database in your own account, so you can export them and import your history with PostHog's historical migration API.

PostHog is your product's context layer. With a full suite of developer tools – AI observability, product analytics, session replay, feature flags, experiments, error tracking, logs, and more – PostHog ingests and stores all the data agents need to diagnose problems, uncover opportunities, and ship fixes. A data warehouse and CDP tie it all together, unifying that context into one source agents can read across. You can steer it all from Slack, the web app, the desktop (PostHog Desktop), or your own editor via the MCP.

Community questions