mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-25 12:54:18 +00:00
- Add PostHog client configuration in ui/lib/posthog.ts - Integrate PostHog tracking in auth forms and provider workflows - Add PostHog dependencies (posthog-js and posthog-node) - Update Next.js config for PostHog integration - Add environment variables for PostHog configuration - Update changelog with PostHog integration entry
12 lines
382 B
TypeScript
12 lines
382 B
TypeScript
import { PostHog } from "posthog-node";
|
|
|
|
// NOTE: This is a Node.js client, so you can use it for sending events from the server side to PostHog.
|
|
export default function PostHogClient() {
|
|
const posthogClient = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
|
|
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
|
|
flushAt: 1,
|
|
flushInterval: 0,
|
|
});
|
|
return posthogClient;
|
|
}
|