Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(support-chat): add Community Hours link with PostHog tracking (#11662)

Lotte Verheyden8174e0153eb4
diff --git a/web/src/features/posthog-analytics/usePostHogClientCapture.ts b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
index 5bbb26d1c6..d56b783928 100644
--- a/web/src/features/posthog-analytics/usePostHogClientCapture.ts
+++ b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
@@ -196,7 +196,12 @@ export const events = {
],
help_popup: ["opened", "href_clicked"],
navigate_detail_pages: ["button_click_prev_or_next"],
- support_chat: ["initiated", "opened", "message_sent"], // also used on landing page for consistency
+ support_chat: [
+ "initiated",
+ "opened",
+ "message_sent",
+ "community_hours_click",
+ ], // also used on landing page for consistency
cmd_k_menu: ["opened", "search_entered", "navigated"],
spend_alert: ["created", "updated", "deleted"],
} as const;
diff --git a/web/src/features/support-chat/IntroSection.tsx b/web/src/features/support-chat/IntroSection.tsx
index 2cad1ad417..6ef7581407 100644
--- a/web/src/features/support-chat/IntroSection.tsx
+++ b/web/src/features/support-chat/IntroSection.tsx
@@ -8,6 +8,7 @@ import {
LibraryBig,
LifeBuoy,
Radio,
+ Calendar,
} from "lucide-react";
//eslint-disable-next-line no-restricted-imports
import { SiDiscord } from "react-icons/si";
@@ -17,6 +18,7 @@ import { usePlan } from "@/src/features/entitlements/hooks";
import { isCloudPlan } from "@langfuse/shared";
import { useUiCustomization } from "@/src/ee/features/ui-customization/useUiCustomization";
import { useLangfuseCloudRegion } from "@/src/features/organizations/hooks";
+import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
type SupportType = "in-app-support" | "custom" | "community";
@@ -28,6 +30,7 @@ export function IntroSection({
}) {
const uiCustomization = useUiCustomization();
const { isLangfuseCloud } = useLangfuseCloudRegion();
+ const capture = usePostHogClientCapture();
// Note: We previously added an entitlement for in-app support, but removed it for now.
// The issue was that on global routes e.g., https://langfuse.com/setup, the entitlement
@@ -248,6 +251,17 @@ export function IntroSection({
<SiDiscord className="mr-2 h-4 w-4" /> Discord ↗
</a>
</Button>
+ <Button asChild variant="ghost" className="justify-start px-1.5">
+ <a
+ href="https://lu.ma/langfuse"
+ target="_blank"
+ rel="noopener"
+ className="flex items-center"
+ onClick={() => capture("support_chat:community_hours_click")}
+ >
+ <Calendar className="mr-2 h-4 w-4" /> Community Hours ↗
+ </a>
+ </Button>
{showStatusPageLink && (
<Button asChild variant="ghost" className="justify-start px-1.5">