Source: https://measuremy.site/blog/add-visitor-counter-to-website

[measuremy.site](https://measuremy.site/) / [Blog](https://measuremy.site/blog)

# How to add a visitor counter to your website or GitHub README

October 10, 2026 · 4 min read

Visitor counters were everywhere on the early web, and they're back: on personal sites, project READMEs, small blogs and portfolios. A counter shows visitors (and you) that people are reading, and a country breakdown is a nice reminder of how far a small page can travel.

## How a visitor counter works

Most counters today are images. Your page includes an image from the counter service, and every time the page loads, the browser requests that image. The service counts the request and draws the current total into the image it sends back. Because it's just an image, it works almost anywhere: plain HTML, a blog platform, a GitHub README, a forum signature or a Notion page.

The details decide how honest the number is:

- **Unique or every load?** Counting every request inflates the number with reloads. Better counters count each visitor once a day.
- **Bots and previews.** Crawlers and link previews from chat apps request images too. A good counter leaves them out.
- **Caching.** If the image is cached, repeat views never reach the counter. Counter images should be served uncached.
- **Privacy.** A counter doesn't need cookies or stored IP addresses to do its job. Check that yours doesn't use them.

## Adding one in a minute

The free [visitor counter](https://measuremy.site/tools/visitor-counter) on this site makes a counter of visitors by country. Give it a label, pick a light or dark style and how many countries to show, and copy the snippet:

- **Websites and blogs:** paste the HTML snippet where you want the counter, often the footer or sidebar.
- **GitHub README or profile:** paste the Markdown snippet into `README.md`.
- **Anywhere else that shows images from a link:** use the image address directly.

Each visitor is counted once a day using a one-way hash of their IP address and browser that changes daily; no cookies are set and no IP addresses are stored, so there's nothing to add to a cookie banner. Bots and link previews aren't counted. Anyone who clicks the counter sees a stats page with the list of countries.

## A note on GitHub

GitHub loads README images through its own image proxy. The counter is served uncached so every view still reaches it, but the visitor's location is seen less precisely through the proxy, so country figures from a README are rougher than from a website.

## When a counter isn't enough

A counter answers "how many, and from where". It can't tell you which pages people read, which link brought them, or whether they signed up. When you need those answers, use analytics. measuremy.site uses the same no-cookie approach for a full dashboard of pages, sources and conversions, and your coding agent can read it. A counter is a good start for a personal page; for anything you're trying to grow, you'll want both.

To see roughly how much traffic another site gets, try the [website traffic checker](https://measuremy.site/tools/website-traffic-checker).

### See it on your own site

measuremy.site is cookieless analytics your coding agent can read. 30-day free trial, no card. Plans from $9/month.

[Start free trial](https://measuremy.site/login) [See the live demo](https://measuremy.site/share/measuremy.site)

Add measuremy.site analytics to this project: connect the measuremy.site MCP server at https://a.measuremy.site/mcp (it signs in with OAuth, no key), then tell me how to sign in. Details: measuremy.site/llms.txt

## Free tools

- [Visitor counter by country](https://measuremy.site/tools/visitor-counter): An embeddable counter of visitors by country.
- [Website traffic checker](https://measuremy.site/tools/website-traffic-checker): A site's popularity rank and estimated monthly visits.
- [Analytics tag checker](https://measuremy.site/tools/analytics-tag-checker): Which analytics and pixels a site runs, plus duplicate and broken tags.

[All free tools](https://measuremy.site/tools)

## More from the blog

- [How to calculate your website conversion rate, and what to compare it to](https://measuremy.site/blog/calculate-website-conversion-rate)
- [Is my A/B test result significant? A plain-English guide with a worked example](https://measuremy.site/blog/is-my-ab-test-significant)
- [What is bounce rate, how is it calculated, and is yours a problem?](https://measuremy.site/blog/what-is-bounce-rate)
- [How much traffic does a website get? How to estimate any site's visits](https://measuremy.site/blog/how-much-traffic-does-a-website-get)
- [How to track QR code scans: count them, and see which poster worked](https://measuremy.site/blog/track-qr-code-scans)
- [How to see how many people clicked your link (without a paid shortener)](https://measuremy.site/blog/how-many-people-clicked-my-link)
- [How to check if your Google Analytics 4 tag is installed (and only counting once)](https://measuremy.site/blog/check-if-ga4-is-installed)
- [Why GA4 shows your campaign traffic as Unassigned (and how to fix the links)](https://measuremy.site/blog/ga4-unassigned-traffic)
- [Does your redirect keep your UTM tags? How to check before a campaign goes out](https://measuremy.site/blog/redirect-drops-utm-tags)
- [How I built a self-hosted analytics MCP server on Cloudflare Workers and D1](https://measuremy.site/blog/analytics-mcp-server-cloudflare-workers)
- [UTM tracking explained: what the parameters mean and how to use them](https://measuremy.site/blog/utm-tracking-explained)
- [Conversion funnel analysis for small sites: a practical guide](https://measuremy.site/blog/conversion-funnel-analysis)
- [Sudden drop in website traffic? A checklist for finding the cause](https://measuremy.site/blog/sudden-drop-in-website-traffic)
- [What is an MCP server? A plain-English guide for people who run websites](https://measuremy.site/blog/what-is-an-mcp-server)
- [What Is the Urchin Tracking Module?](https://measuremy.site/blog/what-is-the-urchin-tracking-module-and-why-utm-stuck-around)
- [What Microsoft MCP servers actually do](https://measuremy.site/blog/microsoft-mcp-servers-explained)
- [UTM parameters for email newsletters](https://measuremy.site/blog/utm-parameters-for-email-newsletters)
- [Track Button Clicks Without Google Tag Manager](https://measuremy.site/blog/how-to-track-clicks-on-a-button-without-google-tag-manager)
- [How to track the results of a social media post without cookies](https://measuremy.site/blog/how-to-measure-the-results-of-a-social-media-post)
- [How to track traffic from a GitHub README](https://measuremy.site/blog/how-to-track-traffic-from-a-github-readme)
- [How to measure a product launch without guessing](https://measuremy.site/blog/how-to-measure-a-product-launch)
