How to have hotjar in react-hotjar 1

How to have hotjar in react-hotjar

import { hotjar } from 'react-hotjar';

hotjar.initialize(hjid, hjsv);

hotjar.identify('USER_ID', { userProperty: 'value' });

Here is what the above code is Doing:
1. Importing the hotjar module from react-hotjar
2. Initializing the hotjar script with your hotjar ID and hotjar snippet version
3. Identifying the user with a unique ID and any additional properties you want to track

You can find your hotjar ID and snippet version in the hotjar dashboard.

Once you’ve added the above code to your app, you can start tracking user behavior.

## Tracking user behavior

To track user behavior, you’ll need to add the following code to your app:

Similar Posts