GitHub Pages · Working installation example

Free Visitor Counter for GitHub Pages

Add a visible counter to a static GitHub Pages website with counter.gratis. No server-side code is required: the counter image is delivered by the counter service.

Live counter on this page

Live visitor counter

The demo counter above records visits to this page. Enter another ID to preview its existing count here with a different style; the read-only viewer will not increment that counter.

Initial demo: style 760. Read-only previews: style 334.

Create your free counter ↗

Install it on GitHub Pages

  1. Create a counter and choose a design.
  2. Copy the embed code provided by counter.gratis into your GitHub Pages index.html or another HTML page.
  3. Commit the change to the repository's published branch. The counter will appear when the page is published.

HTML-only Embed — No JavaScript Required

The HTML-only embed below is intended for websites, hosting platforms, and forums that do not allow JavaScript. Where JavaScript is supported, the standard JavaScript embed is recommended for more detailed tracking.

Unlike the read-only preview above, this HTML-only embed records actual visits and pageviews. The HTML=1 parameter identifies the request as an HTML-only counter.

Visitors vs. pageviews

Visitors and pageviews are different measures. Repeated visits or page loads may increase pageviews without increasing the unique visitor count for the same day. A visible counter is a simple indicator, not a replacement for a full analytics service.

The standard JavaScript embed can send extra context, such as the visited URL and referring page. The HTML-only example above cannot supply the same browser information.