Google Analytics is powerful, but it tracks your visitors across the web, shares data with advertisers, and requires cookie consent banners. If you care about privacy (and GDPR compliance), there’s a better way: self-hosted analytics.
This guide compares the three best privacy-focused analytics platforms: Plausible, Umami, and Matomo.
Why Self-Host Analytics?
Benefits:
- Full data ownership - your analytics data stays on your server
- Privacy-friendly - no tracking cookies, GDPR compliant by default
- No data sampling - unlike Google Analytics free tier
- No external dependencies - works even if third-party services are blocked
- Ad blocker resistant - more accurate visitor counts
Quick Comparison Table
| Feature | Plausible | Umami | Matomo |
|---|---|---|---|
| Setup Difficulty | Easy | Easy | Moderate |
| UI Complexity | Simple | Simple | Complex |
| Resource Usage | Low | Very Low | High |
| Database | PostgreSQL | PostgreSQL/MySQL | MySQL/MariaDB |
| Real-time | Yes | Yes | Yes |
| Open Source | Yes (AGPL) | Yes (MIT) | Yes (GPL) |
| Docker Support | ✅ | ✅ | ✅ |
| E-commerce | ❌ | ❌ | ✅ |
| Heatmaps | ❌ | ❌ | ✅ (plugin) |
| Funnels | ✅ | ❌ | ✅ |
| Custom Events | ✅ | ✅ | ✅ |
Plausible Analytics
Best for: Simplicity and clean UI
Plausible is the simplest of the three. One dashboard, essential metrics, zero configuration needed.
Pros
- Beautiful, minimal interface
- Lightweight (~1MB JavaScript)
- No cookie banner needed
- Easy setup with Docker
- Great documentation
Cons
- Fewer features than Matomo
- No raw data exports
- Self-hosted version requires build from source (or use Docker)
Docker Setup
version: '3.8'
services:
plausible:
image: plausible/analytics:latest
restart: unless-stopped
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
depends_on:
- plausible_db
- plausible_events_db
ports:
- 8000:8000
env_file:
- plausible-conf.env
plausible_db:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
plausible_events_db:
image: clickhouse/clickhouse-server:latest
restart: unless-stopped
volumes:
- event-data:/var/lib/clickhouse
volumes:
db-data:
event-data:
Tracking code:
<script defer data-domain="yourdomain.com" src="https://plausible.yourdomain.com/js/script.js"></script>
Umami Analytics
Best for: Minimalism and performance
Umami is the lightest option. Fast, simple, and elegant.
Pros
- Extremely lightweight (~2KB script)
- Clean, modern UI
- SQL and NoSQL support (PostgreSQL, MySQL, or MongoDB)
- Easy Docker setup
- MIT license (most permissive)
Cons
- Fewer features than both Plausible and Matomo
- No funnel analysis
- Limited reporting options
Docker Setup
version: '3.8'
services:
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:umami@db:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: replace-with-random-string
depends_on:
- db
restart: unless-stopped
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: umami
volumes:
- umami-db-data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
umami-db-data:
Tracking code:
<script async src="https://umami.yourdomain.com/script.js" data-website-id="your-website-id"></script>
Matomo (formerly Piwik)
Best for: Advanced features and e-commerce
Matomo is the most feature-complete analytics platform. It’s basically self-hosted Google Analytics.
Pros
- Most features (heatmaps, session recordings, A/B testing)
- E-commerce tracking
- SEO reports
- User flow visualization
- Mobile app analytics
- Plugin ecosystem
Cons
- Heavy resource usage (needs 2GB+ RAM)
- Complex interface (can be overwhelming)
- Slower than Plausible/Umami
- PHP-based (requires more maintenance)
Docker Setup
version: '3.8'
services:
matomo:
image: matomo:latest
restart: unless-stopped
ports:
- 8080:80
volumes:
- matomo:/var/www/html
environment:
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_USERNAME=matomo
- MATOMO_DATABASE_PASSWORD=matomo
- MATOMO_DATABASE_DBNAME=matomo
depends_on:
- db
db:
image: mariadb:10
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_PASSWORD=matomo
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
volumes:
- db:/var/lib/mysql
volumes:
matomo:
db:
Tracking code:
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.yourdomain.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
Feature Deep Dive
Dashboard & Reporting
Plausible: Single-page dashboard, real-time stats, clean and focused
Umami: Minimal dashboard, customizable date ranges, multiple sites in one view
Matomo: Multi-page interface, widgets, custom dashboards, detailed reports
Privacy & GDPR
All three are GDPR compliant by default:
- No cookies (or optional cookies in Matomo)
- No cross-site tracking
- No personal data collection
- IP anonymization options
Custom Events
Plausible: Goals and custom events with plausible() function
Umami: Event tracking with umami.track() function
Matomo: Comprehensive event tracking + e-commerce events
API Access
Plausible: Stats API for dashboards
Umami: API for stats and event tracking
Matomo: Full-featured API for everything
Resource Requirements
Umami:
- RAM: 512MB minimum
- CPU: 1 core
- Disk: 5GB
Plausible:
- RAM: 1GB minimum (ClickHouse needs RAM)
- CPU: 2 cores
- Disk: 10GB
Matomo:
- RAM: 2GB minimum
- CPU: 2 cores
- Disk: 20GB+
Which Should You Choose?
Choose Plausible if:
- You want a balance of features and simplicity
- You need funnels and goal tracking
- You prefer a polished UI
- You don’t need raw data exports
Choose Umami if:
- You want the fastest, lightest option
- You have limited server resources
- You prefer MIT license
- You don’t need advanced features
Choose Matomo if:
- You need enterprise features (e-commerce, heatmaps, etc.)
- You’re migrating from Google Analytics
- You want the most comprehensive reporting
- You have server resources to spare
Migration from Google Analytics
All three support importing Google Analytics data:
- Matomo: Built-in import tool
- Plausible: Manual CSV import
- Umami: No direct import (start fresh)
Performance Comparison
Based on 100K pageviews/month:
| Metric | Plausible | Umami | Matomo |
|---|---|---|---|
| Script Size | ~1MB | ~2KB | ~25KB |
| Page Load Impact | Low | Minimal | Medium |
| Server CPU | Low | Very Low | High |
| Database Size | ~500MB | ~200MB | ~2GB |
Conclusion
For most self-hosters, I recommend Umami. It’s fast, simple, and gets the job done without bloat.
If you need funnels and a polished UI, go with Plausible.
If you’re running an e-commerce site or need advanced features, Matomo is your best bet.
All three are excellent Google Analytics alternatives. Pick based on your needs and server capacity.
Next Steps
- Choose your analytics platform
- Set up Docker Compose
- Add tracking code to your site
- Configure ad blocker bypass (optional)
- Set up automated backups
Which analytics platform are you using? Share your experience in the comments!