Send fewer analytics events because they're not really sent

This commit is contained in:
Przemek Wiech
2019-03-18 23:23:37 +01:00
parent 1a1f49f2e6
commit 3dbbba980a

View File

@@ -93,14 +93,12 @@ export class App extends React.Component<RouteComponentProps, {}> {
const data = hash const data = hash
? await loadGedcom(hash, gedcom, images) ? await loadGedcom(hash, gedcom, images)
: await loadFromUrl(url!, handleCors); : await loadFromUrl(url!, handleCors);
analyticsEvent(hash ? 'upload_file_loaded' : 'url_file_loaded');
if (images && images.size) {
analyticsEvent('images_uploaded');
}
const software = getSoftware(data.gedcom.head); const software = getSoftware(data.gedcom.head);
if (software) { analyticsEvent(hash ? 'upload_file_loaded' : 'url_file_loaded', {
analyticsEvent('gedcom_software', {event_label: software}); event_label: software,
} event_value: (images && images.size) || 0,
});
// Set state with data. // Set state with data.
this.setState( this.setState(