View Counters

Authored by yiays on Sep 12, 2018

I recently added a view counter, now it's possible to see some interesting statistics on the popularity of articles over time!

The view counter is the little graph on the top of each blog post. This shows the popularity of each article over the last 5 days, weeks or months (depending on the age of the article). It was incredibly challenging to implement.

The view couning system is now fully functional, it counts a view as the user mousing over a blog post at least once in a page. Once that heuristic is reached, the browser requests that the blog API records that view at that time, counts up how many views happen a day, and returns a list of days and the views associated with the given timespan.

I'm very proud of this solution, I originally attempted to use a javascript graphing library before deciding that it was too complex for this task and would introduce way too much overhead.


This is a test comment