In the past, I have used Umeng, 51.la, Baidu Analytics, and Google Analytics, each with its own advantages and disadvantages. Currently, Baidu Analytics only allows registered websites to use it, and I didn't like the user experience of Umeng and 51.la. Google Analytics also had poor accessibility. After weighing the options, I decided to use this open-source website analytics service called Umami.
According to the official website, Umami is a simple, user-friendly, visually appealing, lightweight, fast, privacy-focused, and secure open-source free website analytics tool. From deployment to usage, everything is simple and fast, and the experience is also satisfactory.
The official documentation introduces various deployment methods, including using your own server or third-party platforms such as Netlify, Heroku, and Railway. However, these third-party platforms generally do not provide database services. Therefore, I chose to use the free database service provided by Supabase and the deployment service of Vercel.
Before using Umami, make sure to register and log in to GitHub, Vercel, and Supabase. Also, fork the Umami project repository on GitHub.
Setting up the database on Supabase#
On the official website, select the Free plan and go to the Create a new project page. Fill in the required information. You can enter any project name for the Name field. For the Database Password, you can use the "Generate a password" tool below to generate a password and save it for later use.
Wait for the database to be created. This may take a few minutes.
After the creation, click on Project Settings at the bottom left and select Database. Find the URL field in the Connection string and copy its contents. Replace [YOUR-PASSWORD]
with the password generated in the previous step.
The operations on the Supabase platform are now complete.
Deploying Umami on Vercel#
After logging in to Vercel, click on Add New Project in the top right corner and import the previously forked project repository.
In the Configure Project section, you need to set two environment variables: DATABASE_URL
and HASH_SALT
. The former is the URL copied from Supabase in the previous step, remember to replace it with your own password. The latter needs to be a randomly generated long string. Finally, click Deploy and wait for two minutes.
If necessary, you can bind your own domain name first because the domain name provided by Vercel cannot be accessed in mainland China.
Using Umami#
Following the above steps, Umami has been successfully deployed. Access the website through the bound domain name. The default username and password are admin
and umami
respectively. In the backend, you can change the password and set the language. Then, you can start adding websites.
Note: If you need to delete a website, switch the language to English as deletion is not possible in Chinese mode.