Skip to main content

Open-source alternatives guide

Best Open Source Alternatives to Amplitude in 2026

Amplitude's paid plans start at $995/month. These open source product analytics tools give you user behavior tracking, funnels, retention analysis, and.

·OSSAlt Team
Share:

TL;DR

Amplitude's paid plans start at ~$995/month — after their free tier limit of 50K monthly tracked users. For a growing SaaS with 100K users, that's $12K+/year just for analytics. Open source alternatives have matured significantly. The best: PostHog (closest feature parity, includes session replay, feature flags), Mixpanel OSS setup (not open source itself, but alternative stacks exist), Plausible (simpler, privacy-first), and Fathom/Matomo (for less complex needs). For full Amplitude replacement: PostHog self-hosted covers 95% of Amplitude's features.

Key Takeaways

  • Amplitude pricing: Free to 50K MTUs, then $995+/month — steep scaling
  • PostHog: most complete alternative — funnels, retention, session replay, feature flags
  • Matomo: battle-tested, GDPR-friendly, robust event tracking
  • Plausible: simpler (page-level analytics) — not a full Amplitude replacement
  • OpenReplay: session replay specialist (complements PostHog or Matomo)
  • ClickHouse + Grafana: DIY stack for maximum performance at scale

What Amplitude Provides

  • Event tracking (button clicks, page views, custom events)
  • Funnel analysis (conversion flows)
  • Retention analysis (cohort tracking)
  • User paths (behavioral flows)
  • Segmentation (define user cohorts)
  • Session replay (watch user sessions)
  • A/B testing integration
  • Real-time dashboards

The most valuable features: funnels, retention, and session replay. These drive product decisions. The OSS alternatives cover all three.


The Alternatives

1. PostHog — The Most Complete Alternative

Best for: Teams that want everything Amplitude does in one self-hosted platform.

PostHog is purpose-built to replace commercial analytics. It's comprehensive: event tracking, funnels, retention, session replay, feature flags, A/B testing, surveys — all in one.

# Self-host PostHog with Docker Compose:
git clone https://github.com/PostHog/posthog
cd posthog/docker/
docker compose up -d

# Or the simplified version:
docker run -d \
  -p 8000:8000 \
  posthog/posthog:latest

# Access at http://localhost:8000
# Create admin account → get project API key

Integrate with your product:

// React/Next.js:
import posthog from 'posthog-js';

posthog.init('your-project-api-key', {
  api_host: 'https://your-posthog.company.com',
  capture_pageview: true,
  capture_pageleave: true,
  session_recording: { recordCanvas: true },
});

// Track events:
posthog.capture('subscription_upgraded', {
  plan: 'pro',
  mrr_delta: 49,
  user_id: user.id,
});

// Identify users:
posthog.identify(user.id, {
  email: user.email,
  name: user.name,
  plan: user.plan,
  created_at: user.createdAt,
});

// Feature flags:
if (posthog.isFeatureEnabled('new-checkout-flow')) {
  // Show new UI
}

PostHog vs Amplitude:

FeaturePostHogAmplitude
Funnels
Retention
Session Replay✅ (included)❌ (paid addon)
Feature Flags
A/B Testing
User Paths
SQL Access
Self-hosted

PostHog's session replay is particularly notable — Amplitude charges extra for it, PostHog includes it.

Self-hosting requirements:

  • Minimum: 4 vCPU, 8GB RAM (ClickHouse under the hood)
  • Recommended for production: 8 vCPU, 16GB RAM
  • Cost: ~$30-80/month on Hetzner or Hetzner Cloud
  • Free tier: 1M events/month on PostHog Cloud (beyond that, self-host)

GitHub: PostHog/posthog — 22K+ stars


2. Matomo — Battle-Tested with Full Event Tracking

Best for: Teams with GDPR compliance requirements, or replacing both Google Analytics and Amplitude.

Matomo has been around since 2007 (as Piwik). It's the most mature self-hosted analytics platform with full event tracking, goals, funnels, and cohorts.

# Docker:
docker run -d \
  --name matomo \
  -p 8080:80 \
  -v matomo:/var/www/html \
  matomo

# Or: download and run on PHP/MySQL server
# Full guide: https://matomo.org/docs/installation/

Event tracking in Matomo:

// Matomo tracking code:
var _paq = window._paq = window._paq || [];
_paq.push(['setTrackerUrl', 'https://your-matomo.com/matomo.php']);
_paq.push(['setSiteId', '1']);

// Track custom events:
_paq.push(['trackEvent', 'Checkout', 'Click', 'Start Checkout', 1]);
_paq.push(['trackEvent', 'Subscription', 'Upgraded', 'pro', 49]);

// Track goals (conversions):
_paq.push(['trackGoal', 1]); // Goal ID 1 = signup complete

Matomo strengths for Amplitude replacement:

  • Behavioral analytics: event tracking, custom dimensions
  • Funnel reports: conversion path analysis
  • Cohort analysis: user retention tracking
  • E-commerce analytics: detailed purchase tracking
  • GDPR-compliant by design (no cross-site tracking)
  • Import Google Analytics data (for migration)

Where Matomo falls short vs Amplitude:

  • No session replay (need to add OpenReplay separately)
  • Less polished user paths visualization
  • Slower to build custom dashboards

GitHub: matomo-org/matomo — 20K+ stars


3. OpenReplay — Session Replay Specialist

Best for: Adding session replay to any analytics setup.

OpenReplay is purpose-built for session replay. If you use Matomo or Plausible for event analytics, add OpenReplay for the "watch how users behave" layer that Amplitude charges for.

# Self-host:
git clone https://github.com/openreplay/openreplay
cd openreplay/scripts/helm
./install.sh

# Or Docker:
docker run -d \
  -p 9001:9001 \
  openreplay/openreplay-ee:latest
// Add to your app:
import OpenReplay from '@openreplay/tracker';
const tracker = new OpenReplay({
  projectKey: 'your-key',
  ingestPoint: 'https://your-openreplay.com/ingest',
});
tracker.start();

// Tag sessions for search:
tracker.setUserID(user.id);
tracker.setMetadata('plan', user.plan);

OpenReplay features:

  • Full session recording with DOM snapshots
  • Click maps and rage click detection
  • Error tracking (JS errors visible in replays)
  • Network request capture
  • Console log capture
  • Co-browse (share session with support team)
  • GDPR: mask sensitive fields automatically

GitHub: openreplay/openreplay — 9K+ stars


4. ClickHouse + Grafana (DIY for Scale)

Best for: Teams at serious scale (100M+ events/month) or with existing data engineering capacity.

Amplitude runs on ClickHouse internally. Build your own:

# ClickHouse for event storage:
docker run -d \
  --name clickhouse \
  -p 8123:8123 \
  -p 9000:9000 \
  -v clickhouse_data:/var/lib/clickhouse \
  clickhouse/clickhouse-server

# Schema for product events:
CREATE TABLE events (
  timestamp   DateTime64(3),
  event_name  LowCardinality(String),
  user_id     String,
  session_id  String,
  properties  Map(String, String),
  date        Date MATERIALIZED toDate(timestamp)
) ENGINE = MergeTree()
ORDER BY (date, event_name, user_id);

# Ingest via API or Kafka
# Visualize with Grafana + ClickHouse plugin

This approach requires data engineering but gives you:

  • Unlimited events (storage cost ~$0.02/GB)
  • Sub-second query performance on billions of rows
  • Full SQL access for custom analysis
  • No per-user pricing

Cost at scale:

  • 100M events/month → ~50GB → $1/month storage
  • vs Amplitude: $2,000+/month at that scale

Early-stage (< 50K MAU):
→ PostHog Cloud free tier
→ Upgrade to self-hosted when you hit 1M events/month

Growth-stage (50K-500K MAU):
→ PostHog self-hosted ($30-80/month VPS)
→ Add OpenReplay for session replay if PostHog's replay isn't enough

Scale-stage (500K+ MAU):
→ PostHog self-hosted on dedicated ClickHouse cluster
→ Or custom ClickHouse + Grafana if you have data engineers

Privacy-first (any size):
→ Matomo self-hosted + OpenReplay
→ Plausible for simple page analytics
→ Zero data leaves your servers

Migration: Amplitude → PostHog

# 1. Install PostHog SDK alongside Amplitude:
npm install posthog-js

# 2. Run both in parallel for 2-4 weeks to validate data:
// posthog.init(...)
// amplitude.init(...)
posthog.capture(event, properties); // Mirror all events
amplitude.track(event, properties); // During validation

# 3. Export Amplitude data (30-day free export):
# Amplitude → Settings → Data Governance → Export

# 4. Import to PostHog (via API):
curl -X POST https://your-posthog.com/batch/ \
  -H "Content-Type: application/json" \
  -d '{"api_key": "your-key", "batch": [...]}'

# 5. Remove Amplitude after validation

Explore more open source alternatives at OSSAlt.

Analytics Replacements Should Be Judged on Decision Quality

Analytics tools are easy to compare on dashboard screenshots and event volume pricing, but the better measure is whether they improve decision quality without increasing data risk. Teams should ask how events are defined, whether sampling or retention defaults hide important behavior, and how quickly a non-analyst can answer a real product or growth question. If the replacement requires a specialist for every query, it may be cheaper than enterprise analytics software yet still expensive in practice because insight latency stays high.

This is where adjacent tools matter. Plausible guide is useful when the goal is privacy-first product and marketing analytics without a surveillance-heavy stack. Prometheus and Grafana guide becomes relevant when operational metrics and application health need to sit beside product events for a fuller picture. Uptime Kuma guide fits because customer experience starts with availability, not just funnel conversion. Together, those tools create a more honest view of product behavior than a single script-heavy analytics platform pretending to be a universal observability layer.

How to Avoid Recreating the Worst Parts of SaaS Analytics

The other trap is copying SaaS analytics habits without questioning them. Many organizations collect more events than they can govern, retain them longer than necessary, and send them to third parties by default. A self-hosted analytics stack is a chance to narrow scope. Track the events that support concrete decisions, remove identifiers you do not need, define retention with legal and product stakeholders, and make event ownership explicit in code review. That keeps the data model maintainable and makes privacy claims easier to defend.

For articles about alternatives to Mixpanel, Amplitude, Segment, or Hotjar, this operational framing matters because the migration is not only a tooling switch. It is a chance to rebuild measurement discipline. The strongest replacement is the one that gives the team faster answers with fewer blind data pipelines and less external exposure.

Decision Framework for Picking the Right Fit

The simplest way to make a durable decision is to score the options against the constraints you cannot change: who will operate the system, how often it will be upgraded, whether the workload is business critical, and what kinds of failures are tolerable. That sounds obvious, but many migrations still start with screenshots and end with painful surprises around permissions, backup windows, or missing audit trails. A short written scorecard forces the trade-offs into the open. It also keeps the project grounded when stakeholders ask for new requirements halfway through rollout.

One more practical rule helps: optimize for reversibility. A good self-hosted choice preserves export paths, avoids proprietary lock-in inside the replacement itself, and can be documented well enough that another engineer could take over without archaeology. The teams that get the most value from self-hosting are not necessarily the teams with the fanciest infrastructure. They are the teams that keep their systems legible, replaceable, and easy to reason about.

Analytics Replacements Should Be Judged on Decision Quality

Analytics tools are easy to compare on dashboard screenshots and event volume pricing, but the better measure is whether they improve decision quality without increasing data risk. Teams should ask how events are defined, whether sampling or retention defaults hide important behavior, and how quickly a non-analyst can answer a real product or growth question. If the replacement requires a specialist for every query, it may be cheaper than enterprise analytics software yet still expensive in practice because insight latency stays high.

This is where adjacent tools matter. Plausible guide is useful when the goal is privacy-first product and marketing analytics without a surveillance-heavy stack. Prometheus and Grafana guide becomes relevant when operational metrics and application health need to sit beside product events for a fuller picture. Uptime Kuma guide fits because customer experience starts with availability, not just funnel conversion. Together, those tools create a more honest view of product behavior than a single script-heavy analytics platform pretending to be a universal observability layer.

How to Avoid Recreating the Worst Parts of SaaS Analytics

The other trap is copying SaaS analytics habits without questioning them. Many organizations collect more events than they can govern, retain them longer than necessary, and send them to third parties by default. A self-hosted analytics stack is a chance to narrow scope. Track the events that support concrete decisions, remove identifiers you do not need, define retention with legal and product stakeholders, and make event ownership explicit in code review. That keeps the data model maintainable and makes privacy claims easier to defend.

For articles about alternatives to Mixpanel, Amplitude, Segment, or Hotjar, this operational framing matters because the migration is not only a tooling switch. It is a chance to rebuild measurement discipline. The strongest replacement is the one that gives the team faster answers with fewer blind data pipelines and less external exposure.

Analytics Governance Notes

Analytics governance should define event ownership, retention, identifier minimization, and a standard review path for schema changes. That discipline keeps the measurement layer trustworthy as more teams depend on it.

Analytics Replacements Should Be Judged on Decision Quality

Analytics tools are easy to compare on dashboard screenshots and event volume pricing, but the better measure is whether they improve decision quality without increasing data risk. Teams should ask how events are defined, whether sampling or retention defaults hide important behavior, and how quickly a non-analyst can answer a real product or growth question. If the replacement requires a specialist for every query, it may be cheaper than enterprise analytics software yet still expensive in practice because insight latency stays high.

This is where adjacent tools matter. Plausible guide is useful when the goal is privacy-first product and marketing analytics without a surveillance-heavy stack. Prometheus and Grafana guide becomes relevant when operational metrics and application health need to sit beside product events for a fuller picture. Uptime Kuma guide fits because customer experience starts with availability, not just funnel conversion. Together, those tools create a more honest view of product behavior than a single script-heavy analytics platform pretending to be a universal observability layer.

How to Avoid Recreating the Worst Parts of SaaS Analytics

The other trap is copying SaaS analytics habits without questioning them. Many organizations collect more events than they can govern, retain them longer than necessary, and send them to third parties by default. A self-hosted analytics stack is a chance to narrow scope. Track the events that support concrete decisions, remove identifiers you do not need, define retention with legal and product stakeholders, and make event ownership explicit in code review. That keeps the data model maintainable and makes privacy claims easier to defend.

For articles about alternatives to Mixpanel, Amplitude, Segment, or Hotjar, this operational framing matters because the migration is not only a tooling switch. It is a chance to rebuild measurement discipline. The strongest replacement is the one that gives the team faster answers with fewer blind data pipelines and less external exposure.

The SaaS-to-Self-Hosted Migration Guide (Free PDF)

Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.

Join 300+ self-hosters. Unsubscribe in one click.