Getting started

Installation

The script tag

<script defer data-site="SITE_ID" src="https://app.vitrus.dev/v.js"></script>

Your SITE_ID is shown in the dashboard's Install tab. The script is 2.4 KB gzipped, sets no cookies and never touches localStorage.

Configuration attributes

AttributeDefaultWhat it does
data-siteRequired. Site id.
data-hostscript originSend data to a different server (self-hosting).
data-autotruefalse sends only manual events.
data-tagVersion or variant marker ("v2", "test-b").
data-do-not-tracktrueDNT is respected by default. false disables that.

Verify it works

Open your site, then look at the live visitor counter in the dashboard header — it shows visitors from the last five minutes. If nothing arrives:

  • Ad blocker. Your own browser may be blocking it; try a private window.
  • Do Not Track is on. We respect it by default; for testing add data-do-not-track="false".
  • Wrong site id. Check the network tab: a 404 on /api/collect means the id is wrong.
  • Quota exhausted. A 429 means you are at your plan limit; the dashboard shows a warning.
  • Strict privacy mode. If the site is in strict mode, a browser sending DNT is dropped and cannot be overridden. See privacy mode.