Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit cad7f50

Browse files
committed
fix: remove unused analytics
1 parent 95cdd9a commit cad7f50

File tree

4 files changed

+116
-202
lines changed

4 files changed

+116
-202
lines changed

apps/client/index.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
name="description"
1818
content="Timetabl is a blazing fast, offline-enabled, installable timetable app for SBHS. It allows you to access your periods for the day, scan your student barcode, and view your Daily Notices."
1919
/>
20-
<script
21-
defer
22-
data-domain="timetabl.app"
23-
src="https://plausible.io/js/script.js"
24-
></script>
2520
</head>
2621
<body>
2722
<div id="root"></div>

apps/client/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,15 @@
2929
"@highlight-run/react": "^3.2.1",
3030
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
3131
"@rollup/plugin-replace": "^4.0.0",
32+
"@sentry/react": "^7.76.0",
3233
"@tanstack/query-sync-storage-persister": "^4.0.10",
3334
"@tanstack/react-query": "^4.20.4",
3435
"@tanstack/react-query-devtools": "^4.0.10",
3536
"@tanstack/react-query-persist-client": "^4.0.10",
3637
"@types/react-dom": "^18.0.9",
37-
"@vercel/analytics": "^0.1.5",
3838
"dayzed": "^3.2.3",
3939
"dompurify": "^2.4.0",
4040
"framer-motion": "^10.12.18",
41-
"highlight.run": "^7.4.0",
4241
"immer": "^9.0.19",
4342
"jsbarcode": "^3.11.5",
4443
"linkify-html": "^4.0.2",

apps/client/src/main.tsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { version } from "../package.json";
21
import config from "./config";
32
import NetworkError from "./errors/NetworkError";
43
import { UnauthorizedError } from "./errors/UnauthorisedError";
@@ -13,9 +12,9 @@ import { log } from "./utils/log";
1312
import { sendToVercelAnalytics } from "./vitals";
1413
import { OAuth2Client, OAuth2Fetch } from "@badgateway/oauth2-client";
1514
import "@fontsource/poppins";
15+
import * as Sentry from "@sentry/react";
1616
import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister";
1717
import { QueryCache, QueryClient } from "@tanstack/react-query";
18-
import { H } from "highlight.run";
1918

2019
// Redirect to new domain if using old domain
2120
if (window.location.host === "timetabl.vercel.app") {
@@ -24,11 +23,23 @@ if (window.location.host === "timetabl.vercel.app") {
2423

2524
// Initialise analytics if consented
2625
if (localStorage.getItem("consentedToWelcomeMessage")) {
27-
H.init("zg092lg9", {
28-
enableStrictPrivacy: true,
29-
version,
30-
reportConsoleErrors: true,
31-
environment: import.meta.env.MODE,
26+
Sentry.init({
27+
dsn: "https://3eaf1d52758e5e86de9d4d6a4958a5e3@o4506133038301184.ingest.sentry.io/4506133044723712",
28+
integrations: [
29+
new Sentry.BrowserTracing({
30+
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
31+
tracePropagationTargets: [
32+
"localhost",
33+
/^https:\/\/yourserver\.io\/api/,
34+
],
35+
}),
36+
new Sentry.Replay(),
37+
],
38+
// Performance Monitoring
39+
tracesSampleRate: 1.0, // Capture 100% of the transactions
40+
// Session Replay
41+
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
42+
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
3243
});
3344
}
3445

0 commit comments

Comments
 (0)