mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 15:51:12 -05:00
feat: Implement custom view tracking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user