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
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment