(event: string, properties: Record<string, any> = {}, orgId = '')
| 23 | } |
| 24 | |
| 25 | async sendTelemetry(event: string, properties: Record<string, any> = {}, orgId = ''): Promise<void> { |
| 26 | properties.version = await getAppVersion() |
| 27 | if (this.postHog) { |
| 28 | const distinctId = orgId || uuidv4() |
| 29 | this.postHog.capture({ |
| 30 | event, |
| 31 | distinctId, |
| 32 | properties |
| 33 | }) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | async flush(): Promise<void> { |
| 38 | if (this.postHog) { |
no test coverage detected