-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Refactor analytics
- add CPU load analytics from server side
- add ga.js to webpage, track directly to Google Analytics
- app.log() shortcut
- send user monitoring to slack
- track by using events whenever possible
- track all interactions
- track lots of stuff server side also
Analytics has fallen out, need to plug back into Slack, ga.js.
Also we need a plan for analytics, since we want to track everything anonymously. Google Analytics is perhaps good enough, at least it's powerful. Heap also looks nice, although with a pricetag with > 5000 sessions/month.
We also need to streamline our logging on client-side. Create a separate Wu object for this, which is called from various places in code. Something short, like:
// store on global app
app.analytics = new Wu.Analytics();
// log event with shortcut (see below)
app.log('opened Data Library');Wu.Analytics = Wu.Class.extend({
initialize : function () {
// create shortcut
app && app.log = this.log;
},
log : function (event) {
var user = app.Accout;
var user_id = user.getUuid();
var username = user.getUsername();
// create message
var message = username + ' ' + event;
},
sendEvent : function () {
// see api.socket.js, already implemented there.
// also send to Google Analytics from client
},
});Some of this is already implemented. We need to refactor everything and clean it up.
TODO
- plug slack back in
- refactor, clean up existing analytics
- send analytics events to server (websockets)
- send analytics to google
- write tests
Reactions are currently unavailable