@betterumami/svelte
v0.2.0
Published
Svelte / SvelteKit bindings for BetterUmami analytics.
Readme
@betterumami/svelte
Svelte / SvelteKit bindings for BetterUmami analytics.
Install
npm install @betterumami/svelteUsage
// SvelteKit: root +layout.svelte onMount, or your Svelte app entry
import { initBetterUmami, trackEvent } from '@betterumami/svelte';
initBetterUmami({ websiteId: '...', hostUrl: 'https://analytics.example.com' });
trackEvent('signup-button', { plan: 'pro' });SvelteKit navigations use history.pushState, which core hooks automatically — pageviews fire on every client-side navigation with no afterNavigate wiring needed. Peer dependency: svelte >= 4.
See the root README for all config options.
