I'm soon to be launching an Adobe AIR desktop app. To make the best out of future updates I need to get analytics of which features get used the most and which not.
How to track what the user clicks?
I agree with @Pranav on the methods for logging the clicks, but I totally disagree with how he wants to implement the tracking on the client side.
Solution
If all you need is clicks, then I would just have one click listener on the stage. That way you can handle your click tracking in a class that is completely separate from the rest of your application. And you can do it any way you like. e.g. you could divide the screen into areas and see which areas are most clicked; you could use stage.getObjectsUnderPoint() to find all the objects that were just clicked (usually the topmost object is the one you want, but perhaps you want to log all of them).
Either way, you now have complete liberty in how you choose to track usage and the code is all in one place if you ever need to change anything.
If your app is almost done, then you should be pretty familiar with AIR.
You can do your tracking in 2 ways (There must be many more, but I'm going to highlight 2 of them). Both require you extending the Button
class and doing different things in your click handler, or you could manually add the code in every click handler you want to track)
First
You keep a click tracker service like clicky on your server. The click handler should call the code that is given in the documentation of the analytics code
Second
You write the feature used (or whatever else you want to track) to a log file which is then uploaded whenever an internet connection is there (Basically try to upload every 10 minutes or so and ignore any http errors). The upload script will parse the log file and then show you whatever information you require. The log file will then be erased.