Skip to content
pubscout

clarity_web

1.1.0, released 6 months ago by rodmoraes.com.br

Integrates Microsoft Clarity Analytics into Flutter Web applications for session recording.

WASM-ready
$ flutter pub add clarity_web
Source repository

What it does

Allows Flutter Web applications to integrate Microsoft Clarity Analytics. It includes a canvas capture workaround to visualize Flutter canvas content in recordings and provides masking widgets to hide sensitive data.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to use Microsoft Clarity analytics and session recordings in a Flutter Web app.
  • You want to hide sensitive user data from session recordings using mask widgets.

Skip it when

  • Your application is targeted entirely at native mobile or desktop platforms without web support.
  • You prefer a different analytics platform like Sentry.

Strengths

  • Provides an optimized canvas capture workaround for Flutter Web canvas elements.
  • Includes `ClarityMask` and `ClarityUnmask` widgets for privacy compliance.
  • Offers FPS and image quality controls.

Weaknesses

  • Canvas capture relies on a workaround since direct Flutter Web canvas recording is not supported natively.
  • Mandatory configuration required (`setIsCanvasMirrorActive(true)`) for visual recordings to work.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Requires getting a Project ID from Microsoft Clarity and calling initialization methods in code.

import 'package:clarity_web/clarity_web.dart';

final clarityService = ClarityWeb.instance;
await clarityService.initClarityWeb('your-project-id');
clarityService.setIsCanvasMirrorActive(true);

Alternatives

Packages that do the same job and could replace clarity_web.

  • sentry

    If you want comprehensive error tracking and performance monitoring rather than visual session recordings.

  • sentry_flutter

    If you need an established Flutter-focused monitoring and error reporting tool.

Works with

Packages commonly used together with clarity_web: ones it builds on, ones built on it, and its own family.