Update analytics code

This commit is contained in:
Gregory Schier committed 2016-09-13 11:46:51 -07:00
1 parent 4037b9a763
commit 39453f6cf7
1 file changed
+6
+6
View File
@@ -38,6 +38,12 @@ export function initAnalytics () {
export function trackEvent (event, properties = {}) {
// Don't track events if we haven't set them up yet
if (analytics) {
// Add base properties
Object.assign(properties, {
appPlatform: process.platform,
appVersion: getAppVersion()
});
analytics.track({userId, event, properties});
}
}