Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-microsoft-clarity

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-microsoft-clarity

A simple small component to implement Microsoft Clarity into your React Application

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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';

// Start seeing data on the Clarity dashboard with your id
clarity.init(id);

// Identify the user
clarity.identify('USER_ID', { userProperty: 'value' });

// Cookie consent
clarity.consent();

// Stop tracking user behavior analytics
clarity.stop();

// Restart tracking user behavior analytics
clarity.start();

// Setup a custom tag
clarity.setTag('key', 'value');

// Setup a smart event
clarity.setEvent("eventName");

// Upgrade session
clarity.upgrade('upgradeReason');

// Check if Clarity has been initialized before calling its methods
if (clarity.hasStarted()) {
  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

Keywords

FAQs

Package last updated on 09 Dec 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc