1 minute

Install Web-Tracking.eu on Hugo

Drop a partial into your theme's head, or paste the script directly. Works with any Hugo theme that exposes head partials.

1

Create a partial

In your Hugo site root, create layouts/partials/web-tracking.html:

<script src="https://web-tracking.eu/t.js?site={{ .Site.Params.webTrackingSiteId }}" defer></script>
2

Render it from baseof.html

Open your theme's layouts/_default/baseof.html and add this inside the <head> block (override it in layouts/_default/baseof.html if your theme doesn't expose a head partial):

<head>
  <!-- ... -->
  {{ partial "web-tracking.html" . }}
</head>
3

Set the site ID in config

In config.toml (or hugo.toml):

[params]
webTrackingSiteId = "YOUR_SITE_ID"

Run hugo or redeploy your site.

Verify it's working

  1. Open your site in a private/incognito window.
  2. Visit any page on the site.
  3. Open the Web-Tracking.eu dashboard for this site.
  4. The Realtime view should show your visit within 5–10 seconds.

Having trouble?

  • No data showing: Confirm the script is in the page source (View Source > search web-tracking.eu/t.js).
  • Wrong site ID: Double-check the ID matches the one in your dashboard. IDs are case-sensitive.
  • Ad blocker: Web-Tracking.eu is privacy-friendly, but some aggressive blockers still hide it. Test in a fresh browser.
  • Caching: Many platforms cache the page HTML. Purge your cache after install.
  • Still stuck? Email hello@web-tracking.eu with your site URL.
← Back to install hub