mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
switch tracking
This commit is contained in:
@@ -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 })
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -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]);*/
|
||||
};
|
||||
Reference in New Issue
Block a user