Skip to content

Commit

Permalink
conditional statement added to load the program without tracking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramin Farhadi authored and Ramin Farhadi committed Jul 15, 2024
1 parent 532512e commit 5f1f05b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -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=''
5 changes: 3 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down

0 comments on commit 5f1f05b

Please sign in to comment.