What it counts
The visitors the project the tag is bound to has seen. Feed the project with the tracker; the widget only reads.
One script tag renders a count. No account, no cookie, nothing stored on the reader's device.
The script inserts its own element in a closed shadow root. Your markup stays as it is, your CSS cannot reach the widget, and the widget cannot reach your page.
If the body has not parsed yet the script waits for DOMContentLoaded. A second copy of the tag on the same page is ignored.
The visitors the project the tag is bound to has seen. Feed the project with the tracker; the widget only reads.
A pill pinned to the bottom-right corner, drawn inside a closed shadow root with its own inline styles. Site CSS does not override it.
One number. Paths, sources, sessions and funnels need a key and the dashboard.
One request on load, then one every thirty seconds. Nothing is written to the reader's device.
The script reads data-project and, if present, data-endpoint from its own tag.
A GET goes to /api/widget/visitors with the project id, after the document is ready, never during load.
The response is a count. The script writes it into its own shadow-rooted element.
A failed request leaves the last number in place and waits for the next tick. Nothing jumps or disappears.
GET /api/widget/visitors?pid=prj_8f31a2
200 OK
{
"visitors": 18422,
"online": true
}
Two instances on one page resolve to the same number and the script is not loaded twice.