GoogleAnalyticsPlugin
The Google Analytics Plugin allows to use Google Analytics for basic statistics.
The current version tracks events like logins, quits, deads, and kills by user (for all events see here).
You can see some examples how the data is visualized in Google Analytics on the images page.
Install
Updating the data in Google Analytics can take some time, the data is not live! The first setup takes at least one day or two!
Future updates
- Setup a Google Analytics Account
- Setup a Profile for your Server on Google Analytics (You need the entered domain name and the tracking in for the configuration)
- Put the jar file in the plugin folder
- Run the plugin once to generate the default config file of the plugin
- Setup the configuration file as described here
Updating the data in Google Analytics can take some time, the data is not live! The first setup takes at least one day or two!
Future updates
- Add more events (Leave your ideas for events in the comments).
- Integrate tracking of other plugins like iConomy .
- Add an better interface for other modders, to allow them tracking events in their plugins.
@darkcloud784
The plugin supports this features.
But Google Analytics shows (by default) only data form yesterday or older... you probably need to wait at least one day!
@gwinans
I can only help you, if you at least post your bukkit version and the version of the plugin. But It seems like you should update the plugin to a version that supports your bukkit version.
Do any of the demographic usages work? IE shows country, origin etc? Also which demographic would I have to choose for it to get reported to google analytics, IE to track new players, visits etc? Does it track them all or just one?
Yes I also get the warning for spout but I dont see the demographic showing in google analytics.
Clean install:
2012-03-19 21:06:01 [SEVERE] Could not load 'plugins/GoogleAnalyticsPlugin.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:287) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:211) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:56) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NoClassDefFoundError: org/bukkit/event/player/PlayerListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.sweet_labs.GoogleAnalyticsPlugin.GoogleAnalyticsPlugin.<init>(GoogleAnalyticsPlugin.java:19) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144) ... 8 more Caused by: java.lang.ClassNotFoundException: org.bukkit.event.player.PlayerListener at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
@darkcloud784
I updated the plugin to Beta 4, but I couldn't fix the problem that easy. But the error message is gone and the plugin is working again. The plugin now shows a warning once, if the error occures again.
Doesnt work with any of the new versions of spoutplugin =\
2012-03-18 18:30:06 [WARNING] Task of 'GoogleAnalyticsPlugin' generated an exception java.lang.NoClassDefFoundError: org/getspout/spoutapi/SpoutManager at com.sweet_labs.GoogleAnalyticsPlugin.GoogleAnalyticsEventListener.getClientName(GoogleAnalyticsEventListener.java:325) at com.sweet_labs.GoogleAnalyticsPlugin.GoogleAnalyticsEventListener$1DelayedTask.run(GoogleAnalyticsEventListener.java:108) at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:126) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:591) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:509) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.ClassNotFoundException: org.getspout.spoutapi.SpoutManager at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 6 more
@Fox32
Yes, I am running that version. I think I found the problem, however. The spout build I was using was having a lot of issues, and when I updated Spout it started working again.
@EvHub
Are you really using Version 2 - Beta 3 on bukkit (1.2.3-R0.2)? The plugin should output "Loading GoogleAnalyticsPlugin v1.3" as startup.
Does anyone else has problems with that combination?
@Fox32
Doesn't seem to work. I get "Could not pass event to GoogleAnalyticsPlugin" errors.
@EvHub
The latest Version 2 - Beta 3 works fine on our server with the latest beta build of bukkit (1.2.3-R0.2). Do you have any problems with that version? I will do a feature update after the next stable release.
Please update this to 1.2.3. I really enjoy using this plugin to track events, and I would love to see it updated. Thanks!
Also, GeoIP location for the location Analytics.
@Fox32
Hook into LogBlock and co perhaps? A script that sends block data from the last 24 hours seems entirely plausible.
i need help. please help me set this up. i hate no F*IN clue how to set it up at all, is it possible for someone to make a guide?
@Fox32
Ah. I figured as much. Even a small server would have thousands of block events every day. I can see how that would add up pretty fast. I wonder if there'd be a way to track it internally, and send the information to google at the end of they day in one single http request or something. (I'm just speculating. I really have no clue if something like that is even possible)
I just like throwing out ideas. Please don't feel obligated to pursue this in any way.
@frozeny95
Does it work now? Or does it still not display any data?
@adrianthewriter
I could implement it and disable it by default. But it should be to costly. You need to send a http request for every block, could work on a small server, but a bigger would die.
I had an idea for a new event to track. What if you tracked the block place, and block destroy events. It would be neat to see a chart showing the literal growth or destruction of my server. I don't know how much overhead the google tracker needs, so tracking that many events might be too costly...
Anyway, keep up the great work! I've always loved Google Analytics for tracking my websites, so being able to use it to track my MC server is wonderful. Thanks.
The plugins now shows in Green when I do /plugins and it says that the plugin is enable ( when I do a restart or what ever )
But When I go in Google Analytics , and don't see anything releated to minecraft ...
@frozeny95
If you choosed "http://mc.cube-x.ca" in Google Analytics you need to set server_domain to "mc.cube-x.ca", right.
Updating the data in Google Analytics can take some time, the data is not live. But if the plugin is still disabled your config file seems to be wrong. Did you set the server_domain and server_account setting? What message does the plugin show at startup?