DEV Community

Alex Spinov
Alex Spinov

Posted on

Plausible Analytics Has a Free Self-Hosted Option — Privacy-First Web Analytics Without Google

A marketing manager asked me to add Google Analytics to their site. I asked: "Do you need to know which city your users are in, or just which pages they visit?"

She wanted page views, top referrers, and device breakdown. That's it. I set up Plausible instead. The dashboard loaded in 200ms (not 3 seconds). No cookie banner needed. GDPR compliant by default.

What You Get Free (Self-Hosted)

Plausible is open-source. Self-host for free, or use their cloud at $9/month:

  • No cookies — GDPR/CCPA compliant without consent banners
  • 1KB script — vs 45KB for Google Analytics (45x lighter)
  • Real-time dashboard — page views, referrers, devices, countries
  • Goal tracking — custom events and conversions
  • UTM parameters — campaign tracking
  • API access — query your analytics programmatically
  • Revenue tracking — assign monetary values to goals
  • Email reports — weekly/monthly summaries
  • Shared links — public dashboards without login
  • Data export — your data is yours

Quick Start (Self-Hosted with Docker)

git clone https://github.com/plausible/community-edition
cd community-edition
cp .env.example .env
# Edit .env: set SECRET_KEY_BASE, BASE_URL

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Add the tracking script to your site:

<script defer data-domain="yoursite.com" src="https://analytics.yourserver.com/js/script.js"></script>
Enter fullscreen mode Exit fullscreen mode

Done. Analytics start flowing immediately.

Real Example: API Query

curl "https://analytics.yourserver.com/api/v1/stats/breakdown?site_id=yoursite.com&period=30d&property=visit:source" \
  -H "Authorization: Bearer YOUR_API_KEY"
Enter fullscreen mode Exit fullscreen mode
{
  "results": [
    {"source": "Google", "visitors": 1200},
    {"source": "Twitter", "visitors": 340},
    {"source": "Hacker News", "visitors": 890}
  ]
}
Enter fullscreen mode Exit fullscreen mode

What You Can Build

1. Multi-site analytics — track all your projects from one dashboard.

2. Content performance tracker — which blog posts drive traffic? Which CTAs convert?

3. Client reporting — shared public dashboards. No login needed for clients.

4. A/B test measurement — custom events for variant tracking.

5. Privacy-compliant analytics — EU clients love it. No cookie banner = better UX = more conversions.

Why Not Google Analytics

Privacy: Plausible doesn't track individuals. No cookies, no fingerprinting.

Speed: 1KB vs 45KB. Your Core Web Vitals will thank you.

Simplicity: One dashboard shows everything. No 200-report maze.

Ownership: Self-hosted = your data stays on your server. Forever.


Need web analytics automation? Email spinov001@gmail.com

More free tiers: 48+ Free APIs Every Developer Should Bookmark

Top comments (0)