feat: Implement custom view tracking

This commit is contained in:
gpt-engineer-app[bot]
2025-10-10 15:53:56 +00:00
parent c39aba6994
commit 4d2d39fb5a
10 changed files with 288 additions and 58 deletions

View File

@@ -18,6 +18,7 @@ import { toast } from '@/hooks/use-toast';
import { submitCompanyUpdate } from '@/lib/companyHelpers';
import { VersionIndicator } from '@/components/versioning/VersionIndicator';
import { EntityHistoryTabs } from '@/components/history/EntityHistoryTabs';
import { trackPageView } from '@/lib/viewTracking';
export default function DesignerDetail() {
const { slug } = useParams<{ slug: string }>();
@@ -37,6 +38,13 @@ export default function DesignerDetail() {
}
}, [slug]);
// Track page view when designer is loaded
useEffect(() => {
if (designer?.id) {
trackPageView('company', designer.id);
}
}, [designer?.id]);
const fetchDesignerData = async () => {
try {
const { data, error } = await supabase