Add analytics to a Netlify site Netlify.
smolanalytics is open-source web analytics you can add to any Netlify site without touching your build. Netlify has a native Snippet injection field that pastes markup before </head> on every page, so the two smolanalytics script tags go straight there. It autocaptures pageviews, clicks, scroll and JS errors with zero code.
<!-- Netlify: Site configuration > Snippet injection > Insert before </head> -->
<script src="https://YOUR-INSTANCE/sdk.js"></script>
<script>smolanalytics.init("WRITE_KEY", { host: "https://YOUR-INSTANCE" })</script>Snippet injection applies site-wide with no redeploy. If you'd rather commit it, drop the same two tags in your framework's root layout or index.html head.
how do I add analytics to netlify?
smolanalytics is open-source web analytics you can add to any Netlify site without touching your build. Netlify has a native Snippet injection field that pastes markup before </head> on every page, so the two smolanalytics script tags go straight there. It autocaptures pageviews, clicks, scroll and JS errors with zero code.
Netlify's Snippet injection is the cleanest path here: it's a real built-in field that injects your markup before </head> on every response, so you get smolanalytics live across the whole site without a rebuild or a code change. That's useful when the site is a static export or built by someone else and you just want tracking on fast.
Once it's in, autocapture covers pageviews, clicks with element chains, rage and dead clicks, and form submits. It's cookieless so no consent banner, and the whole thing is a single open-source Go binary you can self-host free or run hosted from $29/mo. Ask "top pages and where people rage-click" from the dashboard or your editor over MCP.
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 Netlify tonight.
One snippet, or one endpoint. Tomorrow morning the verdict tells you which part of the funnel to fix.