feat: add plausible

This commit is contained in:
2026-06-13 22:07:00 -03:00
parent a2947b3bf2
commit 1c496e8d8d
10 changed files with 102 additions and 37 deletions

View File

@@ -4,12 +4,13 @@
* @module App
*/
import { lazy, Suspense } from "react";
import { lazy, Suspense, useEffect } from "react";
import { HashRouter as Router, Routes, Route, useLocation } from "react-router-dom";
import "./App.css";
import HomePage from "./pages/HomePage/HomePage";
import LabPython from "./pages/LabPython/LabPython";
import ScrollToTop from "./components/ScrollToTop";
import { trackPageView } from "./services/plausible";
const Playground = lazy(() => import("./pages/Playground/Playground"));
const About = lazy(() => import("./pages/About/About"));
@@ -68,6 +69,10 @@ function AppRoutes() {
// keeps rendering behind the modal overlay.
const backgroundLocation = location.state?.backgroundLocation;
useEffect(() => {
trackPageView(location.pathname);
}, [location.pathname]);
return (
<>
<ScrollToTop />