XF 2.2 API for increasing/decreasing online users count.

bob2bob

Member
Does anyone know if there is a specific API endpoint intended for increasing the "members online count"?

We are using the API to build a mobile app and want to continue to show the true count on the web version with a full tally of online users and guests inclusive of our users on the mobile app.

I can't seem to find a way to do this currently via the API and would rather not have to resort to ghost logging in the user on a hidden webview of the web app as that would be both inefficient and also a strange hack making the code more difficult to maintain.
 
thanks @Brogan any thoughts on a way to keep the count accurate if we have users on a mobile app then? Or are we forced to do a ghost login via a hidden webview of our forum?

i'd have expected that the API would be able to add individual users to that count when their userID hits the API but it doesn't work like that
 
Honestly, a better option would just be to not show online users in web or app. It doesn't scale well, and doesn't serve any useful purpose whatsoever for non-admin/moderators (in fact you could argue it's a tool for spammers to know which users are online, so which would be most effective to spam via conversations). It doesn't "attract" more users because the only people looking at it are already online (think back to the number of times you told your friends about a site purely based on the number of users that were online at once... my guess is zero). The only users I've found it useful for are moderators/admins, and you can already choose to show it only to them.

Imagine for a moment if anything outside of a small site/app did it... Twitter, Google, Facebook, Instagram, Slack, Uber, etc. Do normal end users have any need to know how many users are using the site/app right now? Not really...

It's less resource intensive (the query to get those numbers start to become very costly as more users are online), and it's also a lot easier development-wise to not try to inflate the number with app users (no development to do).
 
very valid points @digitalpoint but it's also a way for us to attract potential new sponsors and show existing sponsors some of the value we provide
A better option is simply to put together a press kit that includes actual analytics for them. Just giving them a number of online users doesn't really mean a whole lot. Think about the difference between, "We have 50,000 online users right now!" vs. "We have 1,000,000 active monthly registered users that each have an average of 12 different usage sessions in the month. Each of those sessions average 9 different screen views spanning 26 minutes of engagement."

Basically if you want to attract sponsors/advertisers of any real value, you need something of more substance than an "online now" number that leaves a lot of questions. Is it a real number? What do you consider online (is it someone that did something in the last 5 seconds, 15 minutes, 24 hours, 30 days)? Is it registered users only? Are non-human users included? etc, etc.
 
Top Bottom