Analytics

Website Visitor Counter: How to Count Visitors Today

Nemo · · 5 min read

A website visitor counter is a small script that counts how many people load your pages. The old kind showed a number in the footer. The useful kind today runs quietly, filters out bots, separates unique visitors from repeat page loads and shows you the count in a private dashboard.

To know how many people visit your site, a light script with honest counting rules and a private dashboard is enough. A public badge or a heavy analytics suite adds nothing to that answer. Here is how visitor counters work and how to pick one.

What is a website visitor counter?

A visitor counter records a hit every time a page loads and adds it to a total. The first web counters did exactly that and displayed the total as an image on the page. They were easy to add and easy to fool: every refresh counted, every crawler counted, and the number only went up.

Modern counters are closer to minimal web analytics. They still count page loads, but they also:

  • Count unique visitors, so one person reading ten pages is one visitor, not ten.
  • Filter bots and crawlers by user agent.
  • Show where visitors came from and which pages they opened.
  • Keep the number private in a dashboard instead of on the page.

Should the counter be public or private?

A public counter tells your visitors how popular you are. That helps when the number is large and hurts when it isn’t. A private counter tells you what you need to know without signaling anything to visitors.

Public hit counter Private visitor counter
Where the number shows On your page In your dashboard
Counts refreshes Usually yes No, counts unique visitors
Filters bots Rarely Yes
Shows sources and pages No Yes
Looks like A 2000s footer badge A small chart

For a product, a portfolio or a blog, private is almost always the better choice. If you want social proof, a customer count or a launch-day stat in your copy beats a counter that ticks up on every reload.

How does a counter tell unique visitors apart?

This is where counters differ most.

Cookie identifiers. The script stores an id in a cookie and reads it back on the next visit. It’s accurate across days, and in the EU and UK it usually comes with a consent banner.

Daily hashes. The server hashes the IP address, user agent and a daily salt. The same browser gets the same hash for one day. Nothing is stored on the device, and the IP doesn’t need to be kept.

A random id in browser storage. The script keeps a random string in local storage, not linked to a person or an IP. It survives across days until the visitor clears their browser.

Each method miscounts a little: people switch devices, clear storage or browse in private windows. For a small site, these errors are small next to the trend you care about. We go deeper on the privacy side in what is cookieless tracking.

How do you add a visitor counter to your website?

  1. Pick a tool that counts unique visitors and filters bots. See our list of free website analytics options.
  2. Paste the script in your site’s shared layout, before the closing </head> or </body> tag, so every page has it.
  3. Load it with defer so it never blocks your page from rendering.
  4. Visit your own site and check that the hit appears.
  5. Exclude yourself if the tool supports it, so your testing doesn’t inflate the count.

With Indiehacker Studio, step two is one line:

<script src="https://indiehacker.studio/s.js" defer></script>

The project is recognized from your verified domain, so there’s no key to paste. Counting works on static sites, WordPress, Webflow and single-page apps alike.

Can you see live visitors?

Yes, most modern counters show how many people are on the site right now, usually defined as browsers active in the last few minutes. A live count is most useful on launch days: post a link, then watch whether visitors arrive and whether they stay on more than one page.

Indiehacker Studio shows live visitors per project and across all your projects on one screen, which helps if you run several sites. We wrote about that setup in running several side projects from one dashboard.

A raw visitor count goes up and down without telling you why. Read it with three companions:

  • Sources: which referrer or UTM campaign sent the visitors.
  • Top pages: whether they landed on your home page, a blog post or your pricing.
  • One conversion: how many of them signed up or started a trial.

That turns a counter into the smallest useful version of web analytics.

FAQ

Is a website visitor counter free?

Several are free, including Cloudflare Web Analytics, GoatCounter for reasonable public use, and Indiehacker Studio’s free plan for one project and 10,000 pageviews a month.

Not necessarily. Counters that set no cookies and store no personal data avoid most of the reasons for a banner, but the rules depend on your jurisdiction, so check your own situation.

Why is my visitor count different in two tools?

Tools count unique visitors differently, filter different bots, and get blocked by different ad blockers. Some gap between tools is normal. Pick one and compare it with itself over time.

Do counters count bots?

Good ones filter known crawlers by user agent. Some bots still slip through, which is another reason a 30-day trend matters more than a single day.

Count your visitors in two minutes

Indiehacker Studio counts unique visitors without cookies, shows live visitors, and adds a chat bubble to the same script, with Stripe revenue on Pro. Start free with one project, or see pricing for every app you run.

One script. Every project.

Start free

More in Analytics

Free · Pro $12/mo or $120/yr See the plans

Contact support

We reply by email, usually within one business day.