Hah, I did my own stat service too, inspired in early 2000's by AudioScrobbler and Last.fm before they joined forces. I was disappointed by the completeness and variety of statistics they offered, so the only option was to create my own.
My solution was to fill in full metadata for all my tracks, though, a pretty big task in itself that I also had to half-automate to achieve. I did consider how to release the stats service for others, too, but realized the number of people with impeccable metadata would be way too low.
My system is actually still running in the background, listening for MPRIS D-Bus track change events and writing them to a simple text file, occasionally flushing the changes from the file to a database for the stats display service -- written also with PHP like most web interfaces of the time.
My solution was to fill in full metadata for all my tracks, though, a pretty big task in itself that I also had to half-automate to achieve. I did consider how to release the stats service for others, too, but realized the number of people with impeccable metadata would be way too low.
My system is actually still running in the background, listening for MPRIS D-Bus track change events and writing them to a simple text file, occasionally flushing the changes from the file to a database for the stats display service -- written also with PHP like most web interfaces of the time.