Thanks for your interest in improving Web Analytics for Umbraco. This guide covers the repository layout, how to set up a local development environment, and how to get a change merged. For how released package versions reach NuGet, see docs/releasing.md.
This repository is a pnpm and .NET workspace. The most relevant folders:
| Path | What it is |
|---|---|
src/TheBuilder.WebAnalytics/ |
The NuGet package: Umbraco API controllers, provider clients, services, and the packaging targets. |
src/TheBuilder.WebAnalytics/Client/ |
The backoffice frontend (TypeScript, Lit, Vite). Built assets are emitted to wwwroot/App_Plugins/. |
samples/TheBuilder.WebAnalytics.Example/ |
A runnable Umbraco site that references the package for local development. |
tests/TheBuilder.WebAnalytics.Tests/ |
The .NET (xUnit) test project. Frontend tests (Vitest) live beside the client source. |
apps/docs/ |
The documentation site (Blume) published to https://web-analytics.thebuilder.dk/. |
docs/releasing.md |
How package versions are published to NuGet. |
- .NET SDK 10.0: builds the package, sample, and tests.
- Node.js 24: builds the backoffice client and the docs site.
- pnpm via Corepack. Run
corepack enableonce; the pinned pnpm version is resolved automatically frompackage.json.
Install the JavaScript dependencies from the repository root:
pnpm installThe backoffice UI is a separate frontend build. A plain dotnet build of the sample does not rebuild it; the client is only built automatically when the NuGet package is packed. During development, build (or watch) the client yourself so its assets land in wwwroot/App_Plugins/:
pnpm client:build # one-off build
pnpm client:watch # rebuild on change and refresh the running backofficeThe example project references the package directly, so it always uses your local source. With the client already built, run it from the repository root:
dotnet run --project samples/TheBuilder.WebAnalytics.ExampleOn first launch Umbraco installs unattended and creates a local SQLite database. In Development the sample enables mock connections (WebAnalytics:EnableMockConnections), so the Analytics section shows deterministic sample data without any Vercel or Plausible credential. For live data, configure a real provider credential and connection exactly as a consumer would (see the Quickstart).
For an efficient loop, run pnpm client:watch in one terminal and dotnet run in another.
pnpm test # frontend unit tests (Vitest)
pnpm client:check # frontend type-check
dotnet test tests/TheBuilder.WebAnalytics.Tests/TheBuilder.WebAnalytics.Tests.csproj # .NET testsThe .NET suite runs against Umbraco 17.1, the latest 17.x, and the latest 18.x in CI. Target a specific line locally by passing the version, for example -p:UmbracoVersion=18.*.
pnpm docs:dev # local preview with hot reload
pnpm docs:build # production build
pnpm docs:check # validate content and linksThe apps/docs/ content is Markdown/MDX; see the files under apps/docs/docs/ for structure.
- Create a branch for your change.
- Keep pull requests focused, and update the relevant docs under
apps/docs/when behaviour changes. - Run the frontend and .NET tests above so CI passes on the first try. The
Validateworkflow builds the client, runs both test suites across the supported Umbraco versions, and validates the NuGet package. - Open a pull request against
mainwith a clear description of the change and its motivation.
Publishing packages to NuGet is release-driven and documented separately in docs/releasing.md. GitHub Releases are the authoritative changelog and are surfaced in the documentation changelog.