16 lines
369 B
TypeScript
16 lines
369 B
TypeScript
import posthog, { Properties } from 'posthog-js'
|
|
|
|
posthog.init(ANALYTICS_ID, {
|
|
api_host: ANALYTICS_HOST,
|
|
autocapture: false,
|
|
})
|
|
|
|
export const instance = posthog
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
export const trackEvent = (name: string, properties?: Properties) => {
|
|
posthog.capture(name, properties)
|
|
}
|
|
|
|
export enum AnalyticsEvent {}
|