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

@@ -21,6 +21,8 @@ export default class Switch extends React.PureComponent {
checked: (this.state.checked === true) ? false : true
});
window.analytics.postEvent('settingUpdate', `${(this.state.checked === true) ? 'Enabled' : 'Disabled'} setting ${this.props.name}`);
if (this.props.element) {
if (!document.querySelector(this.props.element)) {
document.querySelector('.reminder-info').style.display = 'block';