1 minute
Install Web-Tracking.eu on Eleventy
Add a small partial to your _includes folder and render it from your base layout.
1
Create the partial
Create _includes/web-tracking.njk (or .html):
<script src="https://web-tracking.eu/t.js?site={{ webTrackingSiteId }}" defer></script>2
Include it in your base layout
In _includes/base.njk (or whichever file holds your <head>):
<head>
<!-- ... -->
{% include "web-tracking.njk" %}
</head>3
Add the site ID to global data
Create _data/webTrackingSiteId.js:
module.exports = process.env.WEB_TRACKING_SITE_ID || "YOUR_SITE_ID"; Rebuild with npx @11ty/eleventy.
Verify it's working
- Open your site in a private/incognito window.
- Visit any page on the site.
- Open the Web-Tracking.eu dashboard for this site.
- 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.