Why Self-Host Your Web Analytics?
Third-party analytics services like Google Analytics track your visitors across the web, harvest personal data, and subject you to increasingly complex compliance requirements. Self-hosting your analytics gives you full control:
- Complete data ownership: Every event, every session, every metric stays on your infrastructure
- GDPR and privacy compliance: No cross-site tracking, no fingerprinting, no cookie banners needed
- No data sampling: Get accurate numbers even at high traffic volumes
- Cost predictability: No surprise bills when your traffic spikes
- Custom integrations: Connect analytics to your internal dashboards, databases, and alerting systems
- Ad-blocker resistance: When analytics runs on your own domain, ad blockers can’t distinguish it from your website
For blogs, e-commerce stores, SaaS products, and internal dashboards, self-hosted analytics is no longer a luxury — it’s a sensible default.
At a Glance: Matomo vs Plausible vs Umami
| Feature | Matomo | Plausible | Umami |
|---|---|---|---|
| Type | Full analytics suite | Lightweight analytics | Minimalist analytics |
| License | GPL-3.0 (core) | AGPL-3.0 | MIT |
| Backend | PHP + MySQL/MariaDB | Elixir + PostgreSQL + ClickHouse | Node.js + PostgreSQL |
| Frontend | Vue.js / PHP | React | Next.js |
| Cookie-based tracking | Optional | No (cookieless) | No (cookieless) |
| Script size | ~40 KB | ~1 KB | ~2 KB |
| Custom events | Yes | Yes | Yes |
| E-commerce tracking | Yes | Yes (Business) | No |
| Heatmaps | Yes (plugin) | No | No |
| A/B testing | Yes (plugin) | No | No |
| Multi-site | Yes | Yes | Yes |
| REST API docker | Yes | Yes | |
| Docker support | Yes | Yes | Yes |
| Resource usage | High (300-500 MB RAM) | Medium (150-300 MB) | Low (50-150 MB) |
| Best for | Enterprise, complex needs | Privacy-first blogs and SaaS | Personal projects and small sites |
Matomo: The Full-Featured Analytics Powerhouse
Matomo (formerly Piwik) is the most comprehensive open-source web analytics platform available. It’s a direct replacement for Google Analytics, offering nearly every feature you’d expect from a commercial analytics product — and then some.
Key Strengths
Matomo’s feature set is unmatched in the open-source analytics space. It includes real-time visitor maps, goal tracking, funnel analysis, e-commerce reports, custom dimensions, segment builder, user flow visualization, and an extensive plugin marketplace with over 100 extensions. Heatmaps, session recordings, A/B testing, and form analytics are all available as plugins.
For organizations migrating from Google Analytics, Matomo offers an import tool that brings your historical GA data directly into Matomo, preserving year-over-year comparisons.
Docker Setup for Matomo
Matomo requires a PHP backend, a MySQL or MariaDB database, and optionally a Redis cache. Here’s a production-ready Docker Compose configuration:
| |
Save this as docker-compose.yml, create a .env file with your passwords, and start the stack:
| |
After the containers start, visit http://your-server:8080 to run the web-based installer. The setup wizard will guide you through creating the initial admin account and adding your first website.
Tracking Code
Once configured, Matomo provides a JavaScript snippet to embed on every page:
| |
For cookieless tracking, add this line before trackPageView:
| |
Nginx Reverse Proxy Configuration
Matomo works best behind a reverse proxy with HTTPS. Here’s an Nginx configuration that also serves the tracking script from your own domain, making it invisible to ad blockers:
| |
Plausible: Lightweight and Privacy-First
Plausible takes the opposite approach from Matomo. Instead of offering every possible feature, it focuses on doing one thing exceptionally well: providing clear, actionable website statistics without collecting personal data.
The tracking script is under 1 KB (minified and gzipped), making it one of the lightest analytics scripts available. Plausible uses no cookies, no persistent identifiers, and no cross-site tracking. All data is aggregated, meaning you get useful insights without individual visitor profiling.
Key Strengths
Plausible excels at simplicity. The dashboard shows everything at a glance: total visitors, page views, bounce rate, session duration, top pages, referral sources, device breakdown, and geographic distribution — all on a single page. There are no nested menus, no configuration wizards, and no learning curve.
For teams, Plausible offers shared dashboard links, Slack and Discord email reports, and Google Search Console integration. The goal tracking and custom event support cover most use cases without complexity.
Docker Setup for Plausible
Plausible requires PostgreSQL and ClickHouse as data backends. The official Plausible hosting image bundles everything:
| |
Generate the required secrets:
| |
Register your admin account:
| |
Plausible Tracking Script
The Plausible script is remarkably simple:
| |
For outbound link and file download tracking:
| |
To proxy through your own domain (ad-blocker resistant), configure Nginx:
| |
Then update your tracking script to use the proxied path:
| |
Umami: Minimalist Analytics That Just Works
Umami is the simplest self-hosted analytics solution available. Built with Next.js and PostgreSQL, it offers a clean, modern dashboard with essential metrics and a tracking script under 2 KB. The MIT license means you can use it anywhere without restrictions.
Key Strengths
Umami’s standout feature is its simplicity. Installation takes minutes, the dashboard is intuitive, and the tracking script is tiny. It supports custom events, team sharing, and website-level access controls. The built-in share URLs let you publish public analytics dashboards — perfect for open-source projects and transparent companies.
Umami also offers real-time visitor tracking, device and browser breakdowns, OS detection, country-level geolocation, and referrer tracking. The event tracking API lets you record any custom action.
Docker Setup for Umami
Umami has the simplest setup of the three. It only needs PostgreSQL:
| |
Set up your environment and launch:
| |
The default login credentials are admin / umami. Change these immediately after first login.
Umami Tracking Script
Umami provides a simple tracking snippet:
| |
You can customize the script endpoint name during setup to avoid ad-blocker detection:
| |
For custom event tracking, use the data-track-* attributes:
| |
Or use the JavaScript API for more complex scenarios:
| |
Performance and Resource Comparison
Understanding resource requirements is critical when choosing an analytics stack. Here’s how the three platforms compare under realistic load (approximately 100,000 page views per month):
| Metric | Matomo | Plausible | Umami |
|---|---|---|---|
| Idle RAM | 300-500 MB | 150-300 MB | 50-150 MB |
| Disk (1M events) | 2-5 GB | 500 MB - 1 GB | 200-500 MB |
| CPU during peak | 1-2 cores | 0.5-1 core | 0.25-0.5 core |
| Startup time | 30-60 seconds | 15-30 seconds | 5-10 seconds |
| Database queries per page view | 5-10 | 1-2 | 1-2 |
| VPS minimum | 2 GB RAM | 1 GB RAM | 512 MB RAM |
For personal blogs and small projects, Umami runs comfortably on a $5/month VPS. Plausible needs slightly more headroom due to ClickHouse. Matomo requires the most resources but delivers the richest feature set in return.
Migration from Google Analytics
If you’re moving away from Google Analytics, here’s how each platform handles the transition:
Matomo offers the most complete migration path. Its Google Analytics Importer plugin connects to your GA property via API, pulls historical data, and maps it to Matomo’s data model. This includes campaign data, custom dimensions, goals, and e-commerce transactions. The import runs as a background process and can take several hours for large properties.
Plausible does not offer a direct import tool. However, you can run Plausible alongside Google Analytics during a transition period, using the data-domain attribute on the tracking script to maintain separate data streams. After a few months of parallel collection, you can confidently retire Google Analytics.
Umami similarly lacks a migration tool. The recommended approach is identical to Plausible: run both analytics systems simultaneously and phase out Google Analytics once you have sufficient Umami data.
Which Should You Choose?
The decision comes down to your specific needs:
Choose Matomo if:
- You need comprehensive analytics comparable to Google Analytics
- E-commerce tracking, heatmaps, or session recordings are essential
- You have a dedicated server or VPS with at least 2 GB RAM
- Your team requires advanced segmentation, funnel analysis, and custom reports
- You want to import historical Google Analytics data
Choose Plausible if:
- You value simplicity and a clean dashboard over feature breadth
- Privacy compliance is a primary concern (GDPR, CCPA, PECR)
- You want cookieless analytics that works without consent banners
- You need team collaboration features and scheduled email reports
- Your site gets moderate to high traffic (10K-1M+ page views/month)
Choose Umami if:
- You want the simplest possible setup and maintenance
- You’re running a personal blog, portfolio, or small business site
- You need a tiny tracking script that won’t impact page load times
- You want to publish public analytics dashboards
- You’re running on minimal hardware (512 MB RAM VPS or Raspberry Pi)
All three platforms are excellent open-source choices. The best approach is to spin up a Docker instance of your preferred option, add the tracking script to a staging version of your site, and evaluate the dashboard after a week of real traffic data.
Frequently Asked Questions (FAQ)
Which one should I choose in 2026?
The best choice depends on your specific requirements:
- For beginners: Start with the simplest option that covers your core use case
- For production: Choose the solution with the most active community and documentation
- For teams: Look for collaboration features and user management
- For privacy: Prefer fully open-source, self-hosted options with no telemetry
Refer to the comparison table above for detailed feature breakdowns.
Can I migrate between these tools?
Most tools support data import/export. Always:
- Backup your current data
- Test the migration on a staging environment
- Check official migration guides in the documentation
Are there free versions available?
All tools in this guide offer free, open-source editions. Some also provide paid plans with additional features, priority support, or managed hosting.
How do I get started?
- Review the comparison table to identify your requirements
- Visit the official documentation (links provided above)
- Start with a Docker Compose setup for easy testing
- Join the community forums for troubleshooting