diff --git a/components/AiChatButton.tsx b/components/AiChatButton.tsx index f2e38f470..0be643953 100644 --- a/components/AiChatButton.tsx +++ b/components/AiChatButton.tsx @@ -12,6 +12,8 @@ import { useState, } from "react"; +import * as posthog from "@/lib/posthog"; + import useInkeepSettings from "../hooks/useInKeepSettings"; const ModalChat = dynamic( @@ -47,6 +49,11 @@ export function InkeepModalProvider({ children }: { children: ReactNode }) { } = useInkeepSettings(); const openWithPrompt = useCallback((prompt: string) => { + posthog.track("ask-ai-mobile-modal-opened-client", { + source: "search", + has_prompt: true, + prompt_length: prompt.length, + }); setInitialQuery(prompt); setIsOpen(true); }, []); @@ -78,7 +85,13 @@ export function InkeepModalProvider({ children }: { children: ReactNode }) { {children}