
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
nuxt-module-hotjar
Advanced tools
Easily add Hotjar for tracking and analytics to your Nuxt application.
npx nuxi@latest module add hotjar
Add nuxt-module-hotjar
to the modules
section of nuxt.config.ts
and provide your Hotjar site id and the script version.
In order for Nuxt Hotjar to run, it needs to be initialized with your site ID (this is the hotjarId
in our module). You can find your site ID on this page just before your site name.
export default defineNuxtConfig({
modules: [
'nuxt-module-hotjar'
],
hotjar: {
hotjarId: 1234567,
scriptVersion: 6,
// optionally you can turn on debug mode for development
debug: true
}
})
Now you have to initialize Hotjar in your app with the composable useHotjar
:
// In you app.vue file for example when you user has given consent:
const { initialize } = useHotjar()
function onConsent() {
initialize()
}
useHotjar
The SSR-safe useHotjar
composable provides access to:
You can use it like this:
const { initialize } = useHotjar()
function useHotjar(): {
initialize: () => void
}
Option | Type | Default | Description |
---|---|---|---|
hotjarId | number | undefined | Your Hotjar site_id . |
scriptVersion | number | 6 | By default it's 6, you don’t necessarily need to change it. |
debug | boolean | false | Debug mode |
# 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
FAQs
Add HotJar to your Nuxt.js application
We found that nuxt-module-hotjar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.