diff --git a/app/Analytics.tsx b/app/Analytics.tsx
new file mode 100644
index 000000000..b7fe9549d
--- /dev/null
+++ b/app/Analytics.tsx
@@ -0,0 +1,30 @@
+'use client';
+
+import { usePathname } from 'lib/i18n/navigation';
+import { init } from 'lib/utils/analytics';
+import Script from 'next/script';
+import { useEffect } from 'react';
+
+const Analytics = () => {
+ const path = usePathname();
+
+ // Mixpanel
+ useEffect(() => {
+ init();
+ // track('Viewed Page', { path });
+ }, []);
+
+ // SimpleAnalytics
+ return (
+ <>
+
+
+ >
+ );
+};
+
+export default Analytics;
diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx
index 46db22aa9..904a361d0 100644
--- a/app/[locale]/layout.tsx
+++ b/app/[locale]/layout.tsx
@@ -1,4 +1,5 @@
import { SpeedInsights } from '@vercel/speed-insights/next';
+import Analytics from 'app/Analytics';
import ToastifyConfig from 'components/common/ToastifyConfig';
import Footer from 'components/footer/Footer';
import Header from 'components/header/Header';
@@ -7,10 +8,8 @@ import { QueryProvider } from 'lib/hooks/QueryProvider';
import { EthereumProvider } from 'lib/hooks/ethereum/EthereumProvider';
import { ColorThemeProvider } from 'lib/hooks/useColorTheme';
import { locales } from 'lib/i18n/config';
-import { init } from 'lib/utils/analytics';
import { Metadata } from 'next';
import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';
-import Script from 'next/script';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';
import 'react-toastify/dist/ReactToastify.css';
import * as timeago from 'timeago.js';
@@ -25,8 +24,6 @@ timeago.register('ja', timeagoJa);
timeago.register('ru', timeagoRu);
timeago.register('zh', timeagoZh);
-init();
-
interface Props {
children: React.ReactNode;
params: {
@@ -58,6 +55,9 @@ const MainLayout = ({ children, params }: Props) => {
return (
+
+
+
@@ -76,7 +76,6 @@ const MainLayout = ({ children, params }: Props) => {
-
);
};
diff --git a/components/allowances/dashboard/controls/FilterSelect.tsx b/components/allowances/dashboard/controls/FilterSelect.tsx
index f79a20dc9..e6aff47e8 100644
--- a/components/allowances/dashboard/controls/FilterSelect.tsx
+++ b/components/allowances/dashboard/controls/FilterSelect.tsx
@@ -6,7 +6,6 @@ import { useColorTheme } from 'lib/hooks/useColorTheme';
import { useMounted } from 'lib/hooks/useMounted';
import { AllowanceData } from 'lib/interfaces';
import { normaliseLabel } from 'lib/utils';
-import { track } from 'lib/utils/analytics';
import { updateTableFilters } from 'lib/utils/table';
import { useTranslations } from 'next-intl';
import { useEffect } from 'react';
@@ -71,7 +70,6 @@ const FilterSelect = ({ table }: Props) => {
const tableFilters = generateTableFilters(options, selectedFilters);
const ignoreIds = [ColumnId.SPENDER];
updateTableFilters(table, tableFilters, ignoreIds);
- track('Updated Filters', { filters: tableFilters });
}, [selectedFilters]);
const displayOption = (option: Option, { selectValue }: FormatOptionLabelMeta