Vulcan/lib/events.js

14 lines
586 B
JavaScript
Raw Normal View History

trackEvent = function(event, properties){
2014-06-25 14:33:41 +09:00
// 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){
2014-07-03 10:15:19 +09:00
if(typeof mixpanel !== 'undefined' && typeof mixpanel.track !== 'undefined'){
mixpanel.track(event, properties);
}
2012-12-14 17:12:52 +09:00
if(typeof GoSquared !== 'undefined' && typeof GoSquared.DefaultTracker !== 'undefined'){
GoSquared.DefaultTracker.TrackEvent(event, JSON.stringify(properties));
}
}
};