Skip to main content

Installation

Add the snippet to your index.html:
index.html

Calling identify — Composition API

Create a composable that calls identify() when the user is available:
composables/useZenstep.ts
Use it in your root 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 via useHead in a plugin:
plugins/zenstep.client.ts
Add to nuxt.config.ts:
nuxt.config.ts
For identify, call it inside a useAuth watcher in your app’s authenticated layout.

TypeScript types

types/global.d.ts

SPA navigation

Vue Router navigation is automatically detected by Zenstep. When the route changes, flows are re-evaluated against the new URL. No additional setup required.