jan/web/utils/posthog.ts
hiento09 69cfeced99
Update posthog capture url list (#1022)
Co-authored-by: Hien To <tominhhien97@gmail.com>
2023-12-15 12:10:30 +07:00

18 lines
397 B
TypeScript

import posthog, { Properties } from 'posthog-js'
posthog.init(ANALYTICS_ID, {
api_host: ANALYTICS_HOST,
autocapture: {
url_allowlist: ['./*'],
},
})
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 {}