Analytics
Who is arriving at your site, and an alert when they stop. It belongs in a monitoring product rather than beside one, because “up, healthy, and nobody is arriving” is a real outage that every check we make from the network reports as fine.
The tag
Add a site in the dashboard and put its tag on every page, before the closing body:
<script defer src="https://vitrinaengine.com/insight.js" data-site="..."></script>That is all. Numbers appear within a minute of the first visit.
No banner, and why that is safe to rely on
Nothing is stored on or read from the visitor’s device. No cookie, no local storage, no fingerprint. The consent rules are about storing or reading on somebody’s equipment, and this does neither, so there is nothing to ask permission for.
A visitor is recognised for the day by a short hash of their address, your site and a secret we generate daily and destroy after two days. While that secret exists, somebody holding the database could recompute the hash for an address they already had; once it is gone, nobody can — including us. That is the difference between anonymous and merely pseudonymous, and it is the whole design.
What that costs you
A visitor count cannot be deduplicated across days. A week is the sum of seven days of unique visitors, so somebody who visited on Monday and Thursday is counted twice. This is stated next to the number in the dashboard rather than hidden in a footnote, because it is a direct consequence of destroying the salt and not a rounding error.
What is collected
The page path, the referring host, a coarse browser, operating system and device type, and a country from the network edge. The list is closed — there are no free-form tags, because that is how an analytics table acquires a column of email addresses nobody can defend.
The query string is dropped before storage, apart fromutm_* and ref, which are lifted out by name because they are the only ones anybody meant to publish. A query string is where a password reset token and an ?email= parameter live on somebody’s real site.
Custom events
Count something specific — a sign-up, a purchase — by calling:
window.vitrina('signup');A name and nothing else. There is deliberately no payload argument: a payload is how an analytics tool ends up holding an email address nobody meant to send it. Events are counted separately from page views, so measuring conversions does not inflate your own traffic figure.
The traffic alert
Turn it on for a site and we tell you when arrivals drop far enough below normal to mean something is wrong — a broken deploy, a DNS change, a payment page that stopped loading.
Normal is the median of the same hour on the same weekday over four weeks, because traffic is periodic in two dimensions at once and a flat average would page you every Saturday night. There is also a floor, so a quiet site does not alert on a percentage of almost nothing, and one open alert per site, so a site dark overnight does not page anybody ninety-six times.
Sharing a dashboard
A site’s dashboard can be published on a link, for a client or for a public “open metrics” page. The link is a derived token rather than the site id — the id is in the page source of every page it measures, so using it would mean anybody who viewed source could read your traffic.
Sharing is re-checked on every read, so switching it off works on the next request.
If a content blocker stops it
Serve the script and the endpoint from your own domain. The script works out where to post from wherever it was loaded, so a plain reverse proxy needs no configuration. The script is served unminified and nothing is disguised.