mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
forum traffic graph - unique visitors vs pageviews
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user