Soenneker.Blazor.ApplicationInsights 4.0.1903

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Blazor.ApplicationInsights --version 4.0.1903
                    
NuGet\Install-Package Soenneker.Blazor.ApplicationInsights -Version 4.0.1903
                    
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.ApplicationInsights" Version="4.0.1903" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.ApplicationInsights" Version="4.0.1903" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.ApplicationInsights" />
                    
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.ApplicationInsights --version 4.0.1903
                    
#r "nuget: Soenneker.Blazor.ApplicationInsights, 4.0.1903"
                    
#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.ApplicationInsights@4.0.1903
                    
#: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.ApplicationInsights&version=4.0.1903
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.ApplicationInsights&version=4.0.1903
                    
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.ApplicationInsights

Blazor JavaScript interop for loading Azure Application Insights in the browser and starting client-side telemetry.

Installation

dotnet add package Soenneker.Blazor.ApplicationInsights

Registration

using Soenneker.Blazor.ApplicationInsights.Registrars;

builder.Services.AddApplicationInsightsInteropAsScoped();

Initialize after the first render

JavaScript interop is required, so initialize from OnAfterRenderAsync rather than during component initialization:

@using Soenneker.Blazor.ApplicationInsights.Abstract
@inject IApplicationInsightsInterop ApplicationInsights
@inject IConfiguration Configuration

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

        await ApplicationInsights.Init(
            Configuration["ApplicationInsights:ConnectionString"]!);
    }
}

Call Init once per application session. The interop begins tracking page load, browser exceptions, and fetch dependencies.

The browser downloads the Application Insights SDK from https://js.monitor.azure.com. If the application uses a Content Security Policy, allow that script origin and the ingestion endpoint named by the connection string. Telemetry is sent from the user's browser, so review captured URLs, headers, and exception data before enabling it in production.

The scoped service owns its imported JavaScript module and releases it when the scope is disposed.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
4.0.1923 174 10/15/2026
4.0.1922 57 10/15/2026
4.0.1921 54 10/14/2026
4.0.1920 60 10/14/2026
4.0.1918 54 10/14/2026
4.0.1917 63 10/14/2026
4.0.1916 60 10/14/2026
4.0.1915 56 10/14/2026
4.0.1909 54 10/13/2026
4.0.1908 90 10/12/2026
4.0.1906 83 10/12/2026
4.0.1905 81 10/12/2026
4.0.1904 93 10/12/2026
4.0.1903 90 10/11/2026
4.0.1902 99 10/11/2026
4.0.1901 101 10/11/2026
4.0.1900 227 10/3/2026
4.0.1899 97 10/3/2026
4.0.1898 183 9/29/2026
4.0.1897 91 9/29/2026
Loading failed

Update dependency Soenneker.Blazor.Utils.ModuleImport to 4.0.1911 (#2576)