Merge branch 'master' into BUDI-9237
This commit is contained in:
commit
2664bf4f7e
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"version": "3.8.6",
|
||||
"version": "3.9.0",
|
||||
"npmClient": "yarn",
|
||||
"concurrency": 20,
|
||||
"command": {
|
||||
|
|
|
@ -2,9 +2,12 @@ import { API } from "@/api"
|
|||
import PosthogClient from "./PosthogClient"
|
||||
import { Events, EventSource } from "./constants"
|
||||
|
||||
const posthog = new PosthogClient(process.env.POSTHOG_TOKEN)
|
||||
const posthog = new PosthogClient(process.env.POSTHOG_TOKEN!)
|
||||
|
||||
class AnalyticsHub {
|
||||
private initialised: boolean
|
||||
private clients: PosthogClient[]
|
||||
|
||||
constructor() {
|
||||
this.clients = [posthog]
|
||||
this.initialised = false
|
||||
|
@ -21,13 +24,13 @@ class AnalyticsHub {
|
|||
}
|
||||
}
|
||||
|
||||
identify(id) {
|
||||
identify(id: string) {
|
||||
posthog.identify(id)
|
||||
}
|
||||
|
||||
captureException(_err) {}
|
||||
captureException(_err: any) {}
|
||||
|
||||
captureEvent(eventName, props = {}) {
|
||||
captureEvent(eventName: string, props = {}) {
|
||||
posthog.captureEvent(eventName, props)
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ class AuthStore extends BudiStore<PortalAuthStore> {
|
|||
analytics
|
||||
.activate()
|
||||
.then(() => {
|
||||
analytics.identify(user._id)
|
||||
analytics.identify(user._id!)
|
||||
})
|
||||
.catch(() => {
|
||||
// This request may fail due to browser extensions blocking requests
|
||||
|
|
Loading…
Reference in New Issue