Nuxt Hotjar
Features
Quick Setup
- Add
nuxt-module-hotjar
dependency to your project
# Using pnpm
pnpm add -D nuxt-module-hotjar
# Using yarn
yarn add --dev nuxt-module-hotjar
# Using npm
npm install --save-dev nuxt-module-hotjar
- Add
nuxt-module-hotjar
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'nuxt-module-hotjar'
],
// And add your hotjar site id and the script version
hotjar: {
hotjarId: 1234567,
scriptVersion: 6,
// optionally you can turn on debug mode for development
debug: true
}
})
That's it! You can now use Hotjar in your Nuxt app ✨
Development
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release