DEV.co
Open-Source Observability · Swetrix

swetrix

Swetrix is an open-source, privacy-first web analytics platform that replaces Google Analytics without cookies or consent banners. It includes error tracking, performance monitoring, and session replays, deployable as a managed cloud service or self-hosted via Docker.

Source: GitHub — github.com/Swetrix/swetrix
1.1k
GitHub stars
61
Forks
TypeScript
Primary language
AGPL-3.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositorySwetrix/swetrix
OwnerSwetrix
Primary languageTypeScript
LicenseAGPL-3.0 — OSI-approved
Stars1.1k
Forks61
Open issues16
Latest releasev5.3.1 (2026-07-01)
Last updated2026-07-07
Sourcehttps://github.com/Swetrix/swetrix

What swetrix is

TypeScript/NestJS backend with ClickHouse or MySQL storage, Redis caching, and real-time dashboard. Tracks anonymized visitor behavior, custom events, performance metrics (TTFB, DNS, TLS), and client-side errors with aggregation and replay capabilities.

Quickstart

Get the swetrix source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/Swetrix/swetrix.gitcd swetrix# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

GDPR-compliant analytics for EU-focused businesses

Eliminates cookies and consent workflows; EU-hosted infrastructure; anonymized data collection by design. Suitable for sites requiring strict privacy compliance.

Unified monitoring to reduce tool sprawl

Consolidates analytics, error tracking, performance monitoring, and funnels into one product. Reduces cost and complexity compared to maintaining separate Google Analytics, Sentry, and NewRelic instances.

Self-hosted analytics for sensitive or air-gapped deployments

Community Edition runs on internal infrastructure with MySQL/ClickHouse backend. Data never leaves your servers; suitable for healthcare, finance, or government agencies.

Implementation considerations

  • AGPL-3.0 license: if self-hosted and modified for internal use, source disclosure may be required on distribution; review with legal before production deployment.
  • Self-hosting requires Docker, MySQL or ClickHouse, and Redis; plan for infrastructure provisioning, monitoring, and scaling.
  • Tracking script is lightweight (stated as 'small'), but data volume and ClickHouse query performance scale with traffic; test with production load.
  • Data anonymization is claimed (not verified); review Data Policy and pseudonymization approach for compliance with your privacy obligations.
  • Cloud version vs. Community Edition feature parity: session replays, experiments, and AI unavailable in self-hosted variant; ensure chosen tier meets requirements.

When to avoid it — and what to weigh

  • Need closed-source, proprietary guarantees — AGPL-3.0 license requires source disclosure if you modify and distribute. Commercial use of modified versions requires legal review.
  • Require session replay or advanced features without self-hosting — Session replays, revenue analytics, and AI features are Cloud-only. Community Edition omits these; self-hosting adds operational overhead.
  • Expect minimal ops burden at self-hosted scale — Self-hosting requires managing MySQL/ClickHouse, Redis, Docker orchestration, backups, scaling, and security updates. Not a plug-and-play appliance.
  • Need enterprise SLA or vendor support guarantees — Unknown commercial support model; no documented SLAs. Community Edition is community-supported only.

License & commercial use

AGPL-3.0 (GNU Affero General Public License v3.0). Requires source disclosure if modifications are distributed. Copyleft license; affects derivative works and commercial redistribution.

Commercial use of unmodified Cloud service or Community Edition is permitted under AGPL-3.0. However, if you modify the source code and distribute it (or use it in a SaaS offering), you must disclose source. Commercial support model and licensing terms for proprietary derivatives are not documented; requires vendor review before modifying for resale or closed-source deployment.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Project claims GDPR compliance and anonymized data handling; verification of privacy claims, encryption in transit/at rest, audit logging, and vulnerability disclosure policy are not documented in provided data. Self-hosted deployments inherit security responsibilities (TLS, database hardening, network isolation, access control). No security certifications, pentests, or CVE history provided.

Alternatives to consider

Plausible Analytics

Privacy-first, open-source, GDPR-compliant; similar positioning but narrower feature set (no error tracking or performance monitoring). Simpler deployment; different licensing model.

Google Analytics 4

Market-dominant; free tier. Requires cookies, consent, and sends data to US; fails GDPR for EU-only compliance. Feature-rich but requires separate error/perf tools.

Sentry (error tracking) + Datadog/New Relic (APM) + Google Analytics (web analytics)

Point-solution stack. Better UX and vendor support per domain, but higher operational and cost overhead; data fragmentation across platforms.

Software development agency

Build on swetrix with DEV.co software developers

Evaluate Swetrix Cloud free or deploy Community Edition. Requires infrastructure review for self-hosting; contact a Devco engineer for implementation planning.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

swetrix FAQ

Can we modify Swetrix for internal use without open-sourcing changes?
AGPL-3.0 applies to distributions. Internal use without external distribution may be permitted, but any SaaS or licensed derivative requires source disclosure. Consult legal before modification.
Does self-hosting include session replays and AI features?
No. Community Edition includes core analytics, custom events, sessions, funnels, performance, and error tracking. Session replays, revenue analytics, and AI are Cloud-only features.
What databases and infrastructure are required for self-hosting?
MySQL or ClickHouse (data store), Redis (cache), Docker (containerization), TLS/reverse proxy (security). ClickHouse recommended for larger deployments but adds operational complexity.
Is commercial support or SLA available?
Not documented in provided data. Cloud users can subscribe; support terms and response-time SLAs are unknown. Community Edition is community-supported.

Work with a software development agency

Adopting swetrix is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source observability software in production.

Ready to migrate from Google Analytics?

Evaluate Swetrix Cloud free or deploy Community Edition. Requires infrastructure review for self-hosting; contact a Devco engineer for implementation planning.