uTPro.Feature.AdProtect 18.0.1

dotnet add package uTPro.Feature.AdProtect --version 18.0.1
                    
NuGet\Install-Package uTPro.Feature.AdProtect -Version 18.0.1
                    
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="uTPro.Feature.AdProtect" Version="18.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="uTPro.Feature.AdProtect" Version="18.0.1" />
                    
Directory.Packages.props
<PackageReference Include="uTPro.Feature.AdProtect" />
                    
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 uTPro.Feature.AdProtect --version 18.0.1
                    
#r "nuget: uTPro.Feature.AdProtect, 18.0.1"
                    
#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 uTPro.Feature.AdProtect@18.0.1
                    
#: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=uTPro.Feature.AdProtect&version=18.0.1
                    
Install as a Cake Addin
#tool nuget:?package=uTPro.Feature.AdProtect&version=18.0.1
                    
Install as a Cake Tool

uTPro AdProtect for Umbraco

Invalid-click protection and ad-serving control for Umbraco sites monetized with Google AdSense (or any ad network). Think "Ad Invalid Click Protector" (AICP) for WordPress — rebuilt native for Umbraco/.NET, cache-safe and multi-site aware.

Works with Umbraco 17 and 18.

Documentation: https://docs.utpro.dev/uTPro.Feature.AdProtect/

Why

AdSense accounts get "ad serving limits" for invalid traffic — bots, scanners and a handful of accidental or abusive clicks. On small sites a few anomalous clicks are enough to trigger a limit, and repeated flags risk account termination.

AdProtect decides per visitor, per request whether ad code should be served at all, and logs ad-click intent so repeat clickers stop seeing ads.

Features

  • Visitor gate — hide ads for:
    • blocked IPs / CIDR ranges (manual list + bulk import)
    • blocked countries (reuses uTPro.Feature.GeoLocation)
    • datacenter/hosting ASNs (built-in list, disabled by default — enable with one click)
    • visitors who exceeded the click budget (auto cool-down, durable across restarts)
  • Click-intent tracker — lightweight vanilla JS (~2 KB, no jQuery) using the mouseenter + window blur / visibilitychange heuristic on the ad container; click events are HMAC-token bound, de-duplicated and never accepted from client-supplied IPs
  • Cache-safe by design — the Razor tag renders an empty slot; a tiny fetch to /api/adprotect/check decides whether the ad script loads. Works with output cache, works on any host (including static front-ends pointing at the API)
  • Backoffice workspace (under Settings) — dashboard (serves / blocks / top IPs / 14-day trend), rules CRUD, active blocks with manual unban, click log, live settings — no restart needed
  • CGNAT-aware — budgets counted per anonymous cookie and per IP, so mobile users behind carrier-grade NAT (common in VN) are not collateral damage
  • Privacy option — store IPs as keyed hashes (HMAC-SHA256), still matchable

Install

dotnet add package uTPro.Feature.AdProtect

The package self-wires: the database tables are created on first boot, the Settings → AdProtect workspace appears in the backoffice, and the gate endpoints register themselves — no Program.cs changes.

Show an ad slot

Register the tag helper in Views/_ViewImports.cshtml:

@addTagHelper *, uTPro.Feature.AdProtect

Replace your ad markup with:

<utc-ad slot="banner-top" render-ins />

Set your AdSense client id in Settings → AdProtect → Settings (or per slot with client-id="ca-pub-..."). Keep your existing adsbygoogle.js script tag in the page head — AdProtect only pushes to adsbygoogle after the gate allows the visitor.

Requires uTPro.Feature.GeoLocation (installed automatically) for client-IP and country resolution.


© uTPro. Free (proprietary) license — same as other uTPro feature packages.

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. 
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 81 11/9/2026
18.0.0 85 11/7/2026
17.0.1 78 11/9/2026
17.0.0 82 11/7/2026

v17.0.1 / v18.0.1: Package title cleanup - the NuGet package title no longer carries the "for Umbraco N" suffix, so the marketplace listing shows the plain product name. No functional, API, UI or database changes. v17.0.0 / v18.0.0: Initial release. Ships as two version lines — 17.x for Umbraco 17 and 18.x for Umbraco 18 — with each line's Umbraco dependency boxed to that one major, so an Umbraco 17 host always resolves the 17.x line. Visitor gate (IP/CIDR/country/ASN rules + datacenter-ASN seed), click-intent tracker with HMAC-token binding and de-duplication, per-IP/per-cookie click budget with auto cool-down, cache-safe check endpoint, utc-ad TagHelper + vanilla JS, backoffice workspace under Settings (dashboard, rules, blocks, click log, live settings), optional HMAC-hashed IP storage. Requires uTPro.Feature.GeoLocation.