https://github.com/betterlytics/betterlytics
Privacy-first analytics built with Rust, ClickHouse & Next.js
https://github.com/betterlytics/betterlytics
analytics clickhouse cookieless gdpr nextjs privacy react rust web-analytics
Last synced: 10 months ago
JSON representation
Privacy-first analytics built with Rust, ClickHouse & Next.js
- Host: GitHub
- URL: https://github.com/betterlytics/betterlytics
- Owner: betterlytics
- License: agpl-3.0
- Created: 2025-04-25T14:35:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-23T18:59:43.000Z (10 months ago)
- Last Synced: 2025-08-24T05:14:19.285Z (10 months ago)
- Topics: analytics, clickhouse, cookieless, gdpr, nextjs, privacy, react, rust, web-analytics
- Language: TypeScript
- Homepage: https://betterlytics.io/
- Size: 10.8 MB
- Stars: 35
- Watchers: 3
- Forks: 5
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Betterlytics

**A modern, Cookieless & privacy-focused analytics platform built for the future**
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://www.rust-lang.org/) [](https://nextjs.org/) [](https://reactjs.org/) [](https://www.typescriptlang.org/)
[](https://clickhouse.com/) [](https://www.postgresql.org/) [](https://www.docker.com/)
[Getting Started](#-getting-started) • [Dashboard](#-dashboard-preview) • [Benchmarks](#-performance-benchmarks) • [Roadmap](#️-roadmap) • [Community](#-community)
---
## Why Betterlytics?
Betterlytics is a **high-performance, privacy-first** analytics platform that puts you in control of your data. Built with modern technologies like Rust and ClickHouse, it delivers lightning-fast insights while respecting user privacy.
**Our core principles:**
- **Privacy-First**: GDPR, CCPA, and PECR compliant with no third-party tracking
- **Cookieless**: No cookies required, respects user privacy
- **Lightning Fast**: Built on Rust and ClickHouse for maximum performance
- **Lightweight Tracking**: Minimal impact on your website's performance
- **Self-Hosted**: Complete control over your data and infrastructure
- **Modern UI**: Beautiful, responsive dashboard built with Next.js 15 and React 19
- **Scalable**: Handles millions of events with ease
- **Developer Friendly**: Easy to deploy, customize, and extend
### Complete Feature Set
#### Core Analytics
| Feature | Description |
| ------------------------------ | --------------------------------------------------------- |
| **Page Analytics** | Detailed page views, bounce rates, and engagement metrics |
| **Referrer Tracking** | Complete referral source analysis and traffic attribution |
| **Geographic Insights** | Global visitor mapping with MaxMind GeoIP integration |
| **Device & Browser Detection** | Comprehensive device, OS, and browser analytics |
| **Campaign Tracking** | UTM parameter tracking and marketing campaign analysis |
| **Advanced Filtering** | Filter data across numerous dimensions and time ranges |
| **User Journey Mapping** | Visualize complete user paths through your site |
| **Conversion Funnels** | Track multi-step conversion processes and drop-off points |
| **Custom Events** | Track any custom interactions and business metrics |
#### Platform & Integration
| Feature | Description |
| ------------------------- | --------------------------------------------------------------------- |
| **Modern UI** | Beautiful dashboard built with Next.js 15, React 19, and Tailwind CSS |
| **Lightweight Script** | Minimal tracking script with zero performance impact |
| **SPA Support** | Full support for Single Page Applications and client-side routing |
| **Easy Integration** | Simple one-line script installation |
| **Performance Optimized** | Built on ClickHouse for sub-second query responses |
## Getting Started
Choose the option that works best for you:
### Cloud Hosting (Recommended)
Get started instantly with our free managed cloud service:
**[Start Free →](https://betterlytics.io/register)**
- ✅ **Free forever plan** - No trial, genuinely free for small sites
- ✅ **No setup required** - Ready in 30 seconds
- ✅ **EU infrastructure** - All data processed on EU-owned cloud infrastructure
- ✅ **Automatic updates** - Always latest features
- ✅ **Managed infrastructure** - We handle scaling and maintenance
- ✅ **99.9% uptime** - Enterprise-grade reliability
- ✅ **Premium support** - Get help from our expert team
- ✅ **Automatic backups** - Your data is safe and recoverable
- ✅ **Paid plans available** - Scale up when you need more
### Self-Hosting
Run Betterlytics on your own infrastructure for complete control and privacy.
**[Quick Setup Guide →](SETUP.md#quick-setup)**
- ✅ **Complete privacy** - Your data never leaves your servers
- ✅ **Full control** - Customize everything to your needs
- ✅ **No fees to us** - Your money goes to infrastructure providers
- ⚠️ **You manage everything** - Installation, maintenance, upgrades, security
- ⚠️ **Your responsibility** - Server capacity, uptime, backups, loading times
- ⚠️ **Infrastructure costs** - Server, CDN, backups, and associated costs
**[Setup Guide](SETUP.md#quick-setup)** | **[Docker Setup](SETUP.md#docker-setup)** | **[Development](CONTRIBUTING.md)**
---
## Dashboard Preview
### Overview

### Geography Insights

### User Journey Diagram

### Events and Live Event Insights

### Devices Breakdown

### Pages Breakdown

... and much more
## Performance Benchmarks
Betterlytics is built for speed. Here's how it performs:
### Request Handling
| Metric | Value | Notes |
| ------------------- | ------- | ---------------------------------- |
| **Requests/Second** | 25,000+ | Single instance |
| **Response Time** | <5ms | P95 for tracking requests |
| **Memory Usage** | x | Rust backend during stress testing |
| **CPU Usage** | x | During stress testing |
### Query Performance
| Query Type | Response Time | Dataset Size |
| ------------------- | ------------- | -------------- |
| **Overview Page** | x | 1M+ events |
| **Page Analytics** | x | 10M+ events |
| **User-Journey** | x | 100M+ events |
| **Geographic Data** | x | Global dataset |
### Scalability
- **Events/Day**: Tested up to xM+ events
- **Concurrent Users**: 1,000+ dashboard users
- **Data Retention**: Unlimited (depends on storage)
- **Geographic Distribution**: Multi-region support
> **Benchmarks performed on**: 1-core CPU, 4GB RAM, SSD storage
> **Last updated**: 06-07-2025
## Roadmap
We're constantly working to improve Betterlytics. Here's what's coming next:
### In Development
| Feature | Description |
| --------------------- | ------------------------------------------------------- |
| **Docker Deployment** | One-command deployment with Docker Compose |
| **REST API** | Full API access for custom integrations and data export |
| **Cloud Hosting** | Managed hosting option for easy deployment |
### Planned Features
| Feature | Description |
| -------------------------- | ----------------------------------------------------- |
| **Alerts & Notifications** | Custom alerts for traffic spikes and anomalies |
| **Advanced Reporting** | Scheduled reports and custom dashboards |
| **Integrations** | Connect with popular tools (Slack, Discord, Webhooks) |
| **A/B Testing** | Built-in experimentation platform |
| **AI Insights** | Automated insights and recommendations |
## Ideas & Suggestions
Have an idea for Betterlytics? We'd love to hear it!
- Open an [issue](https://github.com/betterlytics/betterlytics/issues) to suggest new features
- Join our discussions to share your thoughts
- Contribute code to help us build these features faster
---
## License & Attribution
This project is licensed under the [AGPL-3.0 License](LICENSE).
### Third-Party Components
Betterlytics includes components from other open source projects. See [THIRD-PARTY-LICENSES.md](THIRD-PARTY-LICENSES.md) for detailed attribution and license information.
---
## Community
Join our small community of developers and privacy advocates:
- **[Discord](https://discord.gg/vwqSvPn6sP)** - Get help, share ideas, and connect with other users and developers
- **[Bluesky](https://bsky.app/profile/betterlytics.bsky.social)** - Follow us for updates and announcements
- **[GitHub Issues](https://github.com/betterlytics/betterlytics/issues)** - Report bugs and request features
- **[GitHub Discussions](https://github.com/betterlytics/betterlytics/discussions)** - Ask questions and share feedback