Skip to main content

Plausible vs Matomo vs PostHog: Analytics 2026

·OSSAlt Team
plausiblematomoposthoganalyticsgoogle-analyticsself-hostingprivacy

Plausible vs Matomo vs PostHog: Open-Source Analytics 2026

Google Analytics 4 managed to make analytics both worse and more privacy-invasive simultaneously. The good news: the open-source analytics ecosystem has never been stronger. Three tools dominate the conversation for teams moving off GA4 — Plausible, Matomo, and PostHog — and they're not really competing. They solve different problems.

This guide breaks down which one fits your use case, what self-hosting each looks like, and when you'd pay for cloud vs. run it yourself.

Quick Verdict

  • Plausible — Simple, beautiful, fast. Replace GA4 for marketing sites that just need traffic data.
  • Matomo — Full GA4 replacement with everything: goals, funnels, heatmaps, session recordings, GDPR compliance.
  • PostHog — Product analytics platform for software teams: event tracking, feature flags, A/B testing, session replays.

Feature Comparison

FeaturePlausibleMatomoPostHog
Pageview analytics
Cookie-freeOptional
GDPR compliant
Session recordings✅ (plugin)
Heatmaps✅ (plugin)
Funnels
A/B testing
Feature flags
Custom events
User identification
Goals / conversionsBasic
API
Self-host✅ (AGPL)✅ (GPL)✅ (MIT)
Script size~1KB~22KB~35KB
Setup complexityLowMediumMedium-high

The script size difference matters: Plausible's 1KB tracking script has zero impact on Core Web Vitals. Matomo's 22KB and PostHog's 35KB are noticeable, though still small compared to GA4 with Google Tag Manager.


Plausible Analytics

What It Is

Plausible is web analytics stripped to its essentials. Dashboard shows sessions, page views, bounce rate, top pages, referrers, countries, devices — all on one screen. No configuration needed, no funnel setup, no custom event taxonomy. You add the script tag, and it works.

GitHub stars: 22,000+ License: AGPL-3.0 Script size: ~1KB (the smallest of any analytics tool)

Pricing (Cloud)

  • Starter: $9/month — 10,000 monthly pageviews
  • Growth: $19/month — 100,000 pageviews
  • Business: $49/month — 1,000,000 pageviews
  • All plans: Unlimited websites, team members (Growth+), email reports

Plausible is the only option here that's genuinely cheap for low-traffic sites. The Starter plan at $9/month is less than a Spotify subscription.

Self-Hosting Plausible

git clone https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
cp plausible-conf.env.example plausible-conf.env

Edit plausible-conf.env:

BASE_URL=https://analytics.yourdomain.com
SECRET_KEY_BASE=$(openssl rand -base64 64 | tr -d '\n')
docker compose up -d

Plausible CE (Community Edition) is the self-hosted version. It's slightly behind the cloud version on features but covers all core analytics needs.

Tracking script:

<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.js">
</script>

When to Choose Plausible

  • Marketing site, blog, or content site
  • You just want traffic numbers without complexity
  • GDPR compliance without cookie banners
  • Team doesn't need funnel analysis or heatmaps
  • You want the fastest page load impact

Matomo

What It Is

Matomo is the closest open-source equivalent to Google Analytics. It's been around since 2007 (as Piwik), has a massive plugin ecosystem, and covers everything GA could do plus things it couldn't: on-premise data, European hosting, cookieless tracking.

GitHub stars: 20,000+ License: GPL-3.0 Script size: ~22KB

Matomo is the choice for organizations that need to prove GDPR compliance to stakeholders, have regulatory requirements around data location, or have non-technical marketers who need a familiar GA-like interface.

Pricing (Cloud)

  • Cloud plans start at ~$23/month for 50K pageviews
  • Scales with pageview volume
  • On-premise (self-hosted) is free; premium plugins cost extra

Premium plugins (paid add-ons that work with both cloud and self-hosted):

  • Heatmaps & Session Recordings: $19/month
  • A/B Testing: $15/month
  • Form Analytics: $12/month
  • Full Suite: ~$60/month

The premium plugins make Matomo's total cost higher than it first appears. At full feature parity with Mixpanel, you're spending $80–100/month cloud.

Self-Hosting Matomo

# docker-compose.yml
version: "3.8"

services:
  matomo_db:
    image: mariadb:11
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: matomo
      MYSQL_USER: matomo
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    volumes:
      - matomo_db:/var/lib/mysql

  matomo:
    image: matomo:fpm-alpine
    restart: unless-stopped
    volumes:
      - matomo_data:/var/www/html
    environment:
      MATOMO_DATABASE_HOST: matomo_db
      MATOMO_DATABASE_DBNAME: matomo
      MATOMO_DATABASE_USERNAME: matomo
      MATOMO_DATABASE_PASSWORD: ${MYSQL_PASSWORD}

  nginx:
    image: nginx:alpine
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - matomo_data:/var/www/html:ro
      - ./nginx.conf:/etc/nginx/conf.d/default.conf

volumes:
  matomo_db:
  matomo_data:

Complete the setup wizard at http://your-server:8080/index.php?action=databaseSetup.

Performance note: Matomo requires MySQL/MariaDB tuning for high-traffic sites. Self-hosted instances handling 10M+ pageviews/month need dedicated database configuration and caching setup.

When to Choose Matomo

  • You need a direct GA4 replacement for non-technical marketers
  • Regulatory requirements mandate on-premise data (healthcare, finance, EU government)
  • You need heatmaps + session recordings + A/B testing in one tool
  • Organization already uses Matomo and migration isn't worth the disruption
  • You need ecommerce tracking with full purchase funnel

PostHog

What It Is

PostHog is product analytics built for software teams. Where Plausible tracks "how many people visited," PostHog tracks "what did specific users do, why did they drop off, and which feature drove retention." It's built for developers building products.

GitHub stars: 25,000+ License: MIT Script size: ~35KB (but loads async)

Pricing (Cloud)

PostHog has an exceptionally generous free tier:

  • Free: 1,000,000 events/month, 5,000 session recordings, 1M feature flag requests
  • Paid: $0.0000225/event beyond 1M (roughly $22.50 per additional 1M events)
  • Session recordings: $0.005 per recording beyond free tier
  • A/B testing, surveys, feature flags: separate usage-based pricing

For most startups, PostHog Cloud is free forever. 1M events/month covers a substantial SaaS product.

Self-Hosting PostHog

PostHog's self-hosted "Hobby" deployment uses Docker Compose:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"

This single command sets up PostHog with ClickHouse (columnar storage for analytics), Kafka (event ingestion), Redis, PostgreSQL, and the PostHog app server.

Minimum requirements: 4GB RAM, 2 vCPU, 20GB SSD Recommended: 8GB RAM, 4 vCPU, 100GB SSD (for real workloads)

Self-hosted PostHog is the same codebase as cloud — no feature limitations. The catch: it's more complex to operate than Plausible or Matomo. ClickHouse and Kafka aren't trivial to maintain.

SDK Integration

// Install: npm install posthog-js
import posthog from 'posthog-js'

posthog.init('phc_your_project_api_key', {
    api_host: 'https://posthog.yourdomain.com',
    // Capture pageviews automatically
    capture_pageview: true,
})

// Track custom events
posthog.capture('user_signed_up', {
    plan: 'pro',
    referrer: document.referrer,
})

// Identify users for user-level analytics
posthog.identify('user_123', {
    email: 'user@example.com',
    name: 'Jane Smith',
    plan: 'pro',
})

Feature Flags

// Check a feature flag
if (posthog.isFeatureEnabled('new-dashboard')) {
    renderNewDashboard()
} else {
    renderOldDashboard()
}

// A/B test with payload
const variant = posthog.getFeatureFlagPayload('pricing-page-test')
// variant = { cta: 'Start free trial' } or { cta: 'Get started' }

Feature flags persist across sessions and respect targeting rules you define in the PostHog UI — roll out to 10% of users, specific cohorts, or specific user properties.

When to Choose PostHog

  • Building a SaaS product and need to understand user behavior
  • You want analytics + feature flags + A/B testing in one tool
  • Your team has engineers who will write custom event tracking
  • You need session recordings linked to user profiles
  • You're replacing Mixpanel, Amplitude, LaunchDarkly, or Hotjar

Head-to-Head: Making the Decision

If you need...Use
Simple traffic stats, fast setup, GDPRPlausible
GA4 replacement for marketing teamMatomo
Heatmaps + session recordings (self-host)Matomo
Product analytics for SaaSPostHog
Feature flags + A/B testingPostHog
Free analytics forever (cloud)PostHog (1M events/mo)
Cheapest cloud option (<100K pageviews)Plausible ($9/mo)
On-premise, audited dataMatomo or Plausible CE

Migrating from Google Analytics

To Plausible: Install script, configure goals manually, accept that historical GA data doesn't transfer. Plausible's simplicity means some GA segments/reports simply don't exist — that's intentional.

To Matomo: Use the Google Analytics Importer plugin (paid) to pull historical data. Configure goals to match your GA conversions. The most feature-complete migration path.

To PostHog: Install PostHog alongside GA4, run both for 30 days to validate event parity, then remove GA4. PostHog's autocapture picks up most interactions automatically; add custom events for key conversion points.

All three work without cookie consent banners when configured cookieless — a major advantage over GA4 in GDPR jurisdictions.


Can You Run Multiple?

Yes, and many teams do:

  • Plausible for the marketing site — simple, fast, cookie-free
  • PostHog for the product/app — user tracking, feature flags, session recordings

This is the most common setup for B2B SaaS: public website on Plausible, product dashboard on PostHog. Total cost: $0–$9/month with self-hosting.


Performance and Resource Requirements

Self-hosting analytics means understanding what each tool costs to run:

| Tool | Min RAM | Storage growth | Recommended |
|------|---------|----------------|-------------| | Plausible CE | 512MB | ~1GB/10M pageviews | 1GB RAM VPS | | Matomo | 1GB | ~5GB/10M pageviews | 2GB RAM VPS | | PostHog | 4GB | ~10GB/10M events | 8GB RAM, 100GB SSD |

PostHog's storage requirements are higher because ClickHouse (its analytics database) stores rich event data with full properties, not just pageview counts.

For Plausible and Matomo, a $6–10/month VPS runs them comfortably for sites under 10M monthly pageviews. PostHog's Hobby deployment is designed for "up to 1M events/month" — beyond that, the ClickHouse instance needs tuning or separate database hosting.


Custom Events: A Practical Comparison

All three tools support custom event tracking, but the developer experience differs significantly.

Plausible custom events:

<!-- Trigger via data-* attributes (no JS required) -->
<button class="plausible-event-name=Signup+Click">Sign up</button>

<!-- Or via JS -->
<script>plausible('Signup Click', {props: {plan: 'pro'}})</script>

Matomo custom events:

_paq.push(['trackEvent', 'Signup', 'Click', 'Pro Plan']);

PostHog custom events:

posthog.capture('signup_click', { plan: 'pro', source: 'hero_cta' });

PostHog's event model is the most flexible — every event carries arbitrary key-value properties, enabling rich segmentation later. Plausible's events are deliberately simple. Matomo's three-parameter model (category/action/name) is a holdover from Google Analytics era.


GDPR Compliance Specifics

All three can be operated without cookies and without consent banners, but the details differ:

Plausible: Cookie-free by default. Uses IP address anonymization + user-agent fingerprinting for session detection. No personal data stored. Compliant under GDPR without consent banner in the EU.

Matomo: Requires configuration. Enable "Use anonymized IP addresses" and "Disable cookies" in Settings → Privacy. With these settings, Matomo is cookieless and GDPR-compliant. The GA Importer plugin collects consent for data migration.

PostHog: Cookie-free mode available via persistence: 'memory' config. For full GDPR compliance, you'll also want to configure data retention periods and enable the "person deletion" API for right-to-erasure requests.

For regulated industries (healthcare, finance, EU government contracts), self-hosted Plausible or Matomo with on-premise deployment is the cleanest story for data protection officers — zero third-party data transfer to verify.


Upgrading and Maintenance

Plausible CE: Run docker compose pull && docker compose up -d to update. Plausible handles database migrations automatically on startup. Releases are roughly monthly.

Matomo: Update via the built-in updater (System → General Settings → Update) or pull the new Docker image. Database migrations run through the UI wizard. Backup before updating — schema changes occasionally require manual intervention.

PostHog: PostHog has a built-in upgrade mechanism for the self-hosted Hobby deployment: cd posthog && ./bin/upgrade-hobby. This handles container updates, migration scripts, and ClickHouse schema changes. Budget 10–20 minutes for PostHog upgrades; the ClickHouse migrations can take several minutes on larger datasets.


Browse all Google Analytics alternatives at OSSAlt.

Related: 10 Open-Source Tools to Replace SaaS in 2026 · Immich vs Google Photos: Migration Guide 2026

Comments