Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

379 B
Raw Blame
import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';

import { trackPageView } from '../../services/analytics';

/** Standard route-view tracker. Mount once inside the active router. */
export function AnalyticsPageTracker() {
  const { pathname } = useLocation();
  useEffect(() => {
    trackPageView(pathname);
  }, [pathname]);
  return null;
}