Skip to main content
bchic Analytics can be integrated into any ASP.NET application in just a few minutes. The tracking script is placed centrally in your layout or master page and automatically captures all page views without cookies or personal data.
1

Get your tracking script

First, retrieve your personal tracking script from the bchic dashboard.
  1. Open Settings (gear icon bottom left).
  2. Navigate to Tracking → Setup.
  3. Copy the displayed script tag with your website ID.
The script looks something like this:
2

Add script to your layout

Depending on your ASP.NET version, you’ll integrate the script differently:

ASP.NET MVC / .NET Core

Open your central layout file (usually Views/Shared/_Layout.cshtml) and add the script in the <head> section:

ASP.NET Web Forms

Open your master page (usually Site.Master) and add the script in the <head> section of the <asp:Content> area:

ASP.NET Core Razor Pages

Open Pages/Shared/_Layout.cshtml and add the script:
3

Deploy and verify

  1. Save your changes and deploy your application.
  2. Open your website in a browser.
  3. Check in the bchic dashboard under LiveActive Visitors to see if your visit was tracked.
Alternatively, you can check in the browser DevTools (F12) → Network tab if a request to cloud.bchic.de/api/send was successfully sent (Status 202).

Advanced Configuration

Track custom events

In addition to page views, you can track custom events like button clicks or form submissions:

Single Page Application (SPA) support

If you’re running an ASP.NET Core app with a frontend framework like React or Vue.js, you need to manually track page views when the URL changes:

Content Security Policy (CSP)

If you’re using a Content Security Policy, add bchic to your allowed domains:
Or in your Web.config or Startup.cs:

Exclude development environment

To disable tracking on localhost or in development environments, use a Razor condition:

Common Issues

Script doesn’t load

  • Check if the data-website-id is correct (no spaces, no trailing slash).
  • Make sure no firewall or ad blocker is blocking the script.
  • Check the browser console (F12) for JavaScript errors.

No data in dashboard

  • Wait 1-2 minutes after the first visit for data to be processed.
  • Make sure the script is in the <head>, not at the end of <body>.
  • Verify your website is publicly accessible (not behind VPN/firewall).

POST requests are blocked

If you’re using AntiForgeryToken or CSRF protection, make sure external POST requests to cloud.bchic.de are not affected. bchic sends tracking data via POST, but these don’t require CSRF tokens.

Privacy & Compliance

bchic Analytics is fully GDPR-compliant without cookies or consent banners:
  • No cookies → No consent required
  • No IP storage → Anonymization through hashing
  • Servers in Germany (Hetzner Falkenstein)
  • No third-country transfer → No US cloud
Your privacy policy should still mention bchic. We provide ready-made text templates: Privacy Policy Templates

Support

If you need help with the integration or have questions about your specific ASP.NET setup, feel free to reach out: We’re happy to help with setup, including screenshare or remote sessions.