Either way works just as well, as I think. I just have a personal preference to collection information and act on it seperately, rather than do logic at the collection level. There's really only two SQL statements to do something like this:
To log a timestamp for a particular game/product (could also set a variable like $now = time() in PHP, instead of using SQL functions):
To get the current number of players (900 seconds needs to match the client reporting frequency):
INSERT INTO active_players (
I see the benefits as being more accurate statistics (still a ping window to deal with, but can generate the active count anytime), and the ability to add more functionality on top (could log a unique machine hash or identifier to detect player session length and get stats on repeat visitors).
SELECT count(*) as countActivePlayers
WHERE game_id = 1
AND timestamp > unix_timestamp() - 900