add pageview into the sidebar

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-04-28 13:39:13 +03:00
parent 2308d5dbab
commit 191e1f0c6e
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.7.25", "version": "0.7.26",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -1,4 +1,4 @@
import { useMemo } from "react"; import { useMemo, useEffect } from "react";
import "./Sidebar.scss"; import "./Sidebar.scss";
@ -17,6 +17,7 @@ import {
import { styled } from "@mui/material/styles"; import { styled } from "@mui/material/styles";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
import { useSwitchChain } from "wagmi"; import { useSwitchChain } from "wagmi";
import ReactGA from "react-ga4";
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import GitHubIcon from '@mui/icons-material/GitHub'; import GitHubIcon from '@mui/icons-material/GitHub';
@ -86,6 +87,10 @@ const NavContent = ({ chainId, addressChainId }) => {
return `(${number}, ${number})`; return `(${number}, ${number})`;
}, [chainId]); }, [chainId]);
useEffect(() => {
ReactGA.send({ hitType: "pageview", page: "/sidebar" });
}, []);
return ( return (
<Paper className="dapp-sidebar"> <Paper className="dapp-sidebar">
<Box className="dapp-sidebar-inner" display="flex" justifyContent="space-between" flexDirection="column"> <Box className="dapp-sidebar-inner" display="flex" justifyContent="space-between" flexDirection="column">