Open jure opened 10 years ago
The following are just some notes I made about this feature:
We need to build user facing analytics, the technology I propose to use to store this data is Redis.
What do we want the users to see?
How do we store this?
The page views we store like counters in redis and just increment that, e.g. INCR paper:34:views. But how do we prevent manipulation, i.e. only count uniques? Look at how impressionist does this, as their whole schtick is that they record impressions.
For every visit, we also need to keep information about ip, browser and referrers.
We could store these in hashes in redis sets. How do other people do this?
This looks like it covers most of the basics: http://www.ebrueggeman.com/blog/redis-visitor-tracking
For the dashboard/charts themselves, this looks like a good example to learn from: https://github.com/saturnine/redis_analytics
We need to close the loop and show our contributors what impact their gists are having. We can start doing that by building a really simple dashboard, that just shows a neat graph of how many unique visitors each gist has received, and also displaying that number on the gist itself, publicly.