Record compose metrics

(imported from commit 194a7d36650cf3e1e52f0dad3f453942179de122)
This commit is contained in:
Zev Benjamin
2013-05-20 17:36:12 -04:00
parent c60a500a8f
commit d1ac16ee3f

View File

@@ -27,5 +27,16 @@ $.each(methods, function (idx, method) {
$.each(people_methods, function (idx, method) {
wrap_method(method, exports.people, mixpanel.people);
});
// This should probably move elsewhere
$(function () {
$(document).on('compose_started.zephyr', function (event) {
metrics.track('compose started', {user: page_params.email,
realm: page_params.domain,
type: event.message_type,
trigger: event.trigger});
});
});
return exports;
}());