diff --git a/.env.template b/.env.template index 79173a7..be2429b 100644 --- a/.env.template +++ b/.env.template @@ -5,4 +5,4 @@ VITE_REMOTE_FOOTER_MENU_ID=24 VITE_REMOTE_SOCIAL_LINKS_ID=26 VITE_LOCATION_API_URL=https://www.ucf.edu/wp-json/wp/v2/locations/ VITE_BASEURL=/map/ -VITE_REACTGA_MEASUREMENT_ID=G-DFCVBKX579 +VITE_REACTGA_MEASUREMENT_ID='' diff --git a/src/App.tsx b/src/App.tsx index 3e5adbe..80f6b24 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -72,9 +72,10 @@ import campusData from './assets/campuses.json'; const TOKEN = import.meta.env.VITE_MAPBOX_TOKEN; const FOOTER_MENU_ID = import.meta.env.VITE_REMOTE_FOOTER_MENU_ID; const FOOTER_SOCIAL_ID = import.meta.env.VITE_REMOTE_SOCIAL_LINKS_ID; -const REACT_MEASUREMENT_ID = import.meta.env.VITE_REACTGA_MEASUREMENT_ID; +const REACT_MEASUREMENT_ID = import.meta.env.VITE_REACTGA_MEASUREMENT_ID || ''; function App() { + if(REACT_MEASUREMENT_ID) { ReactGA.initialize(REACT_MEASUREMENT_ID, { gaOptions: { debug_mode: true, @@ -86,7 +87,7 @@ function App() { // Send pageview with a custom path ReactGA.send({ hitType: "pageview", page: "/", title: "UCF Campus Map" }); - +} const initialLng = -81.200142; const intitalLat = 28.602368;