zedapp/zed — pull request #307 by zefhemel (2014-04-23 14:38:43+00:00)
Title: Added Google Analytics integration

So, let me clarify a bit why I'm doing this and preface this with saying that you can easily disable analytics via the the `enableAnalytics` preference (setting it to false disables it).

So, here's the deal.

Right now we know surprisingly little about our users. The moment I realized this is when I looked at the download stats for Zed standalone and the Windows version was at the top of the list. I had no idea that there were so many Windows users. Then I realized I also have no idea how people are using Zed. What kinds of files are they editing? Are they all JavaScript programmers? PHP programmers? What features do they use? Do they use the file tree, the goto, do they use search an auto complete?

All these things are very important to know in order to prioritize where we should improve. For instance, if 70% of our users are PHP programmers, maybe I should spend time improving PHP editing support etc.

I have opted to use Google Analytics do this. As I mentioned, it's opt out, anonymous and no private data is ever sent. Currently this is what's tracked (see `analytics.js`):

1. File system types: what file systems are people using (config, node, local, http, dropbox?)
2. Are people creating new files within Zed (a feature that may be unintuitive to people), if so, of what kind (javascript? PHP?)
3. What file modes are being used?
4. Do people reload their file lists manually (if so, perhaps we should invest more in directory watching so it's not necessary)
5. Do people edit their config (we put a lot of work in the config system, do people use this at all?)
6. Goto use: do people use search, goto line, goto symbol, goto absolute path etc.
7. Code complete: do people use code completion, and if so, for what file modes?

Thoughts?