Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Self-hosted busuanzi visitor statistics system built with Golang and Redis.
Busuanzi is a self-hosted website visit statistics tool written in Golang and backed by Redis that counts unique visitors (UV) and page views (PV) for both the whole site and individual subpages.
Busuanzi is a simple visitor statistics system built on Golang and Redis. It accepts requests from your website's script tag, logs each visit into Redis, and exposes the counts via a lightweight API. The project is maintained by soxft and is published on GitHub; it can be compiled from source or run with Docker.
docker-compose up -d and visit http://localhost:8080 to see the data.When a visitor loads a page, the embedded script sends a request to the self-hosted server. The server reads the visitor's identifier, stores it in Redis as a HyperLogLog for UV counting, and increments the page PV ZSet for the requested path. The data is stored under keys like bsz:site_pv:md5(host), bsz:site_uv:md5(host), and bsz:page_pv:md5(host)/md5(path).
Yes, the source code is available on GitHub and can be self-hosted without paying license fees or usage charges. The project also mentions CDN sponsorship from Tencent EdgeOne, but using the software itself is free.
It counts unique visitors (UV) and page views (PV) for your whole site and for each subpage. The counts are stored in Redis and can be displayed anywhere on your website by embedding a small script.
Yes, use the busuanzi-sync utility to import historical statistics from the original busuanzi service, or use bsz-transfer to move data between versions 2.5.x-2.7.x and 2.8.x.
Yes, Busuanzi is compatible with Pjax-enabled pages, meaning it will continue counting visits when content is asynchronously loaded without a full page reload.
The project only requires a Go runtime or Docker and a Redis instance, so it runs on any VPS or server that supports these. Exact resource numbers are not specified.
