I'm looking for a libraries that will allow me to gather statistics about web application. Hit counters for specific pages, information about visitors, time spent on the pages. It would help a lot if the library was open source and free to use as well.
Application will be built on Razor Pages and the statistics library should be able to use MySQL to store data. Because the entire application will be hosted on-premises I can't use Application Insights. (And probably anything else cloud based, especially if it's a paid service. However you can still give me ideas.)