Credimus! Possumus! Vincimus!
🤍 ❤ 🤍
In the article, I show the differences in the website analytic metrics collected on the server- and client-side. It contains several dynamic values (e.g., pageviews or visits number, the date range, etc.) scattered throughout the text. To update them, I need to pass through the content and adjust them manually. So as I plan to bring the data in this post up to date regularly (I get new input every day), this task cumulatively could consume a lot of my time. Therefore, I have decided that the data in the post should be updated automatically. In this article, I describe how I have achieved this goal.
Some time ago, I wrote an article showing how much data is missed if you rely on only client-side web analytics numbers. To maintain this previous blog post in an actual state, I planned to update it from time to time. However, as you might expect, pretty soon, I got bored collecting manually Cloudflare and Google Analytics data and inserting it into a spreadsheet. As a normal human, I have decided to automate the process. Luckily, both systems provide the APIs that you can use to query and download the data. However, during the development of the data collection script, I discovered several limitations that inclined me to write a new blog post instead of updating the old one.
One of the reasons developers love Rust is its well-developed ecosystem. Clippy, a linter for the Rust code, is one of the main components in this ecosystem. It performs additional checks of the developed code reporting found issues and explaining how to fix them (and sometimes it even can fix them automatically). Its usage may be beneficial for Rust beginners and even professionals. In this article, I describe this tool and explain how to start using it.