Add analytics to a Vercel app Vercel.
smolanalytics is open-source analytics for any site you ship on Vercel. Vercel hosts your framework, so the two script tags go in that framework's root layout or head, Next.js app/layout.tsx, a plain index.html, whatever you deploy. It autocaptures pageviews, clicks, engagement and errors, and you own the raw data.
// Next.js on Vercel: app/layout.tsx, inside <head>
<script src="https://YOUR-INSTANCE/sdk.js"></script>
<script dangerouslySetInnerHTML={{ __html:
'smolanalytics.init("WRITE_KEY", { host: "https://YOUR-INSTANCE" })'
}} />Vercel has no injection point of its own, the snippet lives in your framework's root head. For a static index.html deploy, just paste the two plain tags.
how do I add analytics to vercel?
smolanalytics is open-source analytics for any site you ship on Vercel. Vercel hosts your framework, so the two script tags go in that framework's root layout or head, Next.js app/layout.tsx, a plain index.html, whatever you deploy. It autocaptures pageviews, clicks, engagement and errors, and you own the raw data.
Vercel is a host, not a framework, so there's no Vercel-specific SDK to add. You put the smolanalytics script tags wherever your framework renders its <head>: app/layout.tsx or pages/_document.tsx for Next.js, index.html for a Vite or static deploy. Once they load, autocapture handles pageviews and clicks across every route with no per-page setup.
The reason to run it on Vercel specifically: you keep the data in your own instance instead of a black box, and answers are computed deterministic reports with a CI test proving they can't be hallucinated. Self-host the single Go binary free, or use hosted from $29/mo. For SPA route changes, smolanalytics tracks client navigations automatically, so Next.js app-router transitions still register as pageviews.
Honest pricing: 14-day full trial, no credit card. Then Solo $29/mo, never metered on seats or sites. Overage is $5/million with an emailed receipt, the dashboard never locks, and self-hosting the single Go binary is free forever (MIT).
Add analytics to Vercel tonight.
One snippet, or one endpoint. Tomorrow morning the verdict tells you which part of the funnel to fix.