Last update at :2024-01-22,Edit by888u
When we want to understand the visitor access to our website, we usually choose statistical tools such as 51LA, CNZZ, Google Analytics, Baidu Statistics, etc. However, if the webmaster only needs to check PV, UV, source, landing page, equipment status and other information If so, here is an open source website statistical analysis tool Umami recommended.
Umami is a simple, easy-to-use, self-hosted web analytics solution that is a simple, fast website analytics alternative to Google Analytics. The goal is to provide everyone with a friendlier, privacy-focused alternative to Google Analytics. Umami only collects the metrics that everyone cares about, and everything fits into a single page.
Umami has the following advantages:
- Simple analysis: Umami only measures the important metrics you care about: pageviews, devices used, and where visitors are coming from, all displayed on a single page.
- Multisite: Umami is capable of tracking an unlimited number of websites with a single installation, and you can even track subdomains and individual URLs.
- Lightweight: The tracking script is small (less than 6kb) and supports older browsers such as IE.
- Multiple accounts, privacy-focused, open source.
Umami installation and deployment tutorial:
Preparation materials: Server with Node.js 10.13 or higher; database (MySQL or Postgresql)
Get the source code and install the package:
git clone https://github.com/mikecao/umami.git cd umami npm installCreate database table:
MySQL
mysql -u username -p databasename < sql/schema.mysql.sqlPostgresql
psql -h hostname -U username -d databasename -f sql/schema.postgresql.sqlConfiguring Umami
Create file .env with the following content:
DATABASE_URL=(connection url) HASH_SALT=(any random string)URL connection format:
postgresql://username:mypassword@localhost:5432/mydb mysql://username:mypassword@localhost:3306/mydbGenerate database client:
MySQL: npm run build-mysql-client Postgresql: npm run build-postgresql-clientThen run:
npm run buildStart the program:
npm startAccess address: http://your server ip:3000
Finally,
- Umami project address: GitHub
- Umami details: https://umami.is/docs/login
- Relatively speaking, Umami's functions are only sufficient. Whether to use it depends on your own situation.
- For domain name access, just reverse the port directly.
Recommended site searches: Which Hong Kong space is better, Guangzhou host rental, cn domain name personal registration anti-complaint vps host, registration-free jsp space, Hong Kong cloud server 10 yuan a year, registration number query, US host reviews, US virtual host, Rent a server,
发表评论