Actually the Google Analytics plugin as indicated above will do exactly that, if you are however not wanting to use that then write your own using a REST Web Service or similar. You could try the Low Entry JSON/XML, HTTP, and Encryption plugins and then write your own Web Service to handle the calls.
You would then trigger the calls inside your game where you need them.