Vue / Browser — Initialization
Use @signal-js/browser with Vue, Vanilla JS, Svelte, Angular, or any JavaScript framework. Install the package, create a Signal instance withcreateSignal(), and call await signal.start() when your app is ready.
Installation
Vue setup
Initialize Signal in your Vue app (e.g. inonMounted or a composable). Create one instance and call start() once.
signal.capture(), signal.identify(), etc. in methods or composables.
Vanilla JS
Same API in plain HTML/JS or with a bundler:Other frameworks
- Svelte — Call
createSignal()inonMountor at module scope; pass the instance where needed. - Angular — Create the client in a service or
APP_INITIALIZERand inject it where you track events. - Any other framework — One
createSignal(options)call, thenawait signal.start(). Usesignal.capture(),signal.identify(), and the rest of the API as needed.
Next steps
- Capture — Track events
- Identify — Identify users
- Configuration — All options
