feat: add opt-in umami analytics (WIP)

This commit is contained in:
David Ralph
2021-06-21 17:42:14 +01:00
parent 4449957fe6
commit f7c39eeebb
23 changed files with 135 additions and 10 deletions

View File

@@ -44,6 +44,7 @@ export default class Search extends React.PureComponent {
}
setTimeout(() => {
window.analytics.postEvent('featureUpdate', 'Feature voice search used');
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
}, 1000);
};
@@ -58,6 +59,7 @@ export default class Search extends React.PureComponent {
value = document.getElementById('searchtext').value || 'mue fast';
}
window.analytics.postEvent('featureUpdate', 'Feature search used');
window.location.href = this.state.url + `?${this.state.query}=` + value;
}