Adds more tracking all around the app (#142)

* Adds more tracking all around the app

* more events

* lint

* using better analytics naming

* missed file

* more fixes
This commit is contained in:
Aryan Goharzad
2023-02-02 19:48:36 -05:00
committed by GitHub
parent 8b310d91f0
commit cede0c772c
21 changed files with 196 additions and 24 deletions
+8
View File
@@ -1,5 +1,6 @@
import {makeAutoObservable} from 'mobx'
import {TABS_ENABLED} from '../../build-flags'
import {segmentClient} from '../../lib/segmentClient'
let __id = 0
function genId() {
@@ -96,6 +97,13 @@ export class NavigationTabModel {
// =
navigate(url: string, title?: string) {
try {
const path = url.split('/')[1]
segmentClient.track('Navigation', {
path,
})
} catch (error) {}
if (this.current?.url === url) {
this.refresh()
} else {