---
title: "Statistics made simple"
url: https://daily.dev/posts/statistics-made-simple-wbith41zs
source_url: https://tonsky.me/blog/clj-simple-stats/
type: article
source: "tonsky.me"
published: 2025-12-21T14:23:33.302Z
updated: 2025-12-21T14:23:55.418Z
tags: ["webdev", "self-hosting", "duckdb", "clojure"]
reading_time: 5
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Statistics made simple

**[tonsky.me](https://daily.dev/sources/tonsky)** · 5 min read · 1 upvotes · 0 comments

## Summary

A Clojure developer built a lightweight, self-hosted web analytics library called clj-simple-stats as an alternative to bloated solutions like Google Analytics. The library integrates as Ring middleware with zero configuration, distinguishes between request types (live users, RSS feeds, bots), properly counts RSS reader subscribers from User-Agent headers, and provides semantically correct visualizations using bar charts instead of misleading line graphs. It uses DuckDB for storage and offers basic filtering by page, referrer, and date. Future improvements include spike analysis, GeoIP data, referrer signal extraction, and performance optimization through pre-calculated aggregates.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tonsky.me/blog/clj-simple-stats/>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#self-hosting](https://daily.dev/tags/self-hosting), [#duckdb](https://daily.dev/tags/duckdb), [#clojure](https://daily.dev/tags/clojure)

[View this post on daily.dev](https://daily.dev/posts/statistics-made-simple-wbith41zs)
