- include
<Matomo />
in your+layout.svelte
. - configure it like so:
or by defining environment variables:
<Matomo url="https://matomo.mysite.com" siteId={13} />
see https://kit.svelte.dev/docs/modules#$env-dynamic-public for more information.PUBLIC_MATOMO_URL="https://matomo.mysite.com" PUBLIC_MATOMO_SITE_ID=13
- optional: track custom events like so:
<script lang="ts"> import { tracker } from "@sinnwerkstatt/sveltekit-matomo" function onSomeEvent() { if ($tracker) $tracker.trackEvent("my-cateogry", "my-action", "my-name") } </script>
-
Notifications
You must be signed in to change notification settings - Fork 0
License
sinnwerkstatt/sveltekit-matomo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published