I find analytics that is not actionable in any way a waste of time. For example, checking the Insights Traffic pane on GitHub on your own repos to see how many people viewed your repo or cloned it.
Well implemented analytics will let you see how to optimize your system to serve some end goals better and for that you need data. As well as know from where the traffic is coming from.
If analytics are used, it's best to implement them server side with something like Netlify so as to not send unnecessary JS to the client and keep pages light.
Links
Fathom - Simple, trustworthy website analytics. Built with Go & Preact. (Code)
Matamo - Open source alternative to Google Analytics.
LocustDB - Massively parallel, high performance analytics database that will rapidly devour all of your data.
Grafana - Tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More. (Grafana Backup Tool)
Cube.js - Open source modular framework to build analytical web applications.
Analytics.js - Hassle-free way to integrate analytics into any web application.
Kedro - Python library for building robust production-ready data and analytics pipelines. (Article)