IL.UmbracoSearch.Analytics 18.0.1.2

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

IL.UmbracoSearch.Analytics

Optional Search Insights for IL.UmbracoSearch. It decorates ISearchService to record searches and consented result clicks in SQL, and adds a Search section to the Umbraco backoffice: overview, queries, content, sessions, Azure synonyms and settings. It never changes query or result behavior.

Targets .NET 10 with Umbraco 17.8.1+ (<18) and .NET 11 with Umbraco 18.3.1+ (<19), matching the main package. Umbraco 13-16 and .NET 8-9 are not supported.

Enable

Add SearchOptions.Analytics next to exactly one engine:

builder.AddServiceAttributeBasedDependencyInjection(options =>
{
    options.AddFeature(SearchOptions.Lucene);      // or SearchOptions.Azure
    options.AddFeature(SearchOptions.Analytics);
});

(using IL.AttributeBasedDI.Extensions;.) Any other combination fails at startup. Without SearchOptions.Analytics the package is inert.

Map the endpoints

app.UseSearchAnalyticsClicks();                                           // POST /api/search/analytics/click
app.MapSearchAnalyticsManagement(authorizationPolicy: "SearchInsights");  // /umbraco/api/search-analytics

Define the SearchInsights policy in your host (for example backoffice authentication scheme plus an authenticated user). Without a policy the management endpoints still require a signed-in backoffice user. Your application owns authentication, rate limiting and consent for the click endpoint.

Record searches and clicks

Capture is requested per search:

var results = await searchService.SearchAsync<CommonSearchItemModel>(new SearchParameters
{
    FullTextSearch = "umbraco",
    Take = 10,
    Analytics = new AnalyticsRequest { AnalyticsSessionToken = sessionToken }
});

results.Analytics returns a TrackingReference (use it for clicks) and an AnalyticsSessionToken (send it with later searches to form a session). Post consented clicks from the browser with the npm helper:

npm i @ihorleleka/umbraco-search-analytics
import { trackSearchResultClick } from '@ihorleleka/umbraco-search-analytics';

await trackSearchResultClick(
  { endpoint: '/api/search/analytics/click', consent: () => hasAnalyticsConsent() },
  { trackingReference, nodeKey: item.nodeKey, position: index + 1, idempotencyKey: crypto.randomUUID() });

If the same search runs during server rendering and again on hydration it is counted twice: reuse the server results or set CaptureAnalytics = false on the repeat.

Configure

Options live under SearchSettings:Analytics; the connection string comes from ConnectionStrings:UmbracoSearchAnalytics (falling back to umbracoDbDSN).

"SearchSettings": { "Analytics": { "Enabled": true, "EnableBackgroundProcessing": true, "RawEventRetention": "90.00:00:00" } }

On delivery servers of a multi-server setup set EnableBackgroundProcessing to false; on preview/test servers set Enabled to false. Migrations are applied automatically on the node that runs background processing.

Learn more

Topic Page
All options, storage, migrations, multi-server nodes setup and configuration
Click endpoint, npm helper, SSR/hydration, consent clicks and front end
Backoffice endpoints, paging and CSV, retention, Azure synonyms management and reports

AI coding agents: use the umbraco-search-analytics skill.

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.  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
18.0.1.4 0 12/2/2026
18.0.1.3 0 12/2/2026
18.0.1.2 0 12/2/2026
18.0.1.1 109 11/26/2026
18.0.0.6 119 11/26/2026
18.0.0.5 111 11/25/2026
18.0.0.4 95 11/25/2026
18.0.0.3 97 11/24/2026
18.0.0.2 95 11/24/2026
18.0.0.1 108 11/18/2026
17.8.5.2 178 10/27/2026
17.8.5.1 131 10/25/2026
17.8.4.14 179 10/15/2026
17.8.4.13 143 10/9/2026
17.8.4.12 121 10/8/2026
17.8.4.11 210 9/17/2026
17.8.4.10 132 9/17/2026
17.8.4.9 125 9/17/2026
17.8.4.8 116 9/17/2026
17.8.4.7 136 9/17/2026
Loading failed