This plugin allows a server owner to track various server statistics via Google Analytics. It uses the Google Measurement Protocol to do so reporting information such as logins, quits and kicks. It also tracks which worlds players are playing in as page views. Recently added is tracking of SignShop transactions via Google Analytics e-commerce hits and submission of player IP address allowing anonymous tracking of geographical player distribution.
This plugin provides commands for admins to use in configuring the plugin.
- /analytics admin set tracking-id UA-XXXXXXXX-Y
- /analytics admin set host-name server.com
- /analytics admin set use-metrics <true|false>
Additionally, the plugin allows a player (or staff member on the players behalf) to opt out/in of tracking. This is required in accordance with the Google Analytics Measurement Protocol Policy.
- /analytics optout
- /analytics optin
- /analytics optout <playername>
- /analytics optin <playername>
Note that setting another player as opt out/in is available via a permission node and should only be given to staff members to help out players.
Permissions are provided as follows:
- openanalytics.optout - Provides access to the optout and optin subcommands.
- openanalytics.optout.others - Allows you to opt out/in other players.
- openanalytics.admin - Provides access to the admin subcommand.
How to Install
Download the jar file. Place it in your plugins directory and restart your server or use plugman to load. Then shutdown your server or unload the plugin, open up config.yml and add your Google Analytics tracking-id and server host-name. Restart your server and you should be able to see tracking information flowing through to Google Analytics.
Alternatively you can configure the tracking-id and host-name via the in game commands. After setting these values in game, the plugin should automatically restart tracking with these changes.
It is recommended to create separate Google Analytics web property for your in-game statistics then you might use for your regular server website. However, this web property can (and probably is best) housed within the same Google Analytics account.
This plugin will work with Java 1.6+.
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk. They can be found here: http://ci.pjt.me/job/OpenAnalytics
The following features are being considered for addition.
- Tracking the visiting of Residences as page views
- Tracking commands run as event hits
- And probably more as I dream things up
If you have any ideas, please let me know.
In accordance with the Google Analytics Measurement Protocol Policy, all data submitted must not be trackable by Google back to a specific person. As such, players are assigned a random id. This is used as the "Client ID" that is reported to Google, providing the appropriate level of anonymity.
None at this time.
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true. Alternatively, this plugin alone can be opted out by setting use-metrics to false either in the plugin's config.yml directly or via the in game command.
Please note that while this plugin is all my own code and I'd been thinking about this idea for a while, I was particularly inspired to write something recently after coming across the Google Analytics Plugin by Fox32. In particular I would like to thank him for very kindly sharing his code.
In the long run I decided to write my own for several reasons. First, this plugin uses a newer Google Analytics protocol that is part of the Universal Analytics offering from Google. Second, my brain went wild considering all the fun I could have coding this and attempting to cram the usage of a Minecraft onto what Google Analytics offers. And lastly, it was just fun.
I like stats. I like to know things like how many players are playing on my server, I like to be able to look at that data historically, etc, etc, etc. I want to be able to see that information in a pretty format and slice and dice it. And as a long time computer geek and user of Google Analytics, I know that the interface is second to none. And I personally have no interest in coding such an interface. So, well, hence we have this plugin.