Skip to content

Commit

Permalink
disable some click event tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
manishiwa committed Nov 4, 2024
1 parent 3833017 commit e5073b6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
24 changes: 12 additions & 12 deletions components/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ const Notification = () => {
const handleShowNotifications = (isMobile = false) => {
if (isMobile) {
// show immediately on mobile
track("opened Notification Center", {
location: "mobile header",
page: currentPath,
});
// track("opened Notification Center", {
// location: "mobile header",
// page: currentPath,
// });
setOpenNotif(true);
updateSeenNotifications();
} else {
// show after a delay on desktop
hoverTimeoutRef.current = setTimeout(() => {
track("opened Notification Center", {
location: "desktop header",
page: currentPath,
});
// track("opened Notification Center", {
// location: "desktop header",
// page: currentPath,
// });
setOpenNotif(true);
updateSeenNotifications();
}, 300);
Expand Down Expand Up @@ -338,10 +338,10 @@ const Notification = () => {
className={`w-[24px] h-[24px] transition-transform duration-300 ${openNotif ? "rotate-90" : "rotate-0"
}`}
onClick={() => {
track("clicked Notification Center", {
location: "desktop header",
page: window.location.pathname,
});
// track("clicked Notification Center", {
// location: "desktop header",
// page: window.location.pathname,
// });
setOpenNotif(!openNotif);
}}
style={{
Expand Down
20 changes: 10 additions & 10 deletions components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ export default function Sidebar({ isMobile = false }: SidebarProps) {
// top: scrollHeight >= 15 ? "20px" : `calc(28px - ${scrollHeight}px)`,
// }}
onClick={() => {
if (isMobileSidebarOpen)
track("closed Navigation Menu", {
location: "mobile sidebar",
page: window.location.pathname,
});
else
track("opened Navigation Menu", {
location: "mobile sidebar",
page: window.location.pathname,
});
// if (isMobileSidebarOpen)
// track("closed Navigation Menu", {
// location: "mobile sidebar",
// page: window.location.pathname,
// });
// else
// track("opened Navigation Menu", {
// location: "mobile sidebar",
// page: window.location.pathname,
// });

toggleMobileSidebar();
}}
Expand Down
8 changes: 4 additions & 4 deletions components/layout/SidebarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export default function SidebarContainer() {
</div>
</Link>
<div className="absolute flex items-end p-[10px] right-0 cursor-pointer " onClick={() => {
track("clicked Sidebar Close", {
location: "desktop sidebar",
page: window.location.pathname,
});
// track("clicked Sidebar Close", {
// location: "desktop sidebar",
// page: window.location.pathname,
// });
toggleSidebar();
}}>
<Icon
Expand Down
1 change: 1 addition & 0 deletions lib/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const dataAvailabilityGroup: NavigationItem = {
label: "Data Availability",
key: "metrics",
icon: "gtp-data-availability",
newChild: true,
options: [
{
label: "Blob Count",
Expand Down

0 comments on commit e5073b6

Please sign in to comment.