OpenSourcePicks

Open source alternatives to popular software, with live GitHub data

GitHub stats refreshed every day

Swetrix

Cookieless web analytics with error tracking, performance monitoring, funnels and session replay

Open source alternative to

Visit SwetrixGitHubDocumentation

Main features

  • Pages, referrers, UTM campaigns, devices and locations with a map view
  • Real-time dashboard
  • Custom events with properties, and goals
  • Funnels
  • Sessions, user flows and user profiles
  • Client-side error tracking
  • Real-user performance monitoring (TTFB, DNS, TLS and render timing)
  • Session replay
  • Public or password-protected shared dashboards
  • Google Analytics 4 import and Google Search Console integration

What Swetrix does

Swetrix pairs privacy-friendly traffic analytics with two things most analytics tools leave to separate services: client-side error tracking and real-user performance monitoring, which reports timings such as time to first byte, DNS, TLS and rendering. On top of the usual reports it has custom events, goals, funnels, user flows, session replay and shared dashboards, and it can import historical Google Analytics 4 data.

Privacy and cookies

Swetrix says it uses neither cookies nor local storage for tracking. Sessions are identified by an irreversible hash of a random salt that changes every day, the project ID, the IP address and the user agent; the IP address and user agent are processed in memory and not stored. A returning visitor therefore counts as new on each new day, which is also why Swetrix does not show user retention statistics.

The project says standard analytics needs no consent banner. If you pass your own user IDs or turn on session replay, the documentation advises checking whether you need consent. The official site gives the script size as under 5 KB.

Self-hosting Swetrix

The self-hosted Community Edition runs with Docker Compose from the separate selfhosting repository. It uses ClickHouse and Redis behind Nginx, plus an S3-compatible bucket if you want session replays, and at least 2 GB of RAM is recommended. Updates often involve applying database migrations by hand.

Community Edition includes the core analytics, funnels, performance monitoring, error tracking and session replay. Revenue analytics, experiments, the AI assistant, alerts and notifications, email reports, organizations with role-based access and ISP analytics are cloud-only, and Community Edition receives features later than the cloud.

Hosted version

Swetrix Cloud is hosted on Hetzner in Germany. It has paid plans with a 14-day trial that asks for a payment method; no permanent free plan is listed.

License

The Community Edition is AGPL-3.0, while the backend/apps/cloud directory in the same repository is proprietary and needs a license key. The tracking packages are MIT. If license purity matters to you, note that the repository is not open source in its entirety.

Limitations

Several team and reporting features exist only in the cloud, retention reports are not available because of the daily salt, and self-hosted upgrades take some manual work.

Who it suits

Swetrix suits site owners and small teams who want one script for privacy-friendly analytics, front-end errors and page performance, and developers who would otherwise run a separate error tracker for a modest site.

License details

AGPL-3.0. Except the backend/apps/cloud directory, which is proprietary. Contributors sign a Contributor License Agreement.

Technical details

Self-hosting needs

  • ClickHouse
  • Redis

Built with

  • TypeScript
  • NestJS
  • React Router

GitHub topics

  • charts
  • clickhouse
  • docker
  • gdpr
  • google-analytics
  • metrics
  • monitoring
  • mysql
  • nestjs
  • privacy
  • redis
  • self-hosted
  • selfhosted
  • statistics

Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.