How do I install a visitor ID tag on ASP.NET Core?
On ASP.NET Core, your visitor identification tag goes in: Views/Shared/_Layout.cshtml via <script> tag OR @section Scripts{} in individual views. The install itself takes minutes; the part that goes wrong on ASP.NET Core is below.
Where the tag goes
- Views/Shared/_Layout.cshtml via <script> tag OR @section Scripts{} in individual views.
- Paste your vendor’s tag snippet exactly as issued. Do not wrap it in extra script tags or reformat it.
- Publish or deploy, then verify (below) before trusting data.
What breaks visitor tracking on ASP.NET Core?
Tag helpers like asp-fallback-src require static files in wwwroot; CSP policies may block inline scripts.
How do you verify the tag fires?
dotnet run, inspect http://localhost:5000, check page source and Network tab for script load.
Then run through the labeled QA checklist before you rely on the numbers, and set expectations with the match-rate calculator — no vendor identifies every visitor.