Problem
We have no visibility into how many distinct people use the UPLB Tools Discord server per day — useful for growth, volunteer engagement, and correlating with map/editor contribution spikes.
Goal
Track daily active users (DAU) on the Discord server and expose them to maintainers without violating privacy.
Definitions
- Active user (day): unique
userId with at least one qualifying event that calendar day (Asia/Manila midnight boundary, unless configured otherwise)
- Qualifying events (v1): sent a message in a text channel, or used a bot slash command, or added a reaction (configurable allowlist)
- Exclude: bots, webhooks, system messages
Acceptance criteria
Implementation notes
- Use
events/messageCreate, interactionCreate, messageReactionAdd handlers — debounce per user per day in memory + flush to DB
- Heroku dyno restart: reload today’s partial set from DB on boot
- GDPR-ish hygiene: no export of user IDs to public channels;
/dau restricted to maintainer role
Non-goals (v1)
- Per-channel heatmaps
- Cross-linking Discord users to Room TBA editor accounts (separate issue if needed)
References
Problem
We have no visibility into how many distinct people use the UPLB Tools Discord server per day — useful for growth, volunteer engagement, and correlating with map/editor contribution spikes.
Goal
Track daily active users (DAU) on the Discord server and expose them to maintainers without violating privacy.
Definitions
userIdwith at least one qualifying event that calendar day (Asia/Manila midnight boundary, unless configured otherwise)Acceptance criteria
{ date: YYYY-MM-DD, userIds: string[] }(Postgres table or existing bot DB)0 16 * * *UTC = 00:00 Manila) finalizes previous day count and stores aggregate{ date, dau, uniqueUserIdsCount }@analytics-opt-out) — excluded from counts/dau [days]— table or embed: last N days DAU + 7-day average#developmentor#stats(envDAU_REPORT_CHANNEL_ID): “DAU yesterday: N (7d avg: M)”docs/discord-server-guide.mdwhat is collected and retention policyImplementation notes
events/messageCreate,interactionCreate,messageReactionAddhandlers — debounce per user per day in memory + flush to DB/daurestricted to maintainer roleNon-goals (v1)
References
docs/discord-server-guide.md