Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ jobs:
fail-fast: false
matrix:
umbraco-version:
- 17.4.0
- 18.0.0
- 17.1.0
- 17.*
- 18.*
steps:
- name: Check out repository
uses: actions/checkout@v7
Expand All @@ -56,7 +57,41 @@ jobs:
dotnet-version: 10.0.x

- name: Test package
run: dotnet test tests/TheBuilder.WebAnalytics.Tests/TheBuilder.WebAnalytics.Tests.csproj -p:UmbracoVersion=${{ matrix.umbraco-version }}
run: dotnet test tests/TheBuilder.WebAnalytics.Tests/TheBuilder.WebAnalytics.Tests.csproj '-p:UmbracoVersion=${{ matrix.umbraco-version }}'

- name: Build example
run: dotnet build samples/TheBuilder.WebAnalytics.Example/TheBuilder.WebAnalytics.Example.csproj -p:UmbracoVersion=${{ matrix.umbraco-version }}
run: dotnet build samples/TheBuilder.WebAnalytics.Example/TheBuilder.WebAnalytics.Example.csproj '-p:UmbracoVersion=${{ matrix.umbraco-version }}'

package:
name: Package
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 24

- name: Enable Corepack
run: corepack enable

- name: Install backoffice dependencies
working-directory: src/TheBuilder.WebAnalytics/Client
run: corepack pnpm install --frozen-lockfile

- name: Pack NuGet package
run: >-
dotnet pack src/TheBuilder.WebAnalytics/TheBuilder.WebAnalytics.csproj
--configuration Release
--output artifacts
-p:ContinuousIntegrationBuild=true

- name: Validate NuGet archive
run: unzip -t artifacts/*.nupkg
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# Web Analytics

`TheBuilder.WebAnalytics` displays [Vercel Web Analytics](https://vercel.com/docs/analytics) in the Umbraco backoffice.
[![NuGet version](https://img.shields.io/nuget/v/TheBuilder.WebAnalytics)](https://www.nuget.org/packages/TheBuilder.WebAnalytics)
[![NuGet downloads](https://img.shields.io/nuget/dt/TheBuilder.WebAnalytics)](https://www.nuget.org/packages/TheBuilder.WebAnalytics)
[![License](https://img.shields.io/github/license/thebuilder/web-analytics)](https://github.com/thebuilder/web-analytics/blob/main/LICENSE)

Web Analytics brings [Vercel Web Analytics](https://vercel.com/docs/analytics) into Umbraco, giving editors site-wide and page-level insights without leaving the backoffice.

![Web Analytics overview in the Umbraco backoffice](https://raw.githubusercontent.com/thebuilder/web-analytics/refs/heads/main/docs/screenshots/analytics-overview.png)

It provides:
## What you get

- A global **Analytics** section for traffic, audience, referrers, pages, routes, UTM data, and custom events.
- An **Analytics** workspace view on configured, published documents, filtered to the document's route.
- A dedicated **Analytics** section for visitors, page views, traffic trends, audience, referrers, pages, routes, campaigns, custom events, and feature flags.
- Page-level analytics on configured, published documents, automatically filtered to the document's route.
- Date comparisons and drill-down views that turn site-wide trends into useful content context.
- Multiple Vercel project connections for multi-site Umbraco installations.
- Server-side Vercel API access so the access token is never sent to the browser.
- Server-side Vercel API access, keeping access tokens out of the browser and Umbraco content.

The package reads analytics already collected by Vercel. It does not add Vercel tracking to the public website.
The package reads analytics already collected by Vercel. It does not add or replace the tracking on your website.

## Requirements

- Umbraco CMS 17.1 or later.
- Umbraco CMS 17.1–18.x.
- A Vercel project with [Web Analytics enabled and installed](https://vercel.com/docs/analytics/quickstart).
- A [Vercel access token](https://vercel.com/kb/guide/how-do-i-use-a-vercel-api-access-token) scoped to the personal account or team that owns the project.
- The Vercel project ID (`prj_...`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<CompressionEnabled>false</CompressionEnabled> <!-- Disable compression. E.g. for umbraco backoffice files. These files should be precompressed by node and not let dotnet handle it -->
<UmbracoVersion Condition="'$(UmbracoVersion)' == ''">17.4.0</UmbracoVersion>
<DefineConstants Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(UmbracoVersion)', '18.0.0'))">$(DefineConstants);UMBRACO_18_OR_LATER</DefineConstants>
<DefineConstants Condition="$(UmbracoVersion.StartsWith('18.'))">$(DefineConstants);UMBRACO_18_OR_LATER</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/TheBuilder.WebAnalytics/TheBuilder.WebAnalytics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<StaticWebAssetBasePath>/</StaticWebAssetBasePath>
<UmbracoVersion Condition="'$(UmbracoVersion)' == ''">[17.4.0,19.0.0)</UmbracoVersion>
<UmbracoVersion Condition="'$(UmbracoVersion)' == ''">[17.1.0,19.0.0)</UmbracoVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
34 changes: 8 additions & 26 deletions umbraco-marketplace-readme.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
# Web Analytics

> [Vercel Web Analytics](https://vercel.com/docs/analytics) inside the Umbraco backoffice.

**Web Analytics brings Vercel Web Analytics into the Umbraco backoffice.** View traffic, audience, referrers, pages, campaigns, and custom events without leaving Umbraco.

![Web Analytics overview in the Umbraco backoffice](https://raw.githubusercontent.com/thebuilder/web-analytics/refs/heads/main/docs/screenshots/analytics-overview.png)

## Features

- Analytics section with totals, traffic history, audience, referrers, pages, routes, campaigns, and custom events.
- Page-level analytics in the document workspace, automatically filtered to the published route.
- Clear date controls and drill-down views that follow familiar Umbraco backoffice patterns.

## Built for real Umbraco installations

- Map multiple Umbraco sites to different Vercel projects.
- Choose which document types expose page-level analytics.
- Control global Analytics access through Umbraco user groups and preserve normal document permissions.
- Store Vercel access tokens in server-side configuration. Tokens are never sent to the browser or stored in Umbraco.

The package reads analytics already collected by Vercel. **It does not add tracking scripts to your website.**
Web Analytics brings [**Vercel Web Analytics**](https://vercel.com/docs/analytics) into the Umbraco backoffice, giving editors useful traffic and content insights without sending them to another tool.

## Requirements
## Key features

- Umbraco CMS 17.1–18.x
- A Vercel project with Web Analytics enabled
- A Vercel access token
- **Site-wide analytics:** Follow visitors, page views, traffic trends, audience, referrers, campaigns, custom events, and feature flags.
- **Page-level insight:** Open analytics on a published document to see data automatically filtered to that page's route.
- **Useful comparisons:** Compare date ranges and drill into the audience, content, and activity behind the headline numbers.
- **Multi-site support:** Connect multiple Umbraco sites to their Vercel projects and bring them together in one Analytics section.

Installation, configuration, permissions, and troubleshooting are covered in the [documentation](https://github.com/thebuilder/web-analytics#readme).
Web Analytics fits into the Umbraco permissions and editorial workflows teams already know, making analytics available where content decisions happen.

Web Analytics is open source under the MIT License. Bugs and feature requests are welcome on [GitHub](https://github.com/thebuilder/web-analytics/issues).
Ready to bring your analytics into the backoffice? See the [installation and configuration guide](https://github.com/thebuilder/web-analytics#readme).
2 changes: 1 addition & 1 deletion umbraco-marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"Category": "Analytics & Insights",
"Title": "Web Analytics",
"Description": "View Vercel Web Analytics inside the Umbraco backoffice. Explore traffic, visitors, referrers, pages, routes, campaigns, UTM parameters, and custom events, with route-filtered analytics available directly on published documents.",
"Description": "Vercel Web Analytics inside the Umbraco backoffice.",
"DocumentationUrl": "https://github.com/thebuilder/web-analytics#readme",
"IssueTrackerUrl": "https://github.com/thebuilder/web-analytics/issues",
"LicenseTypes": [
Expand Down