It might be a good idea to put node-google-analytics in our commands.
It'll give us good insights on the cli usage and other things, what kind of config ppl are using, pain points, insights into templates etc.
as long as we use something that doesn't have 100 sub dependencies
This should be an opt-in only features as I'm there's a large group of people using this tool internally and would rather keep their usage private.
+1 to both points~!
If we were to go this route, something like this:
const http = require('http');
const UA = 'UA-XXX...';
function track(command, result, label) {
// argv from somewhere else
if (argv.private || OFFLINE) {
return; // aka, --private or no outbound
}
let k, opts = { aip:1, ec:command, ea:result, el:label };
let url = `https://www.google-analytics.com/collect?v=1&tid=${UA}&t=event`;
for (k in opts) {
!!opts[k] && (url += `&${k}=${encodeURIComponent(opts[k)}`);
}
return http.get(url);
}
This is essentially what
ganalyticsis doing
Back when we created Yeoman, we published https://github.com/yeoman/insight as a way to gather opt-in anonymous usage stats from your CLI users. Plumbs back to Google Analytics and works well with existing events dashboards pretty okay:

Just another option as you're evaluating :)
Adding this for commands would be a lot helpful. Will probably give this a try today and see how it goes.
Thanks Addy 馃槃
Definitely interested in this. I can set us up a shared GA account.
Most helpful comment
This should be an opt-in only features as I'm there's a large group of people using this tool internally and would rather keep their usage private.