This project uses the method of frontend requesting backend and backend recording data to track visitor statistics, giving static websites the ability to display visitor data. The project also utilizes cookies to prevent duplicate data submissions and ensure accurate visitor count. Originally, I only intended to use it for my own website, but later I decided to make it open source (although it doesn't really matter whether the JavaScript script is open source or not).
The backend is built on Tencent Cloud's serverless cloud functions, ensuring fast access speed within China. After testing, the response time is consistently under 50ms, which I think is quite good.
Project link: https://github.com/zhishixiang/visitorStatistic. Since I just started learning, the code is very bad, so please go easy on me.
2022.6.13
--- Dude, your password has been leaked.