Skip to content
Snippets Groups Projects
Commit cea71b90 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Add a new analytics event for projects loaded from file

parent a4d62d12
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ import PropTypes from 'prop-types'; ...@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import analytics from '../lib/analytics';
import { import {
openLoadingProject, openLoadingProject,
closeLoadingProject closeLoadingProject
...@@ -45,6 +47,11 @@ class ProjectLoader extends React.Component { ...@@ -45,6 +47,11 @@ class ProjectLoader extends React.Component {
const thisFileInput = e.target; const thisFileInput = e.target;
reader.onload = () => this.props.vm.loadProject(reader.result) reader.onload = () => this.props.vm.loadProject(reader.result)
.then(() => { .then(() => {
analytics.event({
category: 'project',
action: 'Import Project File',
nonInteraction: true
});
this.props.closeLoadingState(); this.props.closeLoadingState();
// Reset the file input after project is loaded // Reset the file input after project is loaded
// This is necessary in case the user wants to reload a project // This is necessary in case the user wants to reload a project
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment