Softwr

Business Intelligence · head to head

PostHog vs Sourcegraph

PostHog logo

PostHog

Business Intelligence

The single platform to analyze, test, observe, and deploy new features

From
Free
Free plan
Yes
Sourcegraph logo

Sourcegraph

Developer Tools

Code search and intelligence platform for large codebases with Cody AI assistant

From
$16000/year
Free plan
No

The short version

  • PostHog is an open-source product analytics platform; Sourcegraph is an enterprise code intelligence platform.
  • PostHog is free; Sourcegraph starts at $16000/yr.
  • Where PostHog falls short: the free tier covers 1M events, 5K web session recordings and 2.5K mobile recordings per month before usage-based billing starts.
  • Where Sourcegraph falls short: enterprise pricing starting at $16k annually creates significant barrier for small teams.

How do PostHog and Sourcegraph differ?

PostHog and Sourcegraph differ on starting price (Free against $16000/year), pricing model (Usage-based against Subscription) and free tier (Yes against No). Only the attributes on which PostHog and Sourcegraph actually diverge.

Attributes where PostHog and Sourcegraph differ
AttributePostHogSourcegraph
Starting priceFree$16000/year
Pricing modelUsage-basedSubscription
Free tierYesNo
PlatformsWeb, iOS, Android, APIWeb, Self-hosted
CategoryBusiness IntelligenceDeveloper Tools
Founded20202013

Which features does each one have?

They share no listed features; 20 appear only for PostHog. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in PostHog

  • Product analytics
  • Session recording
  • Feature flags
  • A/B testing
  • Heatmaps
  • SQL access
  • Data warehouse
  • Apps platform

Only in Sourcegraph

Nothing recorded that PostHog does not also cover.

What is each one used for?

PostHog is most often brought in for product analytics; Sourcegraph for large-scale code migrations across hundreds of repositories. The jobs each tool is most often brought in to do.

PostHog

  • Product analyticsnot Sourcegraph
  • Feature experimentationnot Sourcegraph
  • User behavior trackingnot Sourcegraph
  • A/B testingnot Sourcegraph
  • Debug production issuesnot Sourcegraph

Sourcegraph

  • Large-scale code migrations across hundreds of repositoriesnot PostHog
  • Enterprise governance and code ownership trackingnot PostHog
  • AI-assisted bug hunting and security pattern detectionnot PostHog
  • Onboarding engineers into large unfamiliar codebasesnot PostHog
  • Regulatory compliance and code audit trailsnot PostHog

Where do PostHog and Sourcegraph fall short?

PostHog's most cited limit: accounts without a card on file are limited to 1 project; adding one raises it to 6. Sourcegraph's: enterprise pricing starting at $16k annually creates significant barrier for small teams. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

PostHog

  • The free tier covers 1M events, 5K web session recordings and 2.5K mobile recordings per month before usage-based billing starts
  • Accounts without a card on file are limited to 1 project; adding one raises it to 6
  • Data retention is 1 year until a card is added, which extends it to 7 years
  • Support is community-only until the account is on a paid plan
  • Error tracking is capped at 100K exceptions and surveys at 1500 responses per month on the free tier

Sourcegraph

  • Enterprise pricing starting at $16k annually creates significant barrier for small teams
  • No free tier or standard plan published; all options require custom sales engagement
  • Complex enterprise-only positioning limits adoption compared to GitHub Copilot's pervasiveness
  • Requires indexing entire codebase; not suitable for small or ephemeral projects

How much do PostHog and Sourcegraph cost?

PostHog is free to use; Sourcegraph starts at $16000/yr. Plan by plan below, from each vendor's own pricing page.

PostHog

Free
  • FreeFree
    • 1M events/month
    • 5K sessions/month
    • Unlimited users
  • PaidOn request
    • $0.00031/event
    • $0.005/session
    • Advanced permissions
  • EnterpriseOn request
    • SAML SSO
    • Advanced security
    • Dedicated support

Sourcegraph

$16000/year
  • Enterprise$16,000/yr
    • Scales with team size
    • Credits for AI features per user
    • Deep Search

Which should you pick?

Choose PostHog if

  • You need product analytics.
  • You want to start without paying.
  • You work on Web, iOS, Android, API.
  • You also want session recording.

Choose Sourcegraph if

  • You work on Web, Self-hosted.

Questions people ask

Is PostHog or Sourcegraph better?
It depends on the job. PostHog fits product analytics; Sourcegraph fits large-scale code migrations across hundreds of repositories. PostHog starts at Free and Sourcegraph at $16000/year.
Which is cheaper, PostHog or Sourcegraph?
PostHog has a free tier; the other does not. Paid plans start at Free for PostHog and $16000/year for Sourcegraph.
Does PostHog or Sourcegraph run on more platforms?
PostHog runs on Web, iOS, Android, API. Sourcegraph runs on Web, Self-hosted.
Can I use PostHog for free?
Yes. PostHog has a free tier, so you can try it without paying. Sourcegraph starts at $16000/year.
What is PostHog best used for?
PostHog is most often used for product analytics, feature experimentation, user behavior tracking, a/b testing. Of those, product analytics and feature experimentation are not what Sourcegraph is typically brought in for.
What can PostHog do that Sourcegraph cannot?
PostHog covers Product analytics, Session recording, Feature flags, A/B testing.

Answered from the vendors’ own pages

PostHog: What does PostHog's free tier include per month?

PostHog free tier includes: 1M analytics events, 5K session replays, 1M feature flag requests, 100K error tracking exceptions, 1,500 survey responses, 1M data warehouse rows, 10K data pipeline events, 100K AI observability events, 500 PostHog AI credits, 10K workflow messages, and 10GB log ingestion. Source: https://posthog.com/pricing

Source
Sourcegraph: How much does Sourcegraph cost?

Sourcegraph's pricing page lists a single Enterprise plan starting at $16K, which it describes as a minimum annual contract. The price includes credits for AI features and scales with team size. Volume pricing is available through sales.

Source
PostHog: How much data retention does PostHog provide on paid plans?

PostHog free tier provides 1-year data retention. Pay-as-you-go plans offer 7-year data retention across all projects, enabling longer historical analysis. Source: https://posthog.com/pricing

Source
Sourcegraph: Does Sourcegraph have a free plan?

The pricing page lists only the Enterprise plan and a Contact sales button, with no free or self-serve tier shown. Its FAQ includes a question about a free trial, but the answer was not visible in the page text. Sourcegraph does offer a public code search across more than 1M public repositories.

Source
PostHog: What percentage of PostHog users stay on the free tier?

PostHog states that 97% of companies use PostHog for free, indicating extensive free tier adoption. However, specific per-unit pricing rates for overages on paid plans are not published. Source: https://posthog.com/pricing

Source
Sourcegraph: Can Sourcegraph be self-hosted?

Yes. The Enterprise plan includes single-tenant cloud, and the page also lists self-hosted as a deployment option. Enterprise admin and security controls are part of the plan.

Source
PostHog: When does PostHog provide priority support on paid plans?

PostHog provides email or Slack support for accounts exceeding $2,000/month on pay-as-you-go plans. Specific response times and support SLAs are not detailed on their pricing page. Source: https://posthog.com/pricing

Source
Sourcegraph: How do Sourcegraph AI credits work?

Credits for AI features are included per user and can be pooled across the organisation. The pricing page states there is no monthly credit expiry, that purchased credit buckets roll over on renewal, and that larger volume credit buckets are an add-on.

Source
Sourcegraph: Does Sourcegraph work with AI coding agents?

Sourcegraph offers a full MCP server, plus GraphQL and REST APIs and a CLI. The pricing page says it works with Claude Code, Cursor, Codex, Amp and more, giving agents context from the indexed codebase.

Source
Share

Related pages

Other head to heads