Vulcan/lib/events.js
Christian Bundy 86ec3ede93 Solve trivial JS errors
Using jshint and and fixmyjs I went through and removed 220 trivial
Javascript errors – mostly missing semicolons, and some properties that
weren’t written in dot notation. You can view the diff of jshint’s
output here:
https://gist.github.com/christianbundy/7b37c51bb6f7c8d739e7/revisions
2014-05-06 20:15:48 -07:00

14 lines
No EOL
548 B
JavaScript

trackEvent = function(event, properties){
console.log('trackevent: ', event, properties);
var properties= (typeof properties === 'undefined') ? {} : properties;
//TODO
// add event to an Events collection for logging and buffering purposes
if(Meteor.isClient){
if(typeof mixpanel.track !== 'undefined'){
mixpanel.track(event, properties);
}
if(typeof GoSquared !== 'undefined' && typeof GoSquared.DefaultTracker !== 'undefined'){
GoSquared.DefaultTracker.TrackEvent(event, JSON.stringify(properties));
}
}
};