Clarity: Open-source behavioral analytics library
TypeScript library for session replay and behavioral analytics.
Learn more about clarity
Clarity is a TypeScript library for capturing and analyzing user behavioral data through session replay and interaction tracking. It instruments web applications by hooking into the DOM to record user actions, page mutations, and navigation events, then serializes this data for transmission to analytics endpoints. The library implements configurable privacy controls through CSS selector-based masking rules that redact sensitive content before data collection occurs. Session data can be enriched with custom metadata and tagged events to enable segmentation and filtering during analysis. The tracking system offers granular control over which interaction types are captured, allowing developers to balance analytical depth with client-side performance overhead.
Privacy-First Data Capture
Automatically masks sensitive content client-side before transmission to servers. Configurable rules let you control exactly what gets collected, ensuring compliance without manual data scrubbing.
Modular Package Architecture
Separates instrumentation, decoding, visualization, and dev tools into independent packages. Deploy only what you need and integrate each component separately into existing workflows.
DOM Mutation Tracking
Captures layout changes and DOM mutations instead of just events, enabling pixel-perfect session replay. Reconstructs exactly how pages rendered during user sessions without screenshots or video encoding.
import { clarity } from 'clarity-js';
// Start recording user session
clarity.start({
projectId: 'your-project-id',
upload: 'https://www.clarity.ms/collect',
track: true,
content: true
});Release notes do not specify changes, breaking updates, or fixes for this patch version.
- –Review commit history or changelog separately to identify actual changes before upgrading.
- –Assume patch-level stability unless project documentation indicates otherwise for v5.4.1.
Patch release fixes datagrid filtering bugs, combo box pill styling, accordion CSS variables, and core accessibility issues.
- –Apply this patch to resolve datagrid filtering defects and combo box pill design inconsistencies.
- –Review accordion CSS variable usage if customized; accessibility improvements may affect screen reader behavior.
Patch release fixing a datagrid filtering defect; no breaking changes or new requirements specified.
- –Apply this release to resolve datagrid filtering issues if you use Clarity datagrids in production.
- –Release notes do not specify the nature of the filtering bug or affected versions; review commit history for details.
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
redux-toolkit
Opinionated Redux utilities with simplified setup and Immer integration.
pybind11
Header-only library creating minimal-boilerplate C++ Python bindings.
winget-cli
Multi-interface Windows package manager for Store and community repositories.
plotly.py
Interactive browser-based charts from Python with declarative API.
fastfetch
High-performance CLI system information display written in C.