Soenneker.Blazor.Google.Analytics A Blazor interop library for Google Analytics Installation dotnet add package Soenneker.Blazor.Google.Analytics Usage Register the interop within DI (Program.cs) public static async Task Main(string[] args) { ... builder.Services.AddGoogleAnalyticsInterop(); } Inject IClarityInterop within your App.Razor file @using Soenneker.Blazor.Google.Analytics.Abstract @inject IGoogleAnalyticsInterop GoogleAnalyticsInterop Initialize the interop in OnInitializedAsync within App.Razor using your Google Analytics tag id protected override async Task OnInitializedAsync() { await GoogleAnalyticsInterop.Init("your-key-here"); ... }