Skip to content

statalog/analytics

Repository files navigation

Statalog

Privacy-first, self-hosted web analytics.
No cookies. No cross-site tracking. No personal data stored. GDPR-compliant out of the box.

Latest release License PHP 8.3+ Laravel 13


Statalog is an open-source alternative to Google Analytics, Matomo and Plausible. Drop a single 2KB script on your site, keep the data on your own server, and get a fast, modern dashboard with everything you need to understand your traffic — nothing you don't.

Features

  • Real-time dashboard — unique visitors, sessions, pageviews, bounce rate and average visit duration, with period-over-period comparison
  • Top pages, traffic sources, devices, browsers, operating systems, screen resolutions, countries and cities
  • Live Stats — see who is on your site right now, which pages they are viewing, and how traffic is trending minute by minute
  • Multi-site support — track as many websites as you want from a single installation, switchable from the sidebar
  • Lightweight tracking script — under 2KB, cookieless, honors Do Not Track
  • Anonymous visitor identification — HMAC-SHA256 with a daily rotating salt. No raw IPs stored. Visitors cannot be tracked across days.
  • Privacy controls — exclude internal IPs, hide city-level data, per-visitor localStorage opt-out
  • Dark mode, responsive UI, keyboard-friendly
  • Admin created via a single Artisan command — no public signup on self-hosted installs

Requirements

  • PHP 8.3+
  • Composer 2
  • MySQL 8 or MariaDB 10.11+
  • ClickHouse — stores the raw hit data
  • Redis — queue and cache
  • Node.js 20+ (only for building front-end assets)

Quick start

# 1. Clone
git clone https://github.com/statalog/analytics.git statalog
cd statalog

# 2. Install dependencies
composer install --no-dev
cp .env.example .env
php artisan key:generate

# 3. Configure .env — set DB_*, CLICKHOUSE_* and REDIS_* connection details

# 4. Run migrations (MySQL + ClickHouse)
php artisan migrate

# 5. Create your admin user
php artisan statalog:create-admin

# 6. Serve it
php artisan serve

Visit http://localhost:8000/login, sign in, add your first website, and copy the tracking snippet into the <head> of the site you want to track.

Tracking script

Paste the generated snippet into the <head> of every page you want to track:

<script defer data-site-id="SA-XXXXXXXXXXXXX" src="https://your-statalog-domain.com/js/tracker.js"></script>

That's it. Pageviews start flowing within seconds.

Tech stack

PHP 8.3 · Laravel 13 · Bootstrap 5 · Chart.js · ClickHouse · Redis · MySQL

Roadmap

Statalog 1.0 focuses on the core real-time dashboard. More features are rolling out in subsequent releases — campaigns and UTM drill-down, goal tracking, conversion funnels, custom events, public shared dashboards and more. Stars and feedback on the issues page help shape priorities.

Cloud hosting

Prefer a managed instance with one-click setup, automatic upgrades, SSL and backups? statalog.com offers hosted Statalog with a free tier.

Contributing

Bug reports and pull requests are welcome. Please open an issue first for anything larger than a small fix so we can discuss the approach.

License

Statalog is released under the GNU AGPL-3.0 license.

About

Statalog - Open-source alternative to Google Analytics, Matomo and Plausible. Privacy-first, self-hosted web analytics. No cookies. No cross-site tracking. No personal data stored. GDPR-compliant out of the box.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors