@* Web-Tracking.eu — Umbraco Razor partial Cookieless, GDPR-compliant analytics for Umbraco sites. No cookie banner required. Installation: 1. Save this file as: Views/Partials/_WebTracking.cshtml 2. Open your master template (e.g. Views/Master.cshtml or your top-level layout) 3. Add this just before the closing tag: @{Html.RenderPartial("_WebTracking");} 4. In appsettings.json add: { "WebTracking": { "SiteId": "YOUR_SITE_ID" } } 5. Rebuild and deploy. Notes: - If you hit Umbraco's known DistributedReadLockTimeoutException on Azure SQL when using Razor views, render this through a custom MVC controller using ContentResult instead of a Razor view. - The SiteId can also be hard-coded below by replacing the config lookup. Docs: https://web-tracking.eu/install/umbraco *@ @using Microsoft.Extensions.Configuration @inject IConfiguration Configuration @{ var webTrackingSiteId = Configuration["WebTracking:SiteId"] ?? "YOUR_SITE_ID"; } @if (!string.IsNullOrWhiteSpace(webTrackingSiteId) && webTrackingSiteId != "YOUR_SITE_ID") { }