Why Replace Google Analytics?
Google Analytics 4 is:
- Heavy โ 45KB script, slows page load
- Privacy-invasive โ cookies, fingerprinting, cross-site tracking
- Complex โ event-based model confuses most teams
- Blocked โ 40%+ of visitors use ad blockers that block GA
Plausible fixes all four problems.
Plausible vs Google Analytics
| Feature | Plausible | GA4 |
|---|---|---|
| Script size | under 1KB | 45KB |
| Cookies | โ None | โ Multiple |
| GDPR consent banner | Not needed | Required |
| Setup time | 5 minutes | Hours |
| Data ownership | โ Full | โ Google owns it |
| Real-time | โ | โ |
| Funnels | โ | โ |
| Revenue tracking | โ | โ |
| Self-hosted | โ | โ |
| Ad blocker bypass | โ (proxy) | โ |
| Price | $9/mo or free (self-hosted) | Free (you are the product) |
Self-Host on Kubernetes
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Plausible Stack โ
โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Plausible โ โ ClickHouse โ โ
โ โ (Elixir) โ โ (Analytics โ โ
โ โ โ โ Engine) โ โ
โ โโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโผโโโโโโโโ โ
โ โ PostgreSQL โ โ
โ โ (metadata) โ โ
โ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโKubernetes Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: plausible
namespace: analytics
spec:
replicas: 1
template:
spec:
containers:
- name: plausible
image: ghcr.io/plausible/community-edition:v2.1
ports:
- containerPort: 8000
env:
- name: BASE_URL
value: "https://analytics.yourdomain.com"
- name: DATABASE_URL
value: "postgres://plausible:pass@postgres:5432/plausible"
- name: CLICKHOUSE_DATABASE_URL
value: "http://clickhouse:8123/plausible"
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: plausible-secrets
key: secret-key
- name: TOTP_VAULT_KEY
valueFrom:
secretKeyRef:
name: plausible-secrets
key: totp-key
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "1Gi"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: clickhouse
namespace: analytics
spec:
replicas: 1
template:
spec:
containers:
- name: clickhouse
image: clickhouse/clickhouse-server:24.3-alpine
ports:
- containerPort: 8123
volumeMounts:
- name: data
mountPath: /var/lib/clickhouse
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50GiBypass Ad Blockers (Reverse Proxy)
# Nginx config - proxy the tracking script through your domain
location /js/visits.js {
proxy_pass https://analytics.yourdomain.com/js/script.js;
proxy_set_header Host analytics.yourdomain.com;
}
location /api/event {
proxy_pass https://analytics.yourdomain.com/api/event;
proxy_set_header Host analytics.yourdomain.com;
proxy_set_header X-Forwarded-For $remote_addr;
}Script tag on your site:
<script defer data-domain="yourdomain.com" src="/js/visits.js"></script>This bypasses ad blockers because the script loads from your own domain.
Custom Events
Track conversions without cookies:
// Track signup
plausible('Signup', {props: {plan: 'pro', source: 'blog'}})
// Track download
plausible('Download', {props: {file: 'whitepaper.pdf'}})
// Track outbound link
plausible('Outbound Link', {props: {url: 'https://calendly.com/lucaberton'}})Migration from GA4
Plausible imports historical GA4 data:
- Export from GA4 (Google Takeout or API)
- Plausible Settings โ Import Data โ Google Analytics
- Historical data appears in same dashboard
Resource Requirements
| Scale | Visitors/mo | RAM | CPU | Storage |
|---|---|---|---|---|
| Small | under 100K | 512MB | 0.5 | 10GB |
| Medium | 100K-1M | 2GB | 1 | 50GB |
| Large | 1M-10M | 4GB | 2 | 200GB |
| Enterprise | 10M+ | 8GB+ | 4+ | 500GB+ |
Plausible is incredibly efficient โ a single small VPS handles 100K visitors easily.