
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
active-user
Advanced tools
The active-user modules allows you to quickly track daily, weekly, and monthly active users in Redis.
You can install the active-user module via npm. You will also need to have a Redis server instance running.
npm install active-user
Once active-user is installed we need a client:
var activeUser = require('active-user');
var activity = activeUser.createClient(REDIS_PORT, REDIS_HOST, REDIS_OPTIONS);
###activity.track(id, [action]);
Tracking is a very simple operation:
activity.track(10, 'commented');
activity.track(1);
Where the id is the id of the user you want to track and the action is the action they performed.
###activity.untrack(id, [action]);
You may also undo a tracked action for a user with untrack:
activity.untrack(10, 'commented');
activity.untrack(1);
You can fetch the daily, weekly, and monthly active users easily:
###activity.daily([action], [date], callback);
// Fetching the number of users who commented on Nov 21, 2013
activity.daily('commented', '2013-11-21', function (err, num) {
console.log(num);
});
// Fetching the number of daily active users for the current day
activity.daily(function (err, num) {
console.log(num);
});
###activity.weekly([action], [date], callback);
// Fetching the number of users who commented the week containing Nov 21, 2013
activity.weekly('commented', '2013-11-21', function (err, num) {
console.log(num);
});
// Fetching the number of daily active users for the current week
activity.weekly(function (err, num) {
console.log(num);
});
###activity.monthly([action], [date], callback);
// Fetching the number of users who commented the month of Nov 2013
activity.monthly('commented', '2013-11', function (err, num) {
console.log(num);
});
// Fetching the number of daily active users for the current month
activity.monthly(function (err, num) {
console.log(num);
});
FAQs
Easily track daily, weekly, and monthly active users with Redis.
We found that active-user demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.