Skip to content

Commit 3eee7e3

Browse files
committed
feat: more analytics
1 parent cc1c057 commit 3eee7e3

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

apps/client/RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
You can open release notes by going to Settings -> About -> Release notes.
22

3+
## 1.9.10-beta
4+
5+
- Added more analytics
6+
37
## 1.9.9-beta
48

59
- Fixed a bug where the app would show "Log in for the latest info" the first time the user logs in

apps/client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "client",
3-
"version": "1.9.9-beta",
3+
"version": "1.9.10-beta",
44
"type": "module",
55
"scripts": {
66
"dev": "npm-run-all --parallel dev:*",
@@ -32,6 +32,7 @@
3232
"@tanstack/react-query": "^5.17.19",
3333
"@tanstack/react-query-devtools": "^5.17.19",
3434
"@tanstack/react-query-persist-client": "^5.17.19",
35+
"@types/mixpanel-browser": "^2.48.1",
3536
"@types/react-dom": "^18.0.9",
3637
"@vercel/analytics": "^1.1.1",
3738
"dayzed": "^3.2.3",
@@ -43,6 +44,7 @@
4344
"linkifyjs": "^4.0.2",
4445
"luxon": "^3.2.1",
4546
"micromark": "^3.1.0",
47+
"mixpanel-browser": "^2.49.0",
4648
"phosphor-react": "^1.4.1",
4749
"react": "^18.1.0",
4850
"react-dom": "^18.1.0",

apps/client/src/main.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import * as Sentry from "@sentry/react";
1717
import { createSyncStoragePersister } from "@tanstack/query-sync-storage-persister";
1818
import { QueryCache, QueryClient } from "@tanstack/react-query";
1919
import { inject } from "@vercel/analytics";
20+
import mixpanel from "mixpanel-browser";
2021

2122
// Redirect to new domain if using old domain
2223
if (window.location.host === "timetabl.vercel.app") {
@@ -129,6 +130,11 @@ const userInterface = new UserInterface(
129130
// =======
130131

131132
// Initialise analytics
133+
mixpanel.init("bdeb697218eafcf9988cf7dfa37f9250", {
134+
track_pageview: true,
135+
persistence: "localStorage",
136+
});
137+
132138
inject({
133139
beforeSend: (event) => {
134140
if (event.type === "pageview") {

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)