File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { Contact } from "@/components/sections/Contact";
1111import { ThemeProvider } from "@/contexts/ThemeContext" ;
1212import { MixerPanel } from "@/components/MixerPanel" ;
1313import { Analytics } from "@vercel/analytics/react" ;
14+ import { track } from "@vercel/analytics" ;
1415import { SpeedInsights } from "@vercel/speed-insights/react" ;
1516
1617const App = ( ) => {
@@ -19,7 +20,9 @@ const App = () => {
1920 useEffect ( ( ) => {
2021 const getRoute = ( ) => ( location . hash . replace ( "#" , "" ) || "about" ) . toLowerCase ( ) ;
2122 const handleHashChange = ( ) => {
22- setCurrentPage ( getRoute ( ) ) ;
23+ const newPage = getRoute ( ) ;
24+ setCurrentPage ( newPage ) ;
25+ track ( "Pageview" , { path : window . location . pathname + window . location . hash } ) ;
2326 window . scrollTo ( { top : 0 , behavior : "auto" } ) ;
2427 } ;
2528 handleHashChange ( ) ;
You can’t perform that action at this time.
0 commit comments