Back to the main page.

Bug 2901 - implement a FieldTrip usage tracker

Status ASSIGNED
Reported 2015-05-28 15:34:00 +0200
Modified 2016-07-11 11:59:18 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2015-05-28 15:34:04 +0200

This follows a discussion with Arno, Tim and Cyril in Aspet. The idea is to make a call to a URL to pass timestamp, version, IP, user id, etc. It would be important to consider protecting the privacy of the user, and it should allow for opting out. Arno has this in EEGLAB, linked to the plugin manager. He forwards all data to http://mixpanel.com, which has a web UI similar to google analytics.


Robert Oostenveld - 2015-05-28 15:51:15 +0200

let me CC Hong, he might know more about this... Alternatives are listed on http://www.quora.com/Are-there-any-self-hosted-analytics-tools-similar-to-Mixpanel Perhaps we could also consider splunk.com


Robert Oostenveld - 2015-06-01 14:45:20 +0200

Hong just suggested to consider https://www.pubnub.com as a generic transfer mechanism. At first glance it seems that we'll run into pricing issues immediately, but it might be a starting point for appropriate technology.


Hurng-Chun Lee - 2015-06-01 16:18:51 +0200

Just to clarify, the service provided by pubnub.com (or pusher.com as an alternative) is a way of collecting events sent out by clients (e.g. fieldtrip functions) in realtime. It does not provide any analytical platform for display the data.


Robert Oostenveld - 2015-06-10 05:50:17 +0200

I implemented the first version using mixpanel. Right now it only tracks the user "roboos" on a small set of known computers. mac011> svn commit Sending ft_defaults.m Sending utilities/ft_checkconfig.m Adding utilities/ft_track.m Transmitting file data ... Committed revision 10444.


Robert Oostenveld - 2015-06-10 06:19:50 +0200

(In reply to Robert Oostenveld from comment #4) after two small fixes in 10445 and 10446, it is now working. The regression test scripts have been triggered and I see about 600 "events", i.e. MATLAB instances having been started up.


Robert Oostenveld - 2015-06-10 21:54:17 +0200

the code is in principle working and starting to converge The main change is that there is now a single ft_default.trackusage option, and that it is now called "trackusage" throughout. Furthermore, main function calls are being tracked (for me). mac011> svn commit Sending ft_defaults.m Sending private/rollback_provenance.m Sending utilities/ft_checkconfig.m Deleting utilities/ft_track.m Adding utilities/ft_trackusage.m Sending utilities/private/ft_preamble_init.m Transmitting file data ..... Committed revision 10450.


Robert Oostenveld - 2015-06-11 04:16:31 +0200

I implemented user profile tracking (still anonymous, but allows to pool user events more easily, and gives some user info through IP address) mac011> svn commit Sending private/getusername.m Sending test/inspect_ft_sourcemovie.m Sending test/test_bug1049.m Sending test/test_bug1309.m Sending test/test_bug1806.m Sending test/test_bug2355.m Sending test/test_bug2359.m Sending test/test_bug2372.m Sending test/test_bug472.m Sending test/test_ft_analysispipeline.m Sending test/test_ft_connectivityanalysis.m Sending test/test_ft_freqstatistics.m Sending test/test_ft_qualitycheck.m Sending test/test_shared_virtual_channels.m Sending test/test_tutorial_beamformer.m Sending test/test_tutorial_beamformer20120321.m Sending test/test_tutorial_connectivity.m Sending test/test_tutorial_connectivityextended.m Sending test/test_tutorial_eventrelatedstatistics.m Sending test/test_tutorial_sensor_analysis.m Sending utilities/ft_checkconfig.m Sending utilities/ft_trackusage.m Adding utilities/private/getaddress.m Sending utilities/private/gethostname.m Sending utilities/private/getusername.m Transmitting file data ......................... Committed revision 10452.


Robert Oostenveld - 2016-06-29 12:23:01 +0200

I just did "brew update" and got this ==> Homebrew has enabled anonymous aggregate user behaviour analytics Read the analytics documentation (and how to opt-out) here: https://git.io/brew-analytics Interesting to see how other software is handling this. We could do the same upon the first call to ft_trackusage.


Robert Oostenveld - 2016-07-11 11:57:00 +0200

at this moment the existing usage tracker (using Mixpanel) is broken. See also https://github.com/fieldtrip/fieldtrip/pull/192 >> ft_defaults Error using urlread 'method' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for urlread. Error in urlreadwrite>parseInputs (line 144) p.parse(args{:}) Error in urlreadwrite (line 15) inputs = parseInputs(fcn,varargin); Error in urlread (line 36) [s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:}); Error in ft_urlread (line 13) [output, status] = urlread(event_http, 'method', method, 'timeout', timeout); Error in ft_trackusage (line 152) [output, status] = ft_urlread(event_http); Error in ft_defaults (line 259) ft_trackusage('startup');


Robert Oostenveld - 2016-07-11 11:59:18 +0200

(In reply to Robert Oostenveld from comment #9) mac011> git commit utilities/private/ft_urlread.m [master 18a35a5] FIX - http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2901#c9 1 file changed, 7 insertions(+), 3 deletions(-) mac011> git push upstream master X11 forwarding request failed on channel 0 You're about to push master, is that what you intended? [y|n] y Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 847 bytes | 0 bytes/s, done. Total 7 (delta 5), reused 0 (delta 0) To git@github.com:fieldtrip/fieldtrip.git 322d75e..f4fd837 master -> master