Skip to content

Commit

Permalink
Merge pull request #761 from UTDNebula/change-google-analytics
Browse files Browse the repository at this point in the history
Change google analytics
  • Loading branch information
TyHil authored Oct 30, 2024
2 parents c8ef26e + f4e90cd commit 7196cbc
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 278 deletions.
7 changes: 0 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ NEXT_PUBLIC_VALIDATOR=
NODE_ENV=


########## Umami ##########
## Umami: self-hosted analytics service
## Required only in production.
NEXT_PUBLIC_UMAMI_URL=
NEXT_PUBLIC_UMAMI_WEBSITE_ID=


########## Sentry ##########
## Sentry: error tracking service
## Not required in any environments.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ jobs:

NODE_ENV: production
VERCEL_ENV: preview

# UMAMI
NEXT_PUBLIC_UMAMI_URL: hi
NEXT_PUBLIC_UMAMI_WEBSITE_ID: bye
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ jobs:

NODE_ENV: test

# UMAMI
NEXT_PUBLIC_UMAMI_URL: hi
NEXT_PUBLIC_UMAMI_WEBSITE_ID: bye

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 0 additions & 2 deletions docs/WORKFLOWS_AND_DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ All deployment/external service:
- Web server: Vercel
- TRPC Routes: Vercel Edge Functions
- Planner Postgres: Neon
- Umami (User analytics): Railway
- Umami Postgres: Railway
- Sentry (Crash analytics)
- Auth Providers: Discord, Google, Facebook
- Mailtrap (Email "magic link" auth)
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@mui/material": "^5.4.0",
"@next-auth/prisma-adapter": "^1.0.5",
"@next/bundle-analyzer": "^13.1.6",
"@next/third-parties": "^15.0.2",
"@prisma/client": "^5.0.0",
"@radix-ui/react-checkbox": "^1.0.1",
"@radix-ui/react-dialog": "^1.0.3",
Expand Down
23 changes: 0 additions & 23 deletions src/components/common/AnalyticsWrapper.tsx

This file was deleted.

55 changes: 24 additions & 31 deletions src/components/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ChevronIcon from '@/icons/ChevronIcon';
import PlusIcon from '@/icons/PlusIcon';
import { trpc } from '@utils/trpc';

import AnalyticsWrapper from '../common/AnalyticsWrapper';
import PlanCard from '../landing/PlanCard';
import TemplateModal from '../template/Modal';

Expand Down Expand Up @@ -122,42 +121,36 @@ export default function PlansPage(): JSX.Element {

<DropdownMenu.Portal>
<DropdownMenu.Content className="relative top-2 w-min rounded-md border border-neutral-300 bg-generic-white drop-shadow-xl">
<AnalyticsWrapper analyticsClass="umami--click--custom-plan">
<DropdownItem
data-testid="add-blank-plan-btn"
text="Start New"
onClick={() => {
setPlanPage(0);
setOpenTemplateModal(true);
}}
/>
</AnalyticsWrapper>
<DropdownItem
data-testid="add-blank-plan-btn"
text="Start New"
onClick={() => {
setPlanPage(0);
setOpenTemplateModal(true);
}}
/>

<DropdownMenu.Separator className="DropdownMenuSeparator h-0.5 bg-black opacity-10" />

<AnalyticsWrapper analyticsClass="umami--click--custom-plan">
<DropdownItem
data-testid="add-custom-plan-btn"
text="From Transcript"
onClick={() => {
setPlanPage(1);
setOpenTemplateModal(true);
}}
/>
</AnalyticsWrapper>
<DropdownItem
data-testid="add-custom-plan-btn"
text="From Transcript"
onClick={() => {
setPlanPage(1);
setOpenTemplateModal(true);
}}
/>

<DropdownMenu.Separator className="DropdownMenuSeparator h-0.5 bg-black opacity-10" />

<AnalyticsWrapper analyticsClass="umami--click--template-plan">
<DropdownItem
text="From Template"
data-testid="add-template-plan-btn"
onClick={() => {
setPlanPage(2);
setOpenTemplateModal(true);
}}
/>
</AnalyticsWrapper>
<DropdownItem
text="From Template"
data-testid="add-template-plan-btn"
onClick={() => {
setPlanPage(2);
setOpenTemplateModal(true);
}}
/>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
Expand Down
29 changes: 13 additions & 16 deletions src/components/planner/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Skeleton from 'react-loading-skeleton';
import { v4 as uuidv4 } from 'uuid';

import Button from '@/components/Button';
import AnalyticsWrapper from '@/components/common/AnalyticsWrapper';
import RequirementsContainer from '@/components/planner/Sidebar/RequirementsContainer';
import SearchBar from '@/components/planner/Sidebar/SearchBar';
import ChevronIcon from '@/icons/ChevronIcon';
Expand Down Expand Up @@ -164,21 +163,19 @@ function CourseSelectorContainer({
</h6>
</div>
<div className="z-[999] drop-shadow-2xl">
<AnalyticsWrapper analyticsClass="umami--click--search-course">
<SearchBar
onClick={() => setDisplay(true)}
updateQuery={(q) => {
updateQuery(q);
setDisplay(true);
}}
className={`${
displayResults
? 'rounded-b-none border-b-transparent'
: 'rounded-b-[10px] border-b-inherit'
}`}
placeholder="Search courses"
/>
</AnalyticsWrapper>
<SearchBar
onClick={() => setDisplay(true)}
updateQuery={(q) => {
updateQuery(q);
setDisplay(true);
}}
className={`${
displayResults
? 'rounded-b-none border-b-transparent'
: 'rounded-b-[10px] border-b-inherit'
}`}
placeholder="Search courses"
/>
<div className="relative">
<div
ref={ref}
Expand Down
11 changes: 3 additions & 8 deletions src/components/planner/Tiles/SemesterTile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { UniqueIdentifier, useDroppable } from '@dnd-kit/core';
import React, { FC, forwardRef, useState, useRef } from 'react';

import AnalyticsWrapper from '@/components/common/AnalyticsWrapper';
import ChevronIcon from '@/icons/ChevronIcon';
import LockIcon from '@/icons/LockIcon';
import UnlockedIcon from '@/icons/UnlockedIcon';
Expand Down Expand Up @@ -125,13 +124,9 @@ export const MemoizedSemesterTile = React.memo(
>
{displaySemesterCode(semester.code)}
</h3>
<AnalyticsWrapper analyticsClass="umami--click--lock-course">
<button
onClick={() => handleSemesterLock(semester.id.toString(), !semester.locked)}
>
{!semester.locked ? <UnlockedIcon /> : <LockIcon />}
</button>
</AnalyticsWrapper>
<button onClick={() => handleSemesterLock(semester.id.toString(), !semester.locked)}>
{!semester.locked ? <UnlockedIcon /> : <LockIcon />}
</button>
</div>
<SemesterTileDropdown
locked={semester.locked}
Expand Down
Loading

0 comments on commit 7196cbc

Please sign in to comment.