Skip to content

Commit 860e092

Browse files
committed
refactor: remove non-functional UA tracking code in favor of future GA4 migration
1 parent 8e41e16 commit 860e092

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

src/components/Site/Site.jsx

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -138,36 +138,6 @@ function Site(props) {
138138
}
139139
}, []);
140140

141-
useEffect(() => {
142-
if (process.env.NODE_ENV === "production") {
143-
const GA_ID = "UA-46921629-2";
144-
145-
if (!window.ga) {
146-
window.ga ||= function ga() {
147-
(ga.q = ga.q || []).push(arguments); // eslint-disable-line
148-
};
149-
ga.l = +new Date(); // eslint-disable-line
150-
151-
const gads = document.createElement("script");
152-
gads.async = true;
153-
gads.type = "text/javascript";
154-
gads.src = "//www.google-analytics.com/analytics.js";
155-
const [head] = document.getElementsByTagName("head");
156-
head.appendChild(gads);
157-
158-
window.ga("create", GA_ID, "auto");
159-
}
160-
161-
const path = location.pathname + location.search;
162-
window.ga("set", {
163-
page: path,
164-
title: document.title,
165-
location: document.location,
166-
});
167-
window.ga("send", { hitType: "pageview" });
168-
}
169-
}, [location]);
170-
171141
const [mounted, setMounted] = useState(false);
172142

173143
useEffect(() => {

0 commit comments

Comments
 (0)