Skip to content

Commit 8bd4e8b

Browse files
authored
feat(analytics): Add @vercel/analytics (#116)
* build(deps): Add `@vercel/analytics` * chore: remove google analytics references
1 parent e215703 commit 8bd4e8b

File tree

7 files changed

+15
-26
lines changed

7 files changed

+15
-26
lines changed

.env.example

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
HOST_URL=
21
SMU_SCRAPER_URL=
32
SCHOOL_SEMESTERS_URL=
43
SMU_LIBRARIES_OCCUPANCY_URL=
5-
FIREBASE_API_KEY=
6-
FIREBASE_PROJECT_ID=
7-
FIREBASE_APP_ID=
8-
FIREBASE_MEASUREMENT_ID=

next.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@ module.exports = {
3434
env: {
3535
SMU_SCRAPER_URL: process.env.SMU_SCRAPER_URL,
3636
SCHOOL_SEMESTERS_URL: process.env.SCHOOL_SEMESTERS_URL,
37-
FIREBASE_API_KEY: process.env.FIREBASE_API_KEY,
38-
FIREBASE_PROJECT_ID: process.env.FIREBASE_PROJECT_ID,
39-
FIREBASE_APP_ID: process.env.FIREBASE_APP_ID,
40-
FIREBASE_MEASUREMENT_ID: process.env.FIREBASE_MEASUREMENT_ID,
4137
},
4238
};

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"dependencies": {
3434
"@floating-ui/react": "^0.25.3",
3535
"@svgr/webpack": "^6.5.1",
36+
"@vercel/analytics": "^1.1.1",
3637
"axios": "^1.2.1",
3738
"csv-parse": "^4.16.2",
3839
"lodash": "^4.17.21",

src/pages/_app.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Analytics } from '@vercel/analytics/react';
12
import { AppProps } from 'next/app';
23
import React from 'react';
34

@@ -13,6 +14,7 @@ const App: React.FC<AppProps> = function (props) {
1314
<DataWrapper>
1415
<GlobalStyles />
1516
<Component {...pageProps} />
17+
<Analytics />
1618
</DataWrapper>
1719
</ThemeContext>
1820
);

src/screens/smu/components/modal/BOSSTimetable/index.tsx

-7
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,6 @@ const BOSSTimetable: React.FC = () => {
244244
[]
245245
);
246246

247-
const handleICalTrack = React.useCallback(() => {
248-
// firebase
249-
// ?.analytics()
250-
// .logEvent('file_download', { description: 'BOSS Timetable Export' });
251-
}, []);
252-
253247
return (
254248
<>
255249
<ModalTemplate title="Boss Timetable Export">
@@ -289,7 +283,6 @@ const BOSSTimetable: React.FC = () => {
289283
</Wrapper>
290284
{csvContents !== null ? (
291285
<CustomPrimaryBtn
292-
onClick={handleICalTrack}
293286
href={hrefDownload}
294287
download="boss_timetable_export.ics"
295288
role="button"

src/shared/utils/firebase.ts

-10
This file was deleted.

yarn.lock

+12
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,13 @@
16001600
"@typescript-eslint/types" "5.47.0"
16011601
eslint-visitor-keys "^3.3.0"
16021602

1603+
"@vercel/analytics@^1.1.1":
1604+
version "1.1.1"
1605+
resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-1.1.1.tgz#2a712378a95014a548b4f9d2ae1ea0721433908d"
1606+
integrity sha512-+NqgNmSabg3IFfxYhrWCfB/H+RCUOCR5ExRudNG2+pcRehq628DJB5e1u1xqwpLtn4pAYii4D98w7kofORAGQA==
1607+
dependencies:
1608+
server-only "^0.0.1"
1609+
16031610
acorn-jsx@^5.3.2:
16041611
version "5.3.2"
16051612
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
@@ -3772,6 +3779,11 @@ semver@^7.3.7:
37723779
dependencies:
37733780
lru-cache "^6.0.0"
37743781

3782+
server-only@^0.0.1:
3783+
version "0.0.1"
3784+
resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e"
3785+
integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==
3786+
37753787
shallowequal@^1.1.0:
37763788
version "1.1.0"
37773789
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"

0 commit comments

Comments
 (0)