Install on SvelteKit

Add OpenWebTrack to SvelteKit

Add once in the root layout. SvelteKit navigation is tracked automatically.

1

A SvelteKit app has one HTML shell; the snippet goes into its <head> via src/app.html.

src/app.html
<head>
  %sveltekit.head%
  <script
    defer
    src="https://cloud.openwebtrack.one/script.js"
    data-website-id="YOUR_WEBSITE_ID"
    data-domain="yourdomain.com"
  ></script>
</head>

Alternative via src/routes/+layout.svelte using <svelte:head> also works. For cookieless use script.cookieless.js. For self-hosted replace cloud.openwebtrack.one with your ORIGIN.

2

SvelteKit navigation is tracked automatically as pageviews. The tracker hooks history.pushState so no per-route code is needed.

3

Deploy and open the site at the address you gave the dashboard. The realtime view shows the visit within seconds; if nothing appears, check that data-domain matches and that an ad blocker is not blocking the request.