Add Vident to SvelteKit
Set up error tracking, session replay, and Web Vitals in SvelteKit applications with automatic route tracking.
Features
- SvelteKit hooks integration
- Automatic route change tracking
- Session replay and error capture
- Core Web Vitals from real users
Setup
Install
npm install vident-browsersrc/routes/+layout.svelte
<script lang="ts">
import { onMount } from 'svelte';
import { createVidentBrowser } from 'vident-browser';
import { page } from '$app/stores';
import { trackPageView } from 'vident-browser';
onMount(() => {
createVidentBrowser({
apiKey: import.meta.env.VITE_VIDENT_API_KEY,
});
});
$: if ($page) {
trackPageView({ path: $page.url.pathname });
}
</script>
<slot />Other Frameworks
Start catching errors in minutes
Create your free account and add Vident to your app. Two lines of code, no credit card.
Get started free