SvelteKit

SvelteKit has a single src/app.html that acts as the HTML shell for every page. Paste the snippet inside the <head> there:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    %sveltekit.head%

    <script defer src="https://api.snowanalytics.app/sa.js" data-site="YOUR_SITE_ID"></script>
  </head>
  <body data-sveltekit-preload-data="hover">
    <div style="display: contents">%sveltekit.body%</div>
  </body>
</html>

Keep the %sveltekit.head% placeholder. SvelteKit uses it to inject page-specific <head> content.

SPA route tracking

No extra configuration needed. Snow hooks the browser History API, so SvelteKit's client-side navigation is tracked automatically. See Single-page apps.

Verify

Open your site in a browser, then check the Live view in the Snow dashboard. See Troubleshooting if nothing appears.

On this page