Skip to content

Commit 32f8c50

Browse files
Replace Measure ID (#23)
1 parent 2bea211 commit 32f8c50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<title>E-Bikes Portal</title>
88

99
<!-- Google Analytics -->
10-
<script async src="https://www.googletagmanager.com/gtag/js?id=%VITE_GA_MEASUREMENT_ID%"></script>
10+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J9Z61G9FJ6"></script>
1111
<script>
1212
window.dataLayer = window.dataLayer || [];
1313
function gtag(){dataLayer.push(arguments);}
1414
gtag('js', new Date());
15-
gtag('config', '%VITE_GA_MEASUREMENT_ID%');
15+
gtag('config', 'G-J9Z61G9FJ6');
1616
</script>
1717
</head>
1818
<body>

src/client/hooks/useGA.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export const useGA = () => {
1212

1313
useEffect(() => {
1414
// Track page view when location changes
15-
if (window.gtag && import.meta.env.VITE_GA_MEASUREMENT_ID) {
16-
window.gtag('config', import.meta.env.VITE_GA_MEASUREMENT_ID, {
15+
if (window.gtag) {
16+
window.gtag('config', 'G-J9Z61G9FJ6', {
1717
page_path: location.pathname + location.search,
1818
});
1919
}
2020
}, [location]);
21-
};
21+
};

0 commit comments

Comments
 (0)