I would like to be able to measure the features in our application that are being used. For example how much certain windows are opened, certain controls are clicked. I can imagine a tool that measures this and sends a report to a web server, that can further process it to create meaningful data from it
Asked
Active
Viewed 1,141 times
7
-
As SadSido said, probably no. We've searched, and then rolled our own, consisting basically of a windows message hook (logging user actions such as "clicked button X"), log statements for relevant features, and a set of python scripts to filter, format and aggegate the results. – peterchen Sep 04 '09 at 13:11
2 Answers
6
First question : should you do it ? People don't like when their software phones home without their consent. But assuming they are ok with it then:
It's technically possible, with two approaches: automatic or manual. Of course, given your question, I assume that you are using Qt.
Automatic:
- give a proper name to all the QObject that you want to trace
- install an event filter on your application to catch all the ChildEvent about objects that are created and destroyed.
- from the ChildEvent, you can extract the object's name
- then you can already log how often that object is created. You can also use the opportunity to add an event listener to that specific object, to be notified when it is shown or hidden or track other kind of usage
- log everything to a log file
Manual :
- add log statements to relevant part of your code that you want to track.
Final :
- send the log file on a regular basis

Philippe F
- 11,776
- 5
- 29
- 30
-
And don't forget to keep an eye on the size of your logfile. "Out of disk space" errors can be very annoying. – pmr Sep 04 '09 at 11:53
-
1It's a valuable tool for public betas - just to see the feature coverage you really reached. – peterchen Sep 04 '09 at 13:09
-
I doubt this question was about doing this without the user's consent. After all, there usually are laws regarding data collection and retention and at least in Europe you cannot go around just tracking the user without them knowing (except for web pages where it's essentially impossible to prove that your interactions are being tracked ... hooray). – Joey Dec 20 '13 at 13:41
1
I guess, your answer is "No". I don't think there are such libraries.
I also think, the best solution here is logging, meaning you should manually introduce some log functions into your main program features and send back the log file. When it comes to logging, you may consider using aspect-oriented programming (and there are such tools for C++), it may simplify your task...

SadSido
- 2,511
- 22
- 36