From 13deb2e7120f4ef16beb52658fe9f07abb595e1c Mon Sep 17 00:00:00 2001 From: Ramin Farhadi Date: Mon, 15 Jul 2024 12:01:36 -0400 Subject: [PATCH 1/5] setting up react-ga4. --- .env.template | 3 ++- index.html | 7 ------- package-lock.json | 7 +++++++ package.json | 1 + public/favicon.png | Bin 0 -> 15032 bytes public/vite.svg | 1 + src/App.tsx | 8 ++++++++ 7 files changed, 19 insertions(+), 8 deletions(-) create mode 100755 public/favicon.png create mode 100755 public/vite.svg diff --git a/.env.template b/.env.template index 786dc76..79173a7 100644 --- a/.env.template +++ b/.env.template @@ -4,4 +4,5 @@ VITE_REMOTE_HEADER_MENU_ID=23 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_BASEURL=/map/ +VITE_REACTGA_MEASUREMENT_ID=G-DFCVBKX579 diff --git a/index.html b/index.html index 37b0c49..fd42c4f 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,6 @@ - - - diff --git a/package-lock.json b/package-lock.json index e09e9b7..e262151 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", + "react-ga4": "^2.1.0", "togeojson": "^0.16.0", "typescript": "^5.2.2", "vite": "^5.2.0" @@ -3434,6 +3435,12 @@ "react": "^18.3.1" } }, + "node_modules/react-ga4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/react-ga4/-/react-ga4-2.1.0.tgz", + "integrity": "sha512-ZKS7PGNFqqMd3PJ6+C2Jtz/o1iU9ggiy8Y8nUeksgVuvNISbmrQtJiZNvC/TjDsqD0QlU5Wkgs7i+w9+OjHhhQ==", + "dev": true + }, "node_modules/react-map-gl": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/react-map-gl/-/react-map-gl-7.1.7.tgz", diff --git a/package.json b/package.json index 020a21a..c8b6ec4 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", + "react-ga4": "^2.1.0", "togeojson": "^0.16.0", "typescript": "^5.2.2", "vite": "^5.2.0" diff --git a/public/favicon.png b/public/favicon.png new file mode 100755 index 0000000000000000000000000000000000000000..65c14029589c8ba17db10d3c34cac50427b9971c GIT binary patch literal 15032 zcmeHu(|09I@a>6hXJXs7ZQJ(5wrxzDOl;epm=o(vZ2RPXzxxN=`*>e&zwGMn+N;;< zdZ|@aJ4QuG8VMdB9smF!$;wEm0RZ6tncx6ei2q=uoMQ4n0CQ8576a7J5uE*J2dgM( zNd9;D|JVP+AHbBdt@-cyV0SeobpRp-pPGehSXybz(DdTo(cRbg&B0V(Q*nlao)iZW zJg!Sp-OF2z77qa=rb)!p$5va43@lsE*-4hSksO`fY8QzPFp2@%AZOz$P-!QZiY6Z) zT);_8=px39Nh74A&=Xx``LBwNf7$Fq6)LhXnZlTR#Xy`D_Iv{uOTxs6#KOP z4pJE6Q&N3WH4^9+*xuCWXPRu@`xw4yK5##^FR`A_GMN&vsawPGnm{-oJ8~T^ntJ)~ z%&2U!p?lXd(+_HTWubNHG|7k;#}fx}X*-~@{q#q`F5&-dF#9T1@V|Z)A2;@xBwJg_ zOm!09c-!uNM9AMaZzcupYs#-1vP`CVSGJ!AebM~*k8=OmCtDRC_~BuGPH$1*N%Qqu zV|6lo9U>Yc+ot_}YT9y3Z*hE)9vO5{@beOfEovq3%Nb|nI#@KK-?i+3n2-bETg>V( zM$JY0hX3J~*8~6DktAekB~A5Z1g6ZZh`Fh|Sy8YWUw17ri*$wJkW%vTG3UZ#TCg ze$}|(z^cvNn}o^ies2DV%9P#`i?^D7YWFr^6sN}s$&?{yhw+YdaZOonz5RKVXyO=t z+1&uM&Ff7w-P7a9pzIwYNc%o?>GrQbdY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h%n zn`W!ua)4;zuy^*s>YClP{B=H$e}8L!Ank3*VN;)=I6C9(IqG6Ou?Sc)z_RAGn`Pln*X33^0iTVr zXBTT&9NB%-bWr@=0(X-F()G!B;MdK4pw)(ihwSx|p;7L#@Is4n zdcXw)pbNG;5b*NY-LD#C0B3&q_K)BMspeHZ9MSuktW$rmbe{*Wo8Vk&4>}GLBUBi5 zb(^D}s8IYSw)x%2(jVZVW3a{Tb4IN2uq66rd-D@E>2GBU@iQn)|M>%5bgv3xx>uUE zKt=Rvf%pm(Fja~H4HX+HMq~?3GjQW{J)i#b$_D5>dMNR1(~-d2^JJ9h{WMr4^&W^B zFe>wAf0Bd++**_~hK!pEXw?7fq+3Rmzzs+az~LP!%75_LZO)vnSLV+Rr0fnG*8(s% z9bTIaLwk3ZJ`uhCa{e1|;gj8QWPE6J>RN>B8NT;7B1mnA8uNU*gdD^8zsBG1scYoa z(WgoWxChd2_3^$R3}eQ_MDK$4mgb6{*82|2HSEySts8F7L@Eb&*|26H~ELq+z=v|etx(8L0&9> zQ(QP6f-v4}SwfMNsa702FKvOGh_{3t;vX5q%O6n*u zT-Q5JEhFZ+yEsOyLbB(<{e8og)%$UKu`(5VbP#fW-ixm2;o*4Y`kh5Czc-Kl!>!@} iuJHTcB0%`8Z!kAiYA5~={-OU7T*^u+Nz{v(g#It-bA4t2 literal 0 HcmV?d00001 diff --git a/public/vite.svg b/public/vite.svg new file mode 100755 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 8e300be..4147424 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ import './App.scss' +import ReactGA from "react-ga4" // React Imports import { useEffect, useMemo, useRef, useState } from 'react' @@ -71,8 +72,15 @@ 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; function App() { + ReactGA.initialize(REACT_MEASUREMENT_ID); + + // Send pageview with a custom path + ReactGA.send({ hitType: "pageview", page: "/", title: "UCF Campus Map" }); + + const initialLng = -81.200142; const intitalLat = 28.602368; const initialZoom = 15; From f3bc9dab9ce9373300a5ed680502c367768933d9 Mon Sep 17 00:00:00 2001 From: Ramin Farhadi Date: Mon, 15 Jul 2024 13:18:35 -0400 Subject: [PATCH 2/5] added the React_measurement_id --- src/App.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 4147424..3e5adbe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -75,7 +75,14 @@ const FOOTER_SOCIAL_ID = import.meta.env.VITE_REMOTE_SOCIAL_LINKS_ID; const REACT_MEASUREMENT_ID = import.meta.env.VITE_REACTGA_MEASUREMENT_ID; function App() { - ReactGA.initialize(REACT_MEASUREMENT_ID); + ReactGA.initialize(REACT_MEASUREMENT_ID, { + gaOptions: { + debug_mode: true, + }, + gtagOptions: { + debug_mode: true, + }, + }); // Send pageview with a custom path ReactGA.send({ hitType: "pageview", page: "/", title: "UCF Campus Map" }); From 6e114b29acd46cc47ca575186657ae46919423cf Mon Sep 17 00:00:00 2001 From: Ramin Farhadi Date: Mon, 15 Jul 2024 13:45:18 -0400 Subject: [PATCH 3/5] workflows variable updated for dev-test --- .../azure-static-web-apps-delightful-moss-0832eaa0f.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml index a81be97..c59ab7b 100644 --- a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml +++ b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml @@ -22,6 +22,7 @@ jobs: VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_DEV }} VITE_BASEURL: ${{ vars.VITE_BASEURL }} + VITE_REACTGA_MEASUREMENT_ID: ${{ vars.VITE_REACTGA_MEASUREMENT_ID_DEV-TEST }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 From 532512e1c4924e099ba9b478e4f4b33eaf73c17b Mon Sep 17 00:00:00 2001 From: Ramin Farhadi Date: Mon, 15 Jul 2024 13:46:10 -0400 Subject: [PATCH 4/5] dash removed. --- .../azure-static-web-apps-delightful-moss-0832eaa0f.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml index c59ab7b..eb30aea 100644 --- a/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml +++ b/.github/workflows/azure-static-web-apps-delightful-moss-0832eaa0f.yml @@ -22,7 +22,7 @@ jobs: VITE_REMOTE_SOCIAL_LINKS_ID: ${{ vars.VITE_REMOTE_SOCIAL_LINKS_ID }} VITE_LOCATION_API_URL: ${{ vars.VITE_LOCATION_API_URL_DEV }} VITE_BASEURL: ${{ vars.VITE_BASEURL }} - VITE_REACTGA_MEASUREMENT_ID: ${{ vars.VITE_REACTGA_MEASUREMENT_ID_DEV-TEST }} + VITE_REACTGA_MEASUREMENT_ID: ${{ vars.VITE_REACTGA_MEASUREMENT_ID_DEVTEST }} name: Build and Deploy Job steps: - uses: actions/checkout@v3 From 5f1f05bf0ee3fba4fc127f9e6d48e388d58075f2 Mon Sep 17 00:00:00 2001 From: Ramin Farhadi Date: Mon, 15 Jul 2024 14:46:36 -0400 Subject: [PATCH 5/5] conditional statement added to load the program without tracking. --- .env.template | 2 +- src/App.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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;