Documentation
SvelteKit installation guide
Install the local browser package. Merge this into src/routes/+layout.svelte without removing its existing children or slot markup:
<script>
import { onMount } from 'svelte';
import { init } from 'analyticfast';
onMount(() => {
init({ siteId: 'YOUR_SITE_ID', host: 'https://YOUR_ANALYTICS_HOST' });
});
</script>
Initialize once, after required consent. onMount only runs in the browser; do not put initialization in a server load function. The tracker detects SPA navigation itself. Use package track for goals and forward attribution IDs to checkout through a validated server action.
Official reference, checked 2026-10-26: Svelte lifecycle hooks.
Questions, answered.
How do I use sveltekit installation with AnalyticFast?
Follow the SvelteKit installation instructions on this page using your own website’s Site ID and configuration. Verify a real event before relying on the reports.
Where can I get setup help?
Contact support@analyticfast.com with the website domain and a redacted description. Do not send API tokens, signing secrets or personal customer data.