mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-18 21:43:45 +00:00
Added analytics event for WikiTree
This commit is contained in:
@@ -270,10 +270,14 @@ export class App extends React.Component<RouteComponentProps, {}> {
|
|||||||
: await loadFromUrl(url!, handleCors);
|
: await loadFromUrl(url!, handleCors);
|
||||||
|
|
||||||
const software = getSoftware(data.gedcom.head);
|
const software = getSoftware(data.gedcom.head);
|
||||||
|
if (source == 'wikitree') {
|
||||||
|
analyticsEvent('wikitree_loaded');
|
||||||
|
} else {
|
||||||
analyticsEvent(hash ? 'upload_file_loaded' : 'url_file_loaded', {
|
analyticsEvent(hash ? 'upload_file_loaded' : 'url_file_loaded', {
|
||||||
event_label: software,
|
event_label: software,
|
||||||
event_value: (images && images.size) || 0,
|
event_value: (images && images.size) || 0,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Set state with data.
|
// Set state with data.
|
||||||
this.setState(
|
this.setState(
|
||||||
|
|||||||
Reference in New Issue
Block a user