From 49ddc64a300069376c8864254369e1f60a2e8059 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Tue, 14 Feb 2023 22:13:03 -0500 Subject: [PATCH] switch tracking --- frontend/public/index.html | 2 +- frontend/src/tracking.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/public/index.html b/frontend/public/index.html index b6f4693..a6a39f8 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -37,7 +37,7 @@ window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', '%REACT_APP_GOOGLE_ANALYTICS%', { send_page_view: false }) + gtag('config', '%REACT_APP_GOOGLE_ANALYTICS%', { send_page_view: true }) diff --git a/frontend/src/tracking.js b/frontend/src/tracking.js index 787cae1..a9c1571 100644 --- a/frontend/src/tracking.js +++ b/frontend/src/tracking.js @@ -4,12 +4,12 @@ import { useLocation } from "react-router-dom"; export const usePageTracking = () => { const location = useLocation(); - +/* useEffect(() => { window.gtag("event", "page_view", { page_path: location.pathname + location.search + location.hash, page_search: location.search, page_hash: location.hash, }); - }, [location]); + }, [location]);*/ }; \ No newline at end of file