https://github.com/2mal3/nano-analytics
An extremely lightweight and privacy-preserving analytics platform for self-hosting.
https://github.com/2mal3/nano-analytics
Last synced: 2 months ago
JSON representation
An extremely lightweight and privacy-preserving analytics platform for self-hosting.
- Host: GitHub
- URL: https://github.com/2mal3/nano-analytics
- Owner: 2mal3
- License: lgpl-3.0
- Created: 2024-04-21T11:32:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-31T16:09:34.000Z (4 months ago)
- Last Synced: 2025-01-31T17:24:55.743Z (4 months ago)
- Language: Go
- Homepage:
- Size: 3.03 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# nano-analytics
An extremely lightweight and privacy-preserving analytics platform for self-hosting. It's easy to set up and integrate into your services to anonymously track device, browser, country, date, and your own custom user actions. The statistics are then easily accessible through a web UI.
The main idea of this application is based on [this](https://herman.bearblog.dev/how-bear-does-analytics-with-css/) very interesting article from Herman's blog.The statistics can be viewed at the `http:///stats` url with the correct credentials.
## Setup The Server
I highly recommend using Docker (image: `ghcr.io/2mal3/nano-analytics:latest`).
### Required Configuration
- environment (env) variable: `ADMIN_USERNAME` (default `admin`)
- env variable: `ADMIN_PASSWORD_HASH` (bcrypt hash of the password, can be generated ith `mkpasswd -m bcrypt ""`)
- forward port `1323`
- volume for `/app/database`## Integration Into Your App
Somehow call the URL `http[s]:///track/[?action=&referrer=]` from the client. Where the application identifier and the action can be any string of your choice.
For example, a website could do this with the following css class:
```css
body:hover {
border-image: url("");
}
```