Install with the CLI
Manual setup
Expose the key via runtimeConfig (manual)
nuxt.config.ts:NUXT_PUBLIC_LUCENT_PUBLIC_KEY from your environment and
overrides the empty default at runtime. You don’t need to hardcode
the key here.Notes
- Files ending in
.client.tsinsideplugins/only run in the browser, which is exactly what you want for a session recorder. - The
.clientplugin auto‑loads — you don’t need to register it anywhere. - Access the tracker from any component with
const { $lucent } = useNuxtApp().