\n %sveltekit.head%\n \n \n
%sveltekit.body%
\n \n"}]}
FRAMEWORK INTEGRATION GUIDE

How to Install Analytics on SvelteKit & Svelte

Fast, lightweight analytics for SvelteKit and Svelte applications with automatic client routing.

Quick Setup: SvelteKit & Svelte
By Sufyaan Studio ResearchVerified August 2026

In SvelteKit, add the script tag to src/app.html inside the <head> element to track all SvelteKit routes.

KEY TAKEAWAYS
  • 1.15 KB featherlight tracker preserves SvelteKit & Svelte speed
  • Zero cookie consent banners required
  • Automatic SPA client route change detection
  • Full support for custom conversion event tracking
PREREQUISITES
  • SvelteKit project
  • Website UUID
STEP-BY-STEP IMPLEMENTATION

Installation Instructions

1

Edit src/app.html

Add the defer script tag into your root HTML template.

SVELTEKIT & SVELTE SNIPPET (STEP 1)
<!-- src/app.html --> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <script defer src="https://analytics.sufyaanstudio.com/t.js" data-web="YOUR_WEBSITE_ID" ></script> %sveltekit.head% </head> <body data-sveltekit-preload-data="hover"> <div style="display: contents">%sveltekit.body%</div> </body> </html>
FAQ & VERIFICATION

FAQ: SvelteKit & Svelte Analytics Integration

Ready to track SvelteKit & Svelte traffic with speed?

Create your account in 30 seconds and start tracking for $0.

analytics