How to Set Up Plausible Analytics (Privacy-Friendly)
Plausible Analytics is a lightweight, open-source web analytics tool that provides meaningful insights without invasive tracking. It is fully compliant with GDPR, CCPA, and PECR — no cookies, no personal data collection, and no consent banners required. Self-hosting Plausible on your Breeze ensures that your analytics data never leaves your infrastructure.
Prerequisites
- A Breeze instance with at least 2 GB of RAM (4 GB recommended for larger sites)
- Docker and Docker Compose installed
- A domain or subdomain (e.g.,
analytics.example.com)
Step 1 — Clone the Hosting Repository
Plausible provides an official self-hosting repository with all necessary configuration:
git clone https://github.com/plausible/community-edition ~/plausible
cd ~/plausible
Step 2 — Configure the Environment
Create the plausible-conf.env file with your settings:
BASE_URL=https://analytics.example.com
SECRET_KEY_BASE=$(openssl rand -hex 32)
TOTP_VAULT_KEY=$(openssl rand -base64 32)
MAILER_EMAIL=analytics@example.com
SMTP_HOST_ADDR=mail.example.com
SMTP_HOST_PORT=587
SMTP_USER_NAME=analytics@example.com
SMTP_USER_PWD=your-smtp-password
SMTP_HOST_SSL_ENABLED=true
Step 3 — Launch Plausible
docker compose up -d
The stack includes the Plausible web app, ClickHouse for analytics data storage, and PostgreSQL for user and site configuration. Allow about 60 seconds for ClickHouse to initialize on first boot.
Step 4 — Reverse Proxy Setup
Configure Nginx to forward traffic to Plausible on port 8000:
server {
listen 443 ssl http2;
server_name analytics.example.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Step 5 — Add Your Website
Register your account at https://analytics.example.com, then add your first site. Plausible will generate a lightweight tracking script (under 1 KB) to add to your website:
<script defer data-domain="yoursite.com"
src="https://analytics.example.com/js/script.js"></script>
Add this snippet to the <head> section of every page you want to track.
Dashboard Overview
The Plausible dashboard shows at a glance:
- Unique visitors and page views with trend indicators
- Bounce rate and visit duration averages
- Top pages — which content gets the most traffic
- Traffic sources — referrers, search engines, social media, and campaigns
- Locations — visitor countries, regions, and cities
- Devices — browser, OS, and screen size breakdowns
Advanced Features
- Goal tracking — track button clicks, form submissions, and custom events
- UTM parameters — monitor marketing campaign performance
- Custom properties — send custom dimensions with events for deeper analysis
- API access — query your analytics data programmatically
- Email reports — receive weekly or monthly traffic summaries