Session for user live counter

:wave: Hello,

I’m planning to use a kirby site for a big livestream event. I would love to display the people watching the stream on the site. I thought about using the session feature. What is the best way to display the current online user count of the page?

Kirby does not track logged in users globally but in the separate session files. From these session files, you won’t know if the user is actually active or was just logged in at some point in the last two weeks.
You could probably write a route:after hook that updates a global list on each request. Be careful about the implementation though to avoid performance bottlenecks. For example you could add a check that only updates the activity timestamp if the currently stored one for that user is older than five minutes.