Soenneker.Maui.Firebase.Analytics 4.0.285

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

Soenneker.Maui.Firebase.Analytics

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

Provides a small Android and iOS abstraction for logging Firebase Analytics events and setting user attributes from a .NET MAUI app.

Installation

dotnet add package Soenneker.Maui.Firebase.Analytics

Configure the native Firebase app first with Soenneker.Maui.Firebase, including the platform's google-services.json or GoogleService-Info.plist.

Registration

Register the analytics service in MauiProgram.CreateMauiApp:

using Soenneker.Maui.Firebase.Analytics.Registrars;
using Soenneker.Maui.Firebase.Dtos;
using Soenneker.Maui.Firebase.Registrars;

builder.UseFirebase(new FirebaseConfig())
       .Build();

builder.Services.AddFirebaseAnalyticsServiceAsSingleton();

The service is registered only for Android and iOS targets.

Usage

Inject IFirebaseAnalyticsService into a page, view model, or application service:

using Soenneker.Maui.Firebase.Analytics.Abstract;

public sealed class CheckoutTracker(IFirebaseAnalyticsService analytics)
{
    public void Completed(string orderType)
    {
        analytics.LogEvent("checkout_completed", new Dictionary<string, string>
        {
            ["order_type"] = orderType
        });
    }

    public void IdentifySignedInUser(string internalUserId)
    {
        analytics.SetUserId(internalUserId);
        analytics.SetUserProperty("account_tier", "pro");
    }
}

Event parameters in this abstraction are string values. Event names, parameter names, and user-property names must satisfy Firebase Analytics naming and quota rules; invalid data is handled by the native SDK.

Use an opaque application identifier for SetUserId. Do not send names, email addresses, or other personally identifiable information, and obtain any consent required by the app's privacy policy before collecting analytics.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  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.287 0 9/2/2026
4.0.286 56 9/1/2026
4.0.285 42 9/1/2026
4.0.284 93 8/30/2026
4.0.283 76 8/30/2026
4.0.282 82 8/30/2026
4.0.281 78 8/29/2026
4.0.280 72 8/29/2026
4.0.279 86 8/29/2026
4.0.278 81 8/26/2026
4.0.277 91 8/25/2026
4.0.276 88 8/21/2026
4.0.275 84 8/20/2026
4.0.274 107 7/29/2026
4.0.273 107 7/29/2026
4.0.272 99 7/28/2026
4.0.271 93 7/28/2026
4.0.270 95 7/27/2026
4.0.269 89 7/27/2026
4.0.268 97 7/27/2026
Loading failed

Update dependency Xamarin.AndroidX.Fragment.Ktx to 1.9.0 (#802)