Tracking Active Users
Hi, I was trying to figure out the best way to track my active users. It seems like there's a couple of ways I could do it but they don't necessarily seem convenient. Here's a list of the options I have considered:
- I was wondering if sessions would be modified in one way or another changing the updated_at value in the sessions table at least once a day so long as the fresh age was one day.
- Considering going off of the getSession and point but that of course fires constantly since it's used pretty frequently across the web application as it stands right now (which it probably shouldn't be but oh well)
- Considered using the lastLoginMethod plugin but discovered it does much the same thing as get session where it fires about 6-8 times.
- Hooking sign-in endpoints is helpful for tracking sign-ins but they don't give me visiblity on "activity" 
I'm firing logs for log in events to cloudwatch and I would prefer to avoid adding any new columns to the db. Was wondering if anyone else has been trying to accomplish this same kind of functionality. It seems like right now I should be leaning towards hooking into the getSession flow and somehow checking whether it's the first time the endpoint has been hit on that day and fire a log or something similar. Worst case scenario I go against my better judgement and try to customize the session or user tables to include a last_activity timestamp.
0 Replies