A page view counter for people who dislike being counted.
“What cannot be mended must be transcended.” — Ursula K. Le Guin
Viewlet is a small, self-hostable badge. It counts page views. It does not track visitors, build profiles, or phone home to analytics companies.
Tracking {keys} projects

Parameters
All parameters are optional except page_id.
| Parameter | Required | Description | Example |
|---|---|---|---|
page_id | ✅ | Unique page identifier, e.g. username.repo-name | livrasand.viewlet |
left_text | — | Left-side label text | visitors |
left_color | — | Left color (name or HEX) | #595959 |
right_color | — | Right color (name or HEX) | #1283c3 |
format | — | Compact number format (1K / 1M) | true |
logo | — | Icon slug from simple-icons. | github |
logoColor | — | Custom logo color (name or HEX; # must be URL-encoded as %23) | auto |
style | — | Badge style for the logo variant (flat or social) | flat |
logoSize | — | Set to auto to fit non-square logos to their bounding box | 24x24 |
radius | — | Border radius | 3 |
height | — | Badge height (px), scales proportionally | 20 |
query_only | — | Query only, do not increment | true |
period | — | Show total or daily page views | total |
date | — | With period=daily, show views for a specific day | 2026-08-13 |
Dashboard & API
Check trends, hourly breakdowns and referrers without logging in.
Visit /dashboard and enter your page_id to see daily and hourly views plus top referrers.
Public, read-only endpoints. Versions
/api@latest
and
/api@1.0.0
are supported.
GET /api@latest/stats?page_id=livrasand.viewlet&range=30&granularity=day
GET /api@latest/referrers?page_id=livrasand.viewlet&range=30&limit=50
Returns [{label, count}, ...] or [{referer, count}, ...]
Why this counter?
The original visitor-badge is a convenient hosted service, but I wanted something I could run myself. I wanted to know where the data goes. I wanted to pin a version, host it on my own server, and turn off anything I did not ask for.
This fork keeps the simple badge idea and removes the surveillance-adjacent parts.
“I come with empty hands and the desire to unbuild walls.”
— Ursula K. Le Guin, The Dispossessed
A page view counter should be a hammer, not a surveillance drone. It should count one thing, store the minimum, and get out of the way.
No AI / LLM Policy
This project was written by a human. I do not use LLMs to write code, issues, or documentation. I do not want AI-generated slop in this repository. If you submit a patch, make sure it is yours.
This project is mainly therapeutic. I had to get it out of my system.
FAQ
A few honest answers
Can I use this in HTML?
<img> tag with the generated URL.Will my data be lost?
Is it free?
How does counting work?
page_id counts independently. Every badge load adds one view. Use query_only=true to read the count without recording a new view.What do you track?
If this project helps you, consider supporting its development.