HitKeep: self-host privacy-friendly web analytics
说明与用途
HitKeep 是一个自托管、无 Cookie 的分析工具,运行在 Docker 容器中,后端使用 Traefik,数据存储在本地 DuckDB,绝不向第三方发送数据。
问题
Collect website analytics without sending visitor data to third parties, avoiding cookie banners and legal complexity.
结果
HitKeep provides a self‑hosted, cookieless analytics dashboard with page views, referrers, devices, and time on page, all stored locally and accessible via a simple script tag.
工作流
- Generate a 32‑byte JWT secret with
openssl rand -hex 32 - Create /opt/hitkeep directory and a compose.yaml with HitKeep image and environment variables
- Configure HITKEEP_PUBLIC_URL, HITKEEP_JWT_SECRET, HITKEEP_TRUSTED_PROXIES, and path variables
- Run
docker compose up -dand wait for Traefik to obtain a Let’s Encrypt certificate - Verify the tracking script is served at /hk.js
- Create an admin account via the web UI
- Add a site in HitKeep and copy the provided script tag
- Embed the script tag into the target website pages
证据
HitKeep turns that around: cookieless statistics on your server, under your domain, without a single byte ever going to third parties.
Generate a random 32-byte value – don't make one up, generate it: openssl rand -hex 32
- 记录日期: 2026-09-22T07:15:27.791Z