From cea71b90817e8c02ed49c1beec4ff7708a196991 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Wed, 6 Jun 2018 10:30:03 -0400
Subject: [PATCH] Add a new analytics event for projects loaded from file

---
 src/containers/project-loader.jsx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/containers/project-loader.jsx b/src/containers/project-loader.jsx
index 7243e5f66..7f178b623 100644
--- a/src/containers/project-loader.jsx
+++ b/src/containers/project-loader.jsx
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
 import React from 'react';
 import {connect} from 'react-redux';
 
+import analytics from '../lib/analytics';
+
 import {
     openLoadingProject,
     closeLoadingProject
@@ -45,6 +47,11 @@ class ProjectLoader extends React.Component {
         const thisFileInput = e.target;
         reader.onload = () => this.props.vm.loadProject(reader.result)
             .then(() => {
+                analytics.event({
+                    category: 'project',
+                    action: 'Import Project File',
+                    nonInteraction: true
+                });
                 this.props.closeLoadingState();
                 // Reset the file input after project is loaded
                 // This is necessary in case the user wants to reload a project
-- 
GitLab