busuanzi
$ gh repo view busuanzi --readme
busuanzi
A simple website statistics analyzer
self-hosted busuanzi
A simple visitor statistics system based on Golang + Redis
- Calculate the UV and PV of the website
- Calculate the UV and PV of the subpage
- One-click deployment using Docker
- Privacy protection only stores HASH
- Pjax compatible webpage
- Support migration from the original busuanzi
Installation
Support multiple running methods: compile and run from source code, run with Docker. See Install for details
Quick Start with Docker
- Edit the
docker-compose.yamlfile with your own configuration. - Run
docker-compose up -dto start the service. - Visit
http://localhost:8080to view the data.
Usage
Supports multiple custom attributes, compatible with pjax web pages, supports custom tag prefixes. See: Usage documentation
Principle
Busuanziuses Redis for data storage and retrieval. Redis, as an in-memory database, has extremely high read and write performance. At the same time, its unique RDB and AOF persistence mechanisms ensure the security of Redis data.
UV and PV data are stored in the following keys:
| index | Types | key |
|---|---|---|
| sitePv | String | bsz:site_pv:md5(host) |
| siteUv | HyperLogLog | bsz:site_uv:md5(host) |
| pagePv | ZSet | bsz:page_pv:md5(host) / md5(path) |
| pageUv | HyperLogLog | bsz:site_uv:md5(host):md5(path) |
Data Migration
- You can use the busuanzi-sync tool to sync data from the original busuanzi to the self-hosted busuanzi.
Upgrade Suggestions
- Please be sure to back up your data (dump.rdb) before upgrading.
- New and old version data may not be compatible, please pay attention to the instructions on the Release interface, upgrade cautiously
- 2.5.x - 2.7.x can use the bsz-transfer tool to migrate data to 2.8.x.
Other
Logo created by ChatGPT
Thanks
- CDN acceleration and security protection for this project are sponsored by Tencent EdgeOne: EdgeOne offers a long-term free plan with unlimited traffic and requests, covering Mainland China nodes, with no overage charges. Interested friends can click the link below to claim it ->
- Thanks to JetBrains for providing free student licenses for this project.
← Prev
已经是第一个项目
Next →
UrlShorter
comments
$ tail -n 20 comments/busuanzi.log
Comments
// project discussion
加载中...