In the custom plugin I use on my site, I’ve developed an admin panel that displays a Live Traffic panel that shows the access.log in real time. A js script fetches the tail of the access.log and displays a selectable number of lines in the panel.
It uses a REST call to retrieve log entries to show:
Time
IP
Location
Method
Path and referrer stacked on top of each other
Status
Bytes sent-Time it took to process the query
Browser/Bot information
Clicking on an IP in the list does a call to ipinfo.io and displays information about the IP such as org, hostname, city, region, country, and type (residential or datacenter).
On the client side, I have js that when a user interacts with a page, an invisible Cloudflare Turnstile token is minted and sent to the server where it is validated. If Cloudflare validates the token, I mark that ip as most likely human, and show log records of that ip as validated.
If the ip is that of a logged in user, I also show the user’s name in front of the ip.
Something like this could be used in the Hub’s Dashboard in place of the current log panel which is slow and you have to refresh to see the latest entries. I think many WPMUDev users would prefer to see an easy to read Live Traffic feed of the access.log instead of the limited raw static view that currently exists.
I’d be more than happy to share my code if you are interested. Another place to put this would be in the Admin WPMUDev Dashboard so users could see the Live Traffic in their site’s Admin.