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

Emit projectDidSave for server saves, not just file exports

parent 1dce71e7
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
if (id && this.props.onUpdateProjectThumbnail) {
this.storeProjectThumbnail(id);
}
this.reportTelemetryEvent('projectDidSave');
return response;
})
.catch(err => {
......@@ -291,9 +292,15 @@ const ProjectSaverHOC = function (WrappedComponent) {
*/
// TODO make a telemetry HOC and move this stuff there
reportTelemetryEvent (event) {
if (this.props.onProjectTelemetryEvent) {
const metadata = collectMetadata(this.props.vm, this.props.reduxProjectTitle, this.props.locale);
this.props.onProjectTelemetryEvent(event, metadata);
try {
if (this.props.onProjectTelemetryEvent) {
const metadata = collectMetadata(this.props.vm, this.props.reduxProjectTitle, this.props.locale);
this.props.onProjectTelemetryEvent(event, metadata);
}
} catch (e) {
log.error('Telemetry error', event, e);
// This is intentionally fire/forget because a failure
// to report telemetry should not block saving
}
}
......
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