A visitor counter
you can embed.

One script tag renders a count. No account, no cookie, nothing stored on the reader's device.

One tag. One fixed corner.

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.

html — anywhere in the document, loaded with defer
<script defer
  src="https://frioda.com/widget.js"
  data-project="prj_8f31a2"
  data-endpoint="https://frioda.com"></script>
Attributes
  • data-projectrequired
  • data-endpointAPI origin
  • deferrecommended

If the body has not parsed yet the script waits for DOMContentLoaded. A second copy of the tag on the same page is ignored.

A number, not a dashboard.

What it counts

The visitors the project the tag is bound to has seen. Feed the project with the tracker; the widget only reads.

Styling

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.

Limits

One number. Paths, sources, sessions and funnels need a key and the dashboard.


How the number resolves.

One request on load, then one every thirty seconds. Nothing is written to the reader's device.

  1. Read

    The script reads data-project and, if present, data-endpoint from its own tag.

  2. Fetch

    A GET goes to /api/widget/visitors with the project id, after the document is ready, never during load.

  3. Render

    The response is a count. The script writes it into its own shadow-rooted element.

  4. Stay quiet

    A failed request leaves the last number in place and waits for the next tick. Nothing jumps or disappears.

Counter response — example
GET /api/widget/visitors?pid=prj_8f31a2
200 OK
{
  "visitors": 18422,
  "online": true
}
Request
  • methodGET
  • refresh30s
  • timeout10s
  • storagenone

Two instances on one page resolve to the same number and the script is not loaded twice.