forum traffic graph - unique visitors vs pageviews

This commit is contained in:
psychobunny
2014-09-27 18:00:12 -04:00
parent 2b329b8337
commit d79b6b3803
5 changed files with 137 additions and 7 deletions

View File

@@ -50,12 +50,9 @@ middleware.updateLastOnlineTime = function(req, res, next) {
middleware.incrementPageViews = function(req, res, next) {
var today = new Date();
today.setDate(today.getDate());
today.setHours(today.getHours(), 0, 0, 0);
db.sortedSetIncrBy('analytics:pageviews', 1, today.getTime());
db.sortedSetIncrBy('analytics:pageviews', 1, today.getTime());
next();
};