Area · gradient
The default trend. Color comes from --chart-1 on this page.
<AreaChart variant="gradient" />One query model. Five connectors. Widgets that render Vercel today and Plausible tomorrow — without rewriting the page.
Pick a connector
Visitors · same widget
createVercelConnector()No series data.
One constructor changes. The widget, the query and the markup do not. Vercel cannot answer bounceRate, avgDuration, viewsPerVisit, events, so those widgets sit out.
Visitors, pages, referrers, devices. The dashboard asks for metrics — not vendor field names.
Vercel has no bounce rate. The widget knows, and sits out, instead of lying or throwing.
Connectors map Vercel, Plausible, GA4, Umami and PostHog onto the same metrics and dimensions. One constructor changes; the UI does not.
The Next handler (or any Fetch route) holds the token. The browser talks to your endpoint.
Charts read --chart-1…--chart-5 from your CSS, so they inherit your palette.
Every chart has visual variants — the drawing, not a color theme. Colors inherit from your CSS. See every component and its config.
The default trend. Color comes from --chart-1 on this page.
<AreaChart variant="gradient" />Share of a dimension. Same query, a different drawing.
Total 4,369
<PieChart variant="donut" />Add the catalog from this site's /r folder, or educlopez/analytics-kit/dashboard from the repo. Runtime still comes from npm so connectors and queries stay canonical.
pnpm dlx shadcn@latest add /r/dashboard.jsonThe query model is the contract, so the widgets keep rendering whichever provider is behind them.
Keep tokens on the server in production. Swap the import for Plausible or GA4.
import { AnalyticsProvider, Dashboard } from "@analytics-kit/react";
import { createHttpConnector } from "@analytics-kit/core";
const connector = createHttpConnector({ endpoint: "/api/analytics" });
export function Stats() {
return (
<AnalyticsProvider connector={connector}>
<Dashboard />
</AnalyticsProvider>
);
}pnpm add @analytics-kit/react @analytics-kit/core @analytics-kit/next @analytics-kit/connector-vercelConnectors declare capabilities, so the widgets keep working when you move.
Read the docs