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

Checking service status…
Badge Builder
badge preview
Copy Code
Markdown HTML URL
![visitors](/badge?page_id=username.project)

Parameters

All parameters are optional except page_id.

ParameterRequiredDescriptionExample
page_idUnique page identifier, e.g. username.repo-namelivrasand.viewlet
left_textLeft-side label textvisitors
left_colorLeft color (name or HEX)#595959
right_colorRight color (name or HEX)#1283c3
formatCompact number format (1K / 1M)true
logoIcon slug from simple-icons.github
logoColorCustom logo color (name or HEX; # must be URL-encoded as %23)auto
styleBadge style for the logo variant (flat or social)flat
logoSizeSet to auto to fit non-square logos to their bounding box24x24
radiusBorder radius3
heightBadge height (px), scales proportionally20
query_onlyQuery only, do not incrementtrue
periodShow total or daily page viewstotal
dateWith period=daily, show views for a specific day2026-08-13

Dashboard & API

Check trends, hourly breakdowns and referrers without logging in.

Web dashboard

Visit /dashboard and enter your page_id to see daily and hourly views plus top referrers.

Analytics API

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?
Yes. Use the <img> tag with the generated URL.
Will my data be lost?
Daily backups are performed. Counts are safe under normal service conditions.
Is it free?
Yes. If you find it useful, star it on GitHub or send a thank-you note.
How does counting work?
Each 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?
A hashed page_id, a timestamp, and an optional referrer. No cookies, no fingerprints, no personal data. See /privacy.