Moonlight icon indicating copy to clipboard operation
Moonlight copied to clipboard

Analytics Dashboard & Player Leaderboard plugin

Open FiskLee opened this issue 5 months ago • 9 comments

Is there an existing feature request for this?

  • [x] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Analytics and Leaderboard plugin that shows player and server engagement metrics. This is similar to the attached AMP panel screenshot.

  • Give insight into player activity and retention across one or more servers.
  • Help admins plan events or wipes, identify peak hours etc
  • Display a player leaderboard (including playtime, sessions, and other game-specific stats) for community recognition and moderation insight.

Suggested metrics and views (with configurable time range: 24h, 7d, 30d, or custom):

  • Total sessions, Unique players, New players, Total playtime, Quick-leave or bounce %, Average session duration, Sessions per player,avg session time of a specific player, Longest session etc

  • Time-series chart of sessions and players over time.

  • Country distribution of where players connect from.

  • Most active players list with total playtime and session counts.

  • Export options (CSV or JSON) and basic API for dashboards or bots.

example fom AMP Image

Image

Describe the solution you'd like.

Implement this as a plugin with two tabs: Analytics and Leaderboard.

Analytics tab

  • Data collection: Gather join and leave events from supported games using RCON, or log parsing. Normalize to a common event schema (player ID, name, timestamps, server ID).

  • UI:

    • KPI cards as listed above and a selectable time-series chart.
    • Country map (using IP to country with a MaxMind or Geo service)
    • Filters for date range
  • Utilities: Options for CSV or JSON export, simple REST endpoints for bots or websites, and role-based permissions

Leaderboard tab

  • Core ranking: Sortable list by total playtime, session count, and longest session for the selected range or server. Global view combines data across servers.
  • Player identity: Use platform IDs (like SteamID64) to merge aliases, with avatar and links where possible.
  • Public sharing: Option for a read-only public page or embeddable widget.

Additional context to this request.

disclaimer i used AI to help me draft this feature request properly

FiskLee avatar Jul 27 '25 12:07 FiskLee

examples from battlemetrics and gametracker

https://www.battlemetrics.com/servers/minecraft/5873087 https://www.battlemetrics.com/servers/arma3/11746

https://www.gametracker.com/server_info/gt.serb-craft.com:25565/ https://www.gametracker.com/server_info/54.38.154.47:2302/

FiskLee avatar Jul 27 '25 12:07 FiskLee

more links for inspiration https://builtbybit.com/resources/player-manager.72012/?ref=discover https://builtbybit.com/resources/player-listing.53200/?ref=discover

FiskLee avatar Jul 27 '25 15:07 FiskLee

In my opinion, the best way to geolocate IP addresses such as determining the city, state, or country players are connecting from,is by using the IP location databases provided by GeoDB by Sapics ( geolite2-geo-whois-asn-country dataset).

GitHub: https://github.com/sapics/ip-location-db NPM: https://www.npmjs.com/search?q=ip-location%20db

use .MMDB Libraries and use MaxMind-DB-Reader-dotnet to read from that format These databases are updated daily, so ideally, you could check the last modified date, file checksum, or set an automatic expiration (e.g., refresh the DB once per day). However, for most use cases like this, even a database that's one year old or older would still be perfectly sufficient. Daily updates are more of a best practice than a necessity for this scope. ( i cheated and used AI here again)

nice country flags icons pack

https://flagicons.lipis.dev/ https://flagpack.xyz/ https://flagpedia.net/download/icons https://www.flaticon.com/packs/countrys-flags

FiskLee avatar Jul 28 '25 21:07 FiskLee

Why are you linking a npm package? Ahhh you use ai. please stop doing that. We dont like ai slop and you know that

ChiaraBm avatar Jul 28 '25 21:07 ChiaraBm

Why are you linking a npm package? Ahhh you use ai. please stop doing that. We dont like ai slop and you know that

@ChiaraBm oh no i specifically added npm because of their CDN ,to use as a direct download link instead of github because i never knew how to directly download stuff from github with perm link i wouldve mentioned to use maxmind's offical website but they have rate limiting in place for downloads,i think maybe 10 downloads every day or something dont remember

Image

FiskLee avatar Jul 28 '25 22:07 FiskLee

Moonlight cannot use NPM because it does not use Node.js or any Node.js-related language. It uses C#, and sometimes npm works in the case of Tailwindcss. But I don't think that will work. And when Moonlight 2.1 comes out, we can look at such a plugin and talk about it.

xyzjesper avatar Jul 29 '25 18:07 xyzjesper

Reading ability equals 0. They were talking about the ability to direct download a file via a specific url, and mentioned urls were from npm as the op was able to find the direct links there better than on github

ChiaraBm avatar Jul 29 '25 18:07 ChiaraBm

I know what it was about. I just wanted to tell him why it doesn't work with NPM.

xyzjesper avatar Jul 29 '25 18:07 xyzjesper

It does? They dont want to use an npm package just one file from a package diwnloaded via the npm cdn. As they literally explained. Please leave the issues alone if you dont read them

ChiaraBm avatar Jul 29 '25 18:07 ChiaraBm