📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

nextjs-hotjar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-hotjar

**Hotjar for Next.js**

1.2.0
latest
Source
npm
Version published
Weekly downloads
134
28.85%
Maintainers
1
Weekly downloads
 
Created
Source

nextjs-hotjar

Hotjar for Next.js

This package optimizes script loading using Next.js Script tag, which means that it will only work on apps using Next.js >= 11.0.0.

Installation

pnpm install nextjs-hotjar

Instructions

Add the Hotjar component to your custom App file:

// pages/_app.js
import { Hotjar } from "nextjs-hotjar";

const App = ({ Component, pageProps }) => {
	return (
		<>
			<Hotjar id={YOUR_APP_ID} sv={YOUR_APP_SCRIPT_VERSION} />
			<Component {...pageProps} />
		</>
	);
};

export default App;

Props

NameTypeRequiredDescription
idstringYesYour Hotjar app ID.
svstringYesYour Hotjar app script version.
strategy'beforeInteractive', 'afterInteractive', 'lazyOnload'NoScript strategy oprions provided by Nextjs Script package. We excluded the 'worker ' strategy since is not compatibile with Hotkar loading system

FAQs

Package last updated on 14 Apr 2023

Did you know?

Socket

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.

Install

Related posts