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 very interesting article from Herman's blog.
The statistics can be viewed at the http://<server address>/stats
url with the correct credentials.
I highly recommend using Docker (image: ghcr.io/2mal3/nano-analytics:latest
).
- environment (env) variable:
ADMIN_USERNAME
(defaultadmin
) - env variable:
ADMIN_PASSWORD_HASH
(bcrypt hash of the password, can be generated ithmkpasswd -m bcrypt "<password>"
) - forward port
1323
- volume for
/app/database
Somehow call the URL http[s]://<server address>/track/<your application identifier>[?action=<a special action>&referrer=<the website 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:
body:hover {
border-image: url("<url>");
}