One-click deployment of Umami statistics personal website visit data

When it comes to website statistics, the first thing everyone thinks of is Google Analytics. However, we all know that Google Analytics collects all user information without any control and privacy protection over the data.

Google Analytics collects so many metrics, many of which are unnecessary, that they may not be easy to understand without a Ph.D.

In comparison, open source website statistics tools may be more suitable for us. They can be deployed privately, while respecting the privacy of users, and can fully control their own data. The best of these are Umami and Plausible . Among them, the Umami architecture is more concise and easier to deploy. The specific advantages are as follows:

  • Simple and easy to use, only key indicators are tracked, and the data is clear and easy to read.
  • Unlimited tracking of websites and subdomains, unlimited in number.
  • Self-hosted deployments can bypass ad blockers, effectively avoiding ad blockers such as Google Analytics.
  • The code is light, the tracking script is only 2KB, and it supports old browsers such as IE.
  • Supports multi-user accounts, provides shared links, and can share statistical data publicly.
  • The page is optimized for mobile devices, so you can view statistics anytime, anywhere.
  • The data is self-controllable and does not need to be handed over to a third party, focusing on privacy.
  • The code adopts the MIT open source agreement, which is friendly to developers.
  • Multilingual support, built-in dark mode.
  • The API development is friendly, and the tracking configuration can be customized.

Umami's data is stored in the database and supports MySQL, PostgreSQL and Clickhouse. For Xiaobai, it is still a bit complicated to deploy. However, with the Sealos one-click deployment template, this problem is relatively simple, just move the mouse, and the battle can be resolved in 3 minutes .

One-click deployment of Umami

First open Umami's application template through the link below:

You only need to fill in a parameter APP SECRET , and just fill in a string for the value of this parameter. Then click "Deploy Application" directly.

After the deployment is complete, click OK to jump to the application details page, and you will find that the application cannot be started, because this template creates a PostgreSQL database and application at the same time, and the database does not yet have the ability to customize and initialize the database. Wait for the database backend to be upgraded to You can customize the database in the next version, and we need to do a little manual operation for the time being.

First open the "database":

Enter the details page of the umami database:

Directly click "One-click link":

This will enter the terminal of the database:

Create a new database umami with the following command :

create database umami;

Finally, exit the terminal, open "Application Management", enter the details page of the umami application, and you can see that the application has been successfully launched. View logs:

Access Umami

Click on the external network address to directly open Umami's web interface:

The default username is admin and the password is umami .

After entering the management interface, you must first create a website:

<head>Click "Edit" to enter the website settings, copy the tracking code, and paste it in your website .

The final effect is as follows:

rewrite path

Umami is an extremely privacy-respecting website statistics service that has nothing to do with ad tech and surveillance capitalism and does not collect any personal data. Even so, it may be blocked by certain ad filtering rules .

In order to avoid being accidentally killed by the ad filter, we can rewrite the path of the js script. According to the official documentation, we only need to add an environment variable.

Adding environment variables to Sealos is very simple, click "Change" on the application details page:

Expand the advanced configuration and click "Edit Environment Variables":

Add the environment variable TRACKER_SCRIPT_NAME=xxx , this value can be written casually, and does not need to be suffixed with .js , which makes it easier to bypass the detection of ad filters.

After confirmation, click "Change" and wait for the instance to restart successfully. Open the web interface again, and you will see that the js link in the tracking code has changed:

Sealos also provides a one-click deployment template for Plausible. If you are interested in Plausible, you can try:

Guess you like

Origin blog.csdn.net/alex_yangchuansheng/article/details/132227244