Installation
Add the snippet to yourindex.html:
index.html
Calling identify — Composition API
Create a composable that callsidentify() when the user is available:
composables/useZenstep.ts
App.vue:
App.vue
Calling identify — Options API
App.vue
Nuxt 3
In Nuxt 3, use a plugin to load the snippet and a composable for identify. Add the script viauseHead in a plugin:
plugins/zenstep.client.ts
nuxt.config.ts:
nuxt.config.ts
useAuth watcher in your app’s authenticated layout.
TypeScript types
types/global.d.ts