diff --git a/src/pages/Analytics.tsx b/src/pages/Analytics.tsx new file mode 100644 index 0000000..5220b30 --- /dev/null +++ b/src/pages/Analytics.tsx @@ -0,0 +1,127 @@ +import Sidebar from "@/components/Sidebar"; +import DashboardHeader from "@/components/DashboardHeader"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from "recharts"; + +const growthData = [ + { month: "Jul", users: 1200 }, { month: "Aug", users: 1800 }, + { month: "Sep", users: 2400 }, { month: "Oct", users: 3100 }, + { month: "Nov", users: 3900 }, { month: "Dec", users: 4800 }, +]; + +const funnel = [ + { label: "Visitors", value: 12450, pct: 100 }, + { label: "Signups", value: 3200, pct: 25.7 }, + { label: "Trials", value: 1840, pct: 14.8 }, + { label: "Paid", value: 920, pct: 7.4 }, +]; + +const engagement = [ + { label: "DAU", value: "1,247" }, + { label: "WAU", value: "4,832" }, + { label: "MAU", value: "12,450" }, + { label: "Avg Session", value: "4m 32s" }, +]; + +const topPages = [ + { page: "Dashboard", views: 8420, unique: 3210, bounce: "24%" }, + { page: "Analytics", views: 5340, unique: 2180, bounce: "31%" }, + { page: "Settings", views: 3120, unique: 1540, bounce: "18%" }, + { page: "API Docs", views: 2890, unique: 1320, bounce: "42%" }, + { page: "Billing", views: 2140, unique: 980, bounce: "15%" }, +]; + +export default function AnalyticsPage() { + return ( +
+ +
+ +
+ {/* User Growth Chart */} + + + User Growth + + +
+ + + + + + + + + +
+
+
+ + {/* Conversion Funnel */} + + + Conversion Funnel + + + {funnel.map((step) => ( +
+
+ {step.label} + {step.value.toLocaleString()} ({step.pct}%) +
+
+
+
+
+ ))} + + + + {/* Engagement Grid */} +
+ {engagement.map((e) => ( + + +

{e.label}

+

{e.value}

+
+
+ ))} +
+ + {/* Top Pages Table */} + + + Top Pages + + +
+ + + + + + + + + + + {topPages.map((p) => ( + + + + + + + ))} + +
PageViewsUnique VisitorsBounce Rate
{p.page}{p.views.toLocaleString()}{p.unique.toLocaleString()}{p.bounce}
+
+
+
+
+
+
+ ); +}