1.2.0 • Published 2 years ago

nextjs-hotjar v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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
1.2.0

2 years ago

1.1.0

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago