()
| 70 | } |
| 71 | |
| 72 | export const createPostHogClient = async () => { |
| 73 | const posthog = new PostHog(env.POSTHOG_PAPIK, { |
| 74 | host: 'https://us.i.posthog.com', |
| 75 | flushAt: 1, |
| 76 | flushInterval: 0 |
| 77 | }); |
| 78 | |
| 79 | return posthog; |
| 80 | } |
| 81 | |
| 82 | export async function captureEvent<E extends PosthogEvent>(event: E, properties: PosthogEventMap[E]) { |
| 83 | try { |
no outgoing calls
no test coverage detected