views:

262

answers:

1

I'm closing in on finishing a Windows Desktop Gadget that downloads plugins from my web server. I'm wondering how I can track the use of these plugins for reporting purposes like seeing which plugins are popular in which countries, how many times a plugin is used per day/month/week and other stuff like that.

Logging this on every user action could cause my server problems as there'd be constant requests. Is it best to keep a local log and upload it to the server on a regular basis or is it possible to use something like Google Analytics or another provider for this sort of thing?

+4  A: 

If you are using javascript to create your gadget, it should be possible to include the Google Analytics scripts. You can then call the function _trackPageview whenever your user does something you want to track.

It is also possible to use Google's analytics without javascript.

The trick is that Google's scripts normally put the image http://www.google-analytics.com/__utm.gif into your web pages. Parameters can be passed to the image via the query string. You can find a list of the parameters you can pass to the query string here. What you'd have to do is figure out what the query string should be and have your client make the request to google's image every time the user does something (after setting up your google analytics account, of course).

Matt Bridges
Thanks Matt. Would you care to speculate on whether Google have a problem with me using Analytics in this way, since it's intended for websites?
Andy E
I haven't read the terms of use recently, but I can't imagine that there would be any problem using it this way.
Matt Bridges