Swetrix
๐ Open source, privacy-first web analytics โ a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
Privacy-first, open-source web analytics โ with error tracking, session replays and performance monitoring built in. The project is written primarily in TypeScript, distributed under the GNU Affero General Public License v3.0 license, first published in 2021. It has gained significant community traction with 1,044 stars and 61 forks on GitHub. Key topics include: charts, clickhouse, docker, gdpr, google-analytics.
<a name="top"></a>
<p align="center"> <a href="https://github.com/Swetrix/swetrix"> <img src="https://swetrix.com/assets/readme-image.png?v=3" alt="Swetrix"> </a> <h3 align="center">Swetrix</h3> <p align="center"> Privacy-first, open-source web analytics โ with error tracking, session replays and performance monitoring built in. <br /> <a href="https://swetrix.com/demo"><strong>See the live demo ยป</strong></a> <br /> <br /> <a href="https://swetrix.com">Website</a> ยท <a href="https://docs.swetrix.com">Docs</a> ยท <a href="https://github.com/Swetrix/swetrix/issues">Issues</a> ยท <a href="https://swetrix.com/discord">Discord</a> ยท <a href="https://x.com/swetrix">Twitter</a> </p> </p> <p align="center"> <a href="https://swetrix.com"><img src="https://img.shields.io/badge/Try%20Swetrix%20Cloud-free%20trial-1d4ed8" alt="Try Swetrix Cloud"></a> <a href="https://docs.swetrix.com/selfhosting/how-to"><img src="https://img.shields.io/badge/Self--host-with%20Docker-555" alt="Self-host with Docker"></a> <a href="https://github.com/Swetrix/swetrix/stargazers"><img src="https://img.shields.io/github/stars/Swetrix/swetrix?style=flat&label=Stars" alt="GitHub stars"></a> <a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-green" alt="License"></a> </p> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://swetrix.com/assets/screenshot_dark.png?v=1"> <img alt="Swetrix dashboard" src="https://swetrix.com/assets/screenshot_light.png?v=1"> </picture>โน๏ธ What is Swetrix?
Swetrix is a cookieless, GDPR-compliant analytics platform โ a privacy-respecting alternative to Google Analytics. No cookies, no consent banner, no cross-device tracking, all data anonymised. It's the only thing on the page and the dashboard is fast and real-time.
It goes beyond pageviews: alongside traffic stats you get error tracking, performance monitoring, session replays, funnels and custom events โ so you can replace several tools with one.
Open source since 2021, bootstrapped, and funded entirely by our subscribers. Made in the ๐ฌ๐ง UK, hosted on Hetzner in ๐ฉ๐ช Germany.
๐ Try it free on Swetrix Cloud or self-host with Docker.
โจ Features
- Cookieless & privacy-first โ GDPR-compliant by design, no cookies, anonymised data. (Data Policy)
- Lightweight script โ a small tracking snippet and a snappy real-time dashboard.
- The metrics that matter โ top pages, geolocation with map view, devices, traffic sources and UTM campaigns.
- Network intelligence (Cloud) โ break traffic down by ISP, organisation, usage type (residential / business / hosting / cellular) and connection type to spot bot and datacenter traffic.
- Custom events & properties โ track conversions, sales or any key action with your own semantics.
- Sessions & user flows โ understand journeys and behaviour across your site.
- Funnels โ visualise drop-offs and improve conversion rates.
- Performance monitoring โ real-user metrics (TTFB, DNS, TLS, render) to keep pages fast.
- Error tracking โ capture client-side errors with details and aggregated views.
- Session replays (Cloud) โ replay sessions to see exactly where visitors get stuck.
- Sharing & teams โ public or password-protected dashboards; invite teammates with roles, or manage access with organisations.
- Data portability โ export to CSV and access everything via the developer API.
- More โ alerts & notifications, feature flags, A/B experiments, revenue analytics and Ask AI (Cloud).
Swetrix vs Google Analytics vs Plausible
Swetrix and Plausible are both privacy-first and open source; the main difference is scope โ Swetrix bundles error tracking, performance monitoring and session replays into the same product.
| Swetrix | Google Analytics 4 | Plausible | |
|---|---|---|---|
| Cookieless, no consent banner | โ | โ cookies + consent | โ |
| GDPR-compliant, EU-hosted | โ | โ ๏ธ data sent to US | โ |
| Open source (AGPLv3) | โ | โ | โ |
| Self-hostable | โ | โ | โ |
| No data sampling | โ | โ samples at scale | โ |
| Real-time dashboard | โ | โ ๏ธ limited | โ |
| Funnels | โ | โ | โ (paid plans) |
| Custom events | โ | โ | โ |
| Performance monitoring | โ | โ | โ |
| Error tracking | โ | โ | โ |
| Session replays | โ Cloud | โ | โ |
| Feature flags & A/B experiments | โ Cloud | โ | โ |
| Revenue / MRR analytics | โ Cloud | โ ๏ธ ecommerce setup | โ |
| Ask AI / chat with your data | โ Cloud | โ | โ |
| User profiles / identified users | โ Cloud | โ | โ |
๐ Get started
Swetrix Cloud (recommended)
We handle hosting, maintenance, backups and a worldwide CDN โ you keep full ownership of your data and can export or delete it anytime. GDPR-compliant and hosted in the EU.
- Start free โ โ free trial, then from $19/mo
- Live demo โ
- Docs โ
Your subscription directly funds maintenance and development of the open-source project.
Self-hosting
Prefer to run it yourself? Swetrix Community Edition (CE) ships the same core analytics: privacy-friendly traffic stats, custom events, sessions, funnels, performance and error tracking. Deploy the API and UI with Docker, connect MySQL / ClickHouse / Redis, and you're live.
Cloud vs Community Edition
| Swetrix Cloud | Swetrix Community Edition | |
|---|---|---|
| Infrastructure management | โ Set up tracking in minutes. We manage server maintenance, upgrades and security for you. | โ ๏ธ You manage servers, installs, upgrades, scaling and backups. |
| Core analytics (traffic, events, sessions, funnels, performance, errors) | โ Included | โ Included |
| Session replays | โ Included | โ ๏ธ Cloud only |
| Advanced features (Revenue, Experiments, AI) | โ Included | โ ๏ธ Cloud only |
| Teams & sharing | โ Organisations, role-based access, direct invites, public and password-protected links. | โ ๏ธ Direct project invites, password-protected links and public projects only. |
| Alerts & notifications | โ Email, Slack, Telegram, Discord, webhook, web push | โ ๏ธ Not included |
| Email reports | โ Weekly / monthly / quarterly | โ ๏ธ Not included |
| Geo & network analytics | โ Premium GeoIP for accurate country / region / city, plus ISP, organisation, usage type and connection type. | โ ๏ธ DB-IP City Lite (country / region / city only); a paid MaxMind or DB-IP database is needed for network breakdowns. |
| Release schedule | โ Continuous updates, deployed as soon as ready | โน๏ธ Periodic open-source releases; newest features arrive later. |
| Support | โ Premium support from the team building Swetrix | โ ๏ธ Community support on Discord and forums. |
| Costs | โ Bootstrapped business โ your money directly funds Swetrix development. | โ ๏ธ You pay for servers, maintenance, backups and domains. |
๐ ๏ธ Tech stack
- Backend / API โ Nest.js, MySQL + TypeORM (accounts, projects), ClickHouse (analytics), Redis (caching).
- Frontend โ React Router, Tailwind CSS, billboard.js for charts.
- Tracking script โ
packages/tracker-js, theswetrixnpm client, TypeScript bundled with rollup.
๐ค Contributing
We welcome contributions! See the contributing guide and browse open issues to pick something up.
โญ๏ธ Star History
If Swetrix is useful to you, star the repo โ it genuinely helps a bootstrapped team and motivates us a lot ๐
<a href="https://www.star-history.com/#swetrix/swetrix&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=swetrix/swetrix&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=swetrix/swetrix&type=date&legend=top-left" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=swetrix/swetrix&type=date&legend=top-left" /> </picture> </a>๐ฌ Contact
- Email: contact@swetrix.com
- Book a call: swetrix.com/book-a-call
- Discord: join the community
- Twitter: @swetrix
- Author: I post about Swetrix and solopreneurship at @andrii_rom
๐ License
Swetrix Community Edition is open source under the GNU Affero General Public License v3 (AGPLv3). See the LICENSE file. Source code contributions are subject to the Contributor License Agreement.
ยฉ 2021 - present, Swetrix Ltd.
Contributors
Showing top 12 contributors by commit count.
