Hello all (Please note this was entered for the contest but i have to remove the contest tag as it has been updated for the new API)
- For PocketMine-MP:
- Alpha_1.4 - API 1.0.0
Today I have a new plugin for you called GoogleAnalytics. What is it you might ask? well the name sorta says it all... its a plugin that sends server/player stats to your Google Analytics page. This plugin will allow you to track events:
As well as the ton of other stuff you can track/do with Google Analytics, like track what country the player comes from.
- connections (With IP)
- Player Logins/spawns
- Quits(and time spent on the server)
- deaths(Aswell as by who/what)
How did I come up with this idea? Well Fox32 over on the bukkit website made one for bukkit with the bukkit API in Java Link Here, So I thought why not have one for PocketMine in PHP, that way I can keep track of my servers without even needing to connect to them, as well as being able to access my live stats on the go!
- Setup a Google Analytics Account Here
- Setup a Profile for your Server o n Google Analytics(Admin>Under account click "Create new account">enter details and save)
- Put the plugin file in your plugin folder
- Run the plugin once to generate the default config file of the plugin
- Setup the configuration file as described under this sentence
Updating the data in Google Analytics can take some time, the data is live EXCEPT for the "At the moment" number under the "Real-Time" heading, that is not live/correct! The first setup takes at least one day or two!(for generating daily graphs etc)
- analyticsServerDomain: example.com The domain you choosed for your google analytics report without the protocol ("http://") or empty if you didn't choosed a domain. You can leave it empty if you don't now what to insert.
- analyticsServerAccount: UA-XXXXXXXX-X or MO-XXXXXXXX-X The tracking id of your google analytics report (I recommend to use a the MO version, you only need to replace UA by MO).
- How do I set up my Google Analytics account page?
At 0:35 I mean the "At the moment" number wont be correct, the rest of the plugin stats are 100% correct
- Another tip would be to experiment in Google Analytics and click on everything in the sidebar, because you never know what ausome stats you might stumble upon.
I am leaving this plugin in its PHP format so anyone can download it and modify it for their liking. If anyone finds fixes to the few bugs, please report them to me so I can fix the plugin and update it, as well if anyone finds any improvements, please do the same.
P.S Judges there are free cookies and milk in this plugin if you know were to look
- Alternate Categories: