Soenneker.Blazor.Clarity 11.0.2354

Prefix Reserved
dotnet add package Soenneker.Blazor.Clarity --version 11.0.2354
                    
NuGet\Install-Package Soenneker.Blazor.Clarity -Version 11.0.2354
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.Clarity" Version="11.0.2354" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Clarity" Version="11.0.2354" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.Clarity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.Clarity --version 11.0.2354
                    
#r "nuget: Soenneker.Blazor.Clarity, 11.0.2354"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Blazor.Clarity@11.0.2354
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blazor.Clarity&version=11.0.2354
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.Clarity&version=11.0.2354
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blazor.Clarity

Scoped Blazor JavaScript interop for Microsoft Clarity initialization, Consent V2, identification, tags, and custom events.

Installation and registration

dotnet add package Soenneker.Blazor.Clarity
using Soenneker.Blazor.Clarity.Registrars;

builder.Services.AddClarityInteropAsScoped();

Initialize after the first render, then immediately send the visitor's stored consent choices. Calls are queued by Clarity while its remote script loads.

@using Soenneker.Blazor.Clarity.Abstract
@inject IClarityInterop Clarity
@inject IConfiguration Configuration

@code {
    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (!firstRender)
            return;

        await Clarity.Init(Configuration["Clarity:ProjectId"]!);
        await Clarity.Consent(
            adStorage: marketingConsent,
            analyticsStorage: analyticsConsent);
    }
}

Call Consent again whenever either choice changes. Passing false denies the corresponding storage category and asks Clarity to clear applicable cookies. The wrapper requires Init before every other operation and prevents the same scoped instance from switching project IDs.

Identify, tag, and track

await Clarity.Identify(
    id: pseudonymousUserId,
    sessionId: sessionId,
    pageId: routeId,
    friendlyName: accountDisplayName);

await Clarity.SetTag("subscription", "business");
await Clarity.SetTag("experiments", new[] { "checkout-a", "nav-b" });
await Clarity.TrackEvent("checkout_completed");

Tag values must be a string or string array. Avoid sending email addresses, names, raw account IDs, or other directly identifying data as Clarity IDs, tags, event names, or friendly names; use pseudonymous values approved by your privacy policy.

The browser loads Clarity from https://www.clarity.ms. Configure Content Security Policy and consent gating for that origin before enabling the integration. Disposing the scoped interop releases the package's JavaScript module, but it does not unload a Clarity tracker already installed on the page.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.2354 172 11/19/2026
11.0.2353 93 11/19/2026
11.0.2352 85 11/19/2026
11.0.2351 92 11/19/2026
11.0.2349 92 11/18/2026
11.0.2348 92 11/18/2026
11.0.2347 93 11/18/2026
11.0.2342 98 11/18/2026
11.0.2341 126 11/16/2026
11.0.2340 118 11/16/2026
11.0.2339 96 11/15/2026
11.0.2338 95 11/15/2026
11.0.2337 96 11/15/2026
11.0.2336 100 11/15/2026
11.0.2335 101 11/15/2026
11.0.2334 108 11/14/2026
11.0.2333 171 11/12/2026
11.0.2332 100 11/11/2026
11.0.2331 99 11/11/2026
11.0.2330 105 11/11/2026
Loading failed

Updated Soenneker.Gen.Web.Minifier to 11.0.86