Package Exports
- react-microsoft-clarity
- react-microsoft-clarity/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-microsoft-clarity) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-microsoft-clarity
Small component to implement Microsoft Clarity into your React Application
Installation
npm install react-microsoft-clarity --save
Use / Example
import { clarity } from 'react-microsoft-clarity';
clarity.initialize(id);
// Identify the user
clarity.identify('USER_ID', { userProperty: 'value' });
// Upgrade Session
clarity.upgrade('Upgrade_Reason');
// Check if Hotjar has been initialized before calling its methods
if (clarity.initialized()) {
clarity.identify('USER_ID', { userProperty: 'value' });
}
- id: Stands for 'Clarity ID' - Your site's ID. This is the ID which tells Clarity which site settings it should load and where it should save the data collected.
You can learn more from Clarity Docs