Files
mice/lib/posthog.ts

11 lines
316 B
TypeScript

import { PostHog } from "posthog-node"
export default function PostHogClient() {
const posthogClient = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
// capture_pageview: 'history_change',
flushAt: 1,
flushInterval: 0,
})
return posthogClient
}