I myself find it useful to send events from web servers or other microservices. That snippet is from my own website written in Jolie, to track downloads of my research papers. (Sending these events from the server has the nice consequence that you do not track extra information from the web browser.)