[ANY] Player Analytics
This plugin logs detailed statistics of all connecting players to a MySQL table. Stats that are logged include:
- Server IP
- Player name
- Steam ID
- Time of connection (as Unix timestamp)
- Date of connection
- Connection method (on games that support cl_connectmethod)
- Number of players in-game at time of connection
- Current map at time of connection
- Duration of play session
- User admin flags
- User IP
- Player's city, region, 2-letter country code, and 3-letter country code (requires GeoIPCity)
- Player's country
- Player's F2P/Premium status (TF2 only, requires SteamTools)
- Player's HTML MOTD preference (enabled/disabled)
- Player's operating system
There will be a web interface later with which you can view the stats. In the meantime, you'll have to use something like phpMyAdmin to see the raw logs.
- player_analytics_version - plugin version
- player_analytics_auto_update - enables automatic updating (has no effect if Updater is not installed)
Player Analytics has an API with which you can get player connection IDs. See the include file
Both of these extensions are optional dependencies. That is, they are not required for the plugin to operate.
- GeoIPCity - Required to look up players' cities, regions, and country codes
- SteamTools - Required to detect the server's public IP behind a NAT and to look up Premium/F2P status on TF2
This plugin requires a MySQL database. It will first look for a configuration named "player_analytics", and will fall back to "default" if one is not found. Example:
This should go in databases.cfg.
Install any optional extension dependencies that you want, and then put player_analytics.smx into /addons/sourcemod/plugins and os_detect.games.txt into /addons/sourcemod/gamedata and reboot your server or type "sm plugins load player_analytics" into your console or rcon.
. The plugin will be auto-updated according to your Updater settings. It'll work without Updater.
Download Plugin (player_analytics.zip)
.zip file includes plugin, gamedata, source, and include file
Requires updater.inc and mckayupdater.sp to compile.
- v1.3.0 (4/3/15)
- Plugin now uses utf8 queries
- v1.2.0 (3/31/15)
- v1.1.0 (12/7/13)
- v1.0.0 (12/2/13)
I have attached a development preview of the web panel. It's still in development so there are a lot of broken links and placeholder items. Simply set your variables in config_example.php and rename it to config.php
Web panel is by rannmann