Palmalytics 1.0.1
dotnet add package Palmalytics --version 1.0.1
NuGet\Install-Package Palmalytics -Version 1.0.1
<PackageReference Include="Palmalytics" Version="1.0.1" />
<PackageVersion Include="Palmalytics" Version="1.0.1" />
<PackageReference Include="Palmalytics" />
paket add Palmalytics --version 1.0.1
#r "nuget: Palmalytics, 1.0.1"
#:package Palmalytics@1.0.1
#addin nuget:?package=Palmalytics&version=1.0.1
#tool nuget:?package=Palmalytics&version=1.0.1
Palmalytics
Palmalytics is a self-hosted, first-party, server-side web analytics dashboard for ASP.NET Core applications. It can replace standard client-side web analytics tools like Google Analytics and Matomo. It tracks pageviews, sessions, referrals, locations, user agents, and more.
Why Server-Side Analytics?
Unlike client-side analytics, server-side analytics offers the following advantages:
- High Performance: Minimal impact on the server side as data is saved asynchronously, and zero impact on the client side.
- User-Friendly: No cookies, no annoying consent popups.
- Accuracy: Not blocked by adblockers and privacy-focused browsers and extensions.
- Data Ownership: You own your data, and it doesn’t leave your server.
The data can be stored in the same database your application already uses (e.g. SQL Server), which means you can also easily query it if you'd like.
Getting Started
Add the storage-specific NuGet package from the Package Manager Console:
PM> Install-Package Palmalytics.SqlServerRegister services in your
Startup.csand configure the SQL Server storage:public void ConfigureServices(IServiceCollection services) { services.AddPalmalytics(options => { options.UseSqlServer(new SqlServerOptions { ConnectionString = Configuration.GetConnectionString("PalmalyticsConnection"), Schema = "Palmalytics" }); }); // ...other services }Register the middleware:
public void Configure(IApplicationBuilder app) { app.UsePalmalytics(); // ...other middleware }Navigate to
https://<your-app>/palmalyticsto see your dashboard.
<img src="Assets/Screenshot.webp" alt="Screenshot of the Palmalytics dashboard" />
Dashboard Authorization
By default, the dashboard is only accessible by local requests. In production, you will probably want to change this. Here are some options:
Public access
If you want to allow public access to your dashboard, just remove the default authorization rule:
services.AddPalmalytics(options =>
{
options.DashboardOptions.Authorize = null;
// ... other options
}
Restricted access
You can implement your own authorization rule, for example based on ASP.NET user roles:
services.AddPalmalytics(options =>
{
options.DashboardOptions.Authorize = (context) =>
{
return context.User.IsInRole("Admin");
};
// ... other options
}
Getting the user's IP address
Palmalytics uses the client IP address for geolocation (country) and for the IgnoreIPAddresses filter. By default, it uses the IP address of the connection (HttpContext.Connection.RemoteIpAddress).
If your application runs behind a reverse proxy, a load balancer, or a CDN (e.g. Cloudflare), the connection IP will be the proxy's, not the visitor's. The real client IP is then usually passed in a forwarding header such as X-Forwarded-For or CF-Connecting-IP.
If you trust those headers, you can override GetClientIPAddress to use them instead of the connection IP:
services.AddPalmalytics(options =>
{
options.GetClientIPAddress = (request) =>
{
if (request.Headers.TryGetValue("X-Forwarded-For", out var header))
{
var firstValue = header.ToString().Split(',', StringSplitOptions.RemoveEmptyEntries).FirstOrDefault()?.Trim();
if (IPAddress.TryParse(firstValue, out var ip))
return ip;
}
return request.HttpContext.Connection.RemoteIpAddress;
};
// ... other options
});
Alternatively, you can use a middleware that reads the header and updates RemoteIpAddress, see Forwarded Headers Middleware.
Requirements
Currently, Palmalytics requires:
- .NET 8
- SQL Server for storage
We may add support for other data stores (Postgres, SQLite…).
Licensing
Copyright 2026 Xavier Poinas
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributing
Contributions are welcome, whether they are bug reports, feature requests, or code contributions.
By submitting a pull request, you relinquish any rights or claims to the changes you submit to the project and transfer the copyright of those changes to the project owner.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Palmalytics:
| Package | Downloads |
|---|---|
|
Palmalytics.SqlServer
SQL Server storage for Palmalytics, a self-hosted, first-party, server-side web analytics dashboard for ASP.NET Core applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 110 | 7/26/2026 |
| 1.0.0 | 123 | 7/22/2026 |
| 1.0.0-rc | 118 | 7/8/2026 |
| 0.3.0-alpha | 124 | 7/5/2026 |
| 0.2.0-alpha | 213 | 10/12/2024 |
| 0.1.0-alpha | 193 | 8/25/2024 |