This commit is contained in:
bkellam 2025-12-04 09:30:48 -08:00
parent bcca1d6d7d
commit 39e61d9a77

View file

@ -48,6 +48,10 @@ const getPostHogCookie = (cookieStore: Pick<RequestCookies, 'get'>): PostHogCook
} }
export async function captureEvent<E extends PosthogEvent>(event: E, properties: PosthogEventMap[E]) { export async function captureEvent<E extends PosthogEvent>(event: E, properties: PosthogEventMap[E]) {
if (env.SOURCEBOT_TELEMETRY_DISABLED === 'true') {
return;
}
const cookieStore = await cookies(); const cookieStore = await cookies();
const cookie = getPostHogCookie(cookieStore); const cookie = getPostHogCookie(cookieStore);