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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user