mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
15 lines
389 B
JavaScript
15 lines
389 B
JavaScript
|
|
import { useEffect } from "react";
|
|
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]);*/
|
|
}; |