Integrations SvelteKit

Cookie-Free Analytics for SvelteKit

SvelteKit is built for performance. GhostlyX matches that philosophy: a sub-1.5 kB tracking script that adds negligible load time and requires no cookie consent.

Get started free Free plan available · Setup in 5 minutes

Installation guide

1

Add the script to your root layout

Open src/routes/+layout.svelte and add the GhostlyX script in the svelte:head block. SvelteKit will include this on every page.

Code
<svelte:head>
    <script defer src="https://cdn.ghostlyx.com/gx.js" data-site-id="YOUR_SITE_ID"><\/script>
</svelte:head>
2

Verify navigation tracking

GhostlyX detects SvelteKit navigation events automatically. Navigate between routes in your app and check that each page view appears in your GhostlyX dashboard.

Why SvelteKit users choose GhostlyX

SvelteKit developers prioritise performance and bundle size. GhostlyX is one of the lightest analytics options available and adds no blocking render path. Because SvelteKit often powers sites that target technical or privacy-conscious users, cookie-free analytics is a natural fit. The script respects the Do Not Track browser setting.

Cookie-free tracking

No consent banner required under GDPR or PECR

Under 1.5 kB script

Negligible impact on page speed and Core Web Vitals

Real-time dashboard

See visitors as they arrive, updated every few seconds

Free plan available

Start tracking without a credit card

Replacing Google Analytics on SvelteKit?

See how GhostlyX compares feature by feature, including script size, GDPR compliance, and pricing.

GhostlyX vs Google Analytics

Ready to add GhostlyX to SvelteKit?

Free plan available. Setup takes 5 minutes. No cookie consent banner required.

Get started free