Join Our Newsletter!

Keep up to date with our latest blog posts, new widgets and features, and the Common Ninja Developer Platform.

Visitor Counter: How to Add One and When Not To

Sergei Davidov, · Updated Aug 12, 2026

Summary (TL;DR): What a website visitor counter counts and what it cannot, the difference between hits, visits and unique visitors, why the classic counter disappeared and where it makes sense again, how bots and refreshes inflate the number, what to display, where to place it, the privacy limits, and how to add one without any code.

Visitor Counter: How to Add One and When Not To

The visitor counter is one of the oldest things on the web and one of the easiest to get wrong. Most guides tell you how to add one. Very few tell you whether you should, which is the more useful question, because a counter is the rare widget that can actively work against the page it sits on.

The mechanics take about three minutes. The judgement takes longer: what the number actually means, why it is probably higher than your real audience, what happens when it is small, and where on the page it belongs.

This guide covers both, in that order, and it is deliberately honest about the cases where the right answer is to leave it off.

What a Visitor Counter Actually Counts

A counter shows a number to your visitors. That is its entire job, and it is what separates it from analytics, which shows numbers to you. The two are often confused, and the confusion leads people to expect a counter to answer questions it was never built for.

Depending on the tool, the number is one of:

  • Total visits since you installed it. The classic. It only ever goes up, and it starts at zero on the day you add it, which surprises people who expected their site history to appear.
  • Visits today. Resets daily. Honest about being a snapshot, and it looks alive.
  • People online right now. The most persuasive version when the number is healthy, and the most damaging when it is one.
  • A custom window. This week, this month, since a launch date.

Choosing between them is not a cosmetic decision. It is the decision, and most of this article is really about it.

Hits, Visits and Unique Visitors Are Three Different Things

These words get used interchangeably and they are not interchangeable. If you understand nothing else about counters, understand this, because it explains why old counters showed impossible numbers.

TermWhat it countsWhat inflates it
HitA single request to the serverEvery image, stylesheet and script on the page counts as one
Page viewOne page being loadedRefreshes, and someone moving between pages
Visit or sessionOne person's continuous activityReturning later the same day can start a second session
Unique visitorOne person, counted onceThe same person on a phone and a laptop is two

The nineteen nineties hit counter counted hits, which is why a modest personal page could claim hundreds of thousands of them. Nothing was being faked. The unit was just close to meaningless, and everyone eventually worked that out.

A counter that does not tell you which unit it uses is one to avoid. It is the first thing to check and it takes ten seconds.

Why the Classic Hit Counter Disappeared

Counters were everywhere and then, quite suddenly, they were not. Three things happened at once.

Real analytics arrived and was free. Once anyone could see accurate private numbers, a public approximate one lost its purpose as a measurement tool. It survived only as a statement, which is a much narrower job.

The numbers became embarrassing. As the web grew, a counter reading 214 stopped looking like a milestone and started looking like a warning. Sites quietly removed them rather than advertise the figure.

They were tied to a look that aged badly. Odometer graphics, visible borders, a script from a third party that eventually went offline and left a broken image. The counter did not just fall out of fashion, it often literally broke.

None of those problems are inherent to the idea. Two of them are solved by better tooling, and the third is a design choice. Which is why counters have quietly come back in specific places.

Where a Counter Earns Its Place Today

There are four situations where a public number does real work.

A busy page where activity is the selling point. A live event, a launch, a shop during a sale. "Forty seven people are viewing this right now" tells a hesitant visitor that they are not alone, which is the oldest and most reliable form of social proof there is.

A personal site or portfolio where reach is the credential. A visible total tells a recruiter or a client that people find your work. Here the number is a reference, not a sales tactic.

Building in public. Founders, newsletter writers and indie makers publish their numbers deliberately. The counter is part of an argument they are already making, and it reads as confidence rather than decoration.

The retro web, on purpose. Neocities, Blogger, Tumblr and personal homepages have revived the counter as an aesthetic choice. Nobody there believes the number is meaningful. It is a reference to an older internet, and taking it literally misses the point entirely.

Where a Counter Quietly Works Against You

This is the part most guides skip, and it is the reason to think before installing.

Social proof runs in both directions. A number that says a lot of people are here is persuasive. A number that says almost nobody is here is more persuasive still, in the wrong direction, and it is right there in the layout where a visitor cannot miss it.

The specific traps:

  • A new site with a live counter. "2 people online" on a page asking for a purchase does more damage than no counter at all. Nothing about the product changed; the page just told the visitor they are alone in the shop.
  • A total that has barely moved. A counter installed a year ago showing a four figure total makes the site look abandoned, even when it is not.
  • A counter next to a price. Anywhere the visitor is deciding whether to trust you, a weak number lands hardest.
  • A counter on a page that gets seasonal traffic. It will look busy for a month and deserted for eleven.

The test is simple and worth being honest about: would you be happy for a stranger to judge the site by this number today? If not, either display a different measure, or leave it off until the answer changes.

A Counter Is Not Analytics, and Should Not Be Treated as One

Analytics answers where people came from, which pages they read, where they left, and what they did. It is private, detailed and built for decisions. A counter shows one public number and answers none of those questions.

Confusing the two leads somewhere predictable: someone installs a counter, watches the number instead of their analytics, and makes decisions on the least informative figure available. If you want to know whether your site is working, look at what people do once they arrive, not at how many arrived. Our guide to website engagement rates covers the numbers that actually answer that.

Run both if you like. Just be clear which one is the instrument and which one is the message.

How Visitor Counters Work Under the Hood

Worth a minute, because it explains the accuracy limits and the privacy question at once.

There are two approaches. Server side counting happens when your server records each request. It catches everything, including visitors who block scripts, but it also catches every bot, and it cannot easily tell one person from another.

Client side counting happens when a small piece of JavaScript on the page reports a visit to a counting service. It can tell repeat visitors from new ones and filter obvious automation, but it misses anyone who blocks scripts.

Almost every embeddable widget uses the client side approach, which is why the number is an approximation. It is also why a counter cannot show your historical traffic: it only knows about visits that happened after it was installed. There is no way to import the past into it, and any tool claiming otherwise is inventing a figure.

Bots, Refreshes and Why the Number Looks High

If your counter is running well ahead of what your analytics reports, nothing is broken. Several ordinary things inflate it.

  • Automated traffic. Search crawlers, uptime monitors, link previewers and scrapers all request pages. Some counters filter the obvious ones and none of them filter all.
  • Your own visits. Every time you open your own site to check something, you may be counting yourself. Over a month of building a page, that adds up.
  • Refreshes. Depending on how the tool defines a visit, a reload can be a new one.
  • Preview and unfurl requests. Paste your link into a chat app and something on the other end fetches the page to build a preview card.

None of this makes a counter useless. It makes it a rough signal, which is fine as long as you are not quoting it as a fact. If you plan to publish the number as a claim about your audience, use your analytics figure instead.

A quick sanity check is worth doing once, a week after you install it. Compare the counter against the same period in your analytics. If the counter is running two or three times higher, it is almost certainly counting automated traffic that your analytics filters out, and you now know roughly what multiple to mentally divide by. If it is running lower, something is blocking the script for a portion of your visitors, which is also useful to know. Either way, do the comparison once and write the result down, because the gap will be stable and you will not want to work it out again in six months.

Choosing What to Display

The single most consequential setting, so match it to your situation rather than accepting the default.

Show thisWhen it worksWhen it backfires
Total visitsEstablished sites, portfolios, anything with historyNew sites, where it will sit near zero for months
Visits todayActive sites with steady daily trafficQuiet weekends and holidays, visible to everyone
Online right nowEvents, launches, sales, genuinely busy pagesAlmost everywhere else, most of the time
A custom windowSince a launch, or this month, when that frames it bestWhen the window is obviously chosen to flatter

A useful rule: pick the measure that is true and looks best today, then check it again in three months. A counter is not a set and forget element, and the setting that suited a launch will not suit the quiet period after it.

Where a Counter Belongs on the Page

Placement decides whether it reads as confidence or as clutter.

The footer is the traditional home and still the safest. It is visible to anyone curious, invisible to everyone else, and it commits to nothing.

Near the thing it supports is where it does the most work, and where it carries the most risk. A live count beside a signup form or a product is genuine social proof when the number is strong.

In the hero only when the number is the argument. Building in public, a launch, a milestone.

Two things to avoid regardless of placement. Do not put a counter where the layout will jump when the number arrives; reserve the space. And do not give it more visual weight than your actual call to action, which is a surprisingly common mistake on personal sites where the counter ends up as the brightest thing on the page.

Design: Retro on Purpose, or Invisible

Counters tend to look like one of two things, and the failure mode is landing between them.

Deliberately retro. Odometer wheels, LCD digits, a visible frame. This works when the whole site is in on the joke. On a personal homepage or a Neocities page it reads as fluent rather than dated.

Deliberately plain. Your own font, your own colours, no border, sitting in the layout like any other text. This is what suits a business site, and the goal is that nobody notices it as a widget at all.

The unhappy middle is a default third party style that matches nothing on the page: a grey box with a different typeface, announcing that it came from somewhere else. If the tool cannot be styled to match your site, that is a reason to choose a different one.

Privacy, and What You Should Never Put on Display

A counter is a public element, so the privacy question is not academic.

Showing an aggregate count is uncontroversial. Nobody is identified by being one of a thousand visits. What is not acceptable is displaying anything that points at an individual: partial IP addresses, cities for a page with few visitors, browser fingerprints, or a live list of what individual people are viewing. Some older counters did exactly this, and a small enough audience makes a city name effectively identifying.

Two practical points. Check whether the tool sets cookies, because if it does it belongs in your cookie notice like anything else. And check what the provider retains, since it is your visitors' data being handled by a third party regardless of how small the widget looks.

Aggregate and anonymous is the standard to hold a counter to. Anything more granular on a public page is a liability rather than a feature.

How to Add a Visitor Counter to Your Site

The mechanics, which are the easy part.

1. Decide what it counts using the table above. Do this first, because it is the decision that matters and it is the one people skip.

2. Pick the tool. On WordPress that can be a plugin. On Squarespace, Wix, Google Sites, Carrd, Blogger, Notion or anything else that accepts an embed, it will be a widget that gives you a snippet. The embed route also means the same counter works if you move platforms later.

3. Style it before you place it. Match the font and colours to the page while you are still in the editor, rather than pasting it in and hoping.

4. Paste the snippet into the page, or into a custom HTML or code block on a site builder. On builders, use the code block rather than the rich text editor, which will escape the snippet and show it as visible text.

5. Check it on a phone and confirm the layout does not shift when the number loads.

6. Come back in a month and ask the honest question: does this number make the site look better or worse? If worse, change what it displays or remove it. That review is the step everyone forgets.

The visitor counter widget follows this flow and runs on the common builders without a plugin, which is the practical difference on platforms where you cannot install one.

What "Free" Usually Means

Most counters advertise a free tier, and the limits sit in predictable places. It is worth reading them before the counter is part of your design rather than after.

  • A badge or a link back to the provider, which on a business site may not be acceptable.
  • A cap on monthly views, after which the counter may stop updating or stop displaying.
  • Limited styling, with your own colours and fonts on the paid tier.
  • No history, so if you ever move tools the number starts again at zero.

That last one is worth planning for. A total visits counter accumulates value the longer it runs, and switching providers resets it. If the total is going to be part of how the site presents itself, choose the tool you intend to keep.

Common Mistakes

  • Installing it before there is anything to show. The most common one, and the most costly. A counter on a day old site is a public statement that nobody has been here.
  • Showing "online now" on a quiet page. The most persuasive measure when it is strong, the most damaging when it is not.
  • Treating the number as truth. It includes bots, your own visits and link previews. Do not quote it in a pitch.
  • Letting it shift the layout. Reserve the space so the page does not jump when the number arrives. This is also the kind of thing that affects how fast a page feels, separately from how fast it is.
  • Leaving it unattended for years. A stale counter is worse than none, and nobody ever remembers to look at their own footer.
  • Choosing a provider that might disappear. The broken counter image is the defining artefact of the old web for a reason.

So Should You Add One?

Add one if your number is genuinely good, if reach is part of your credibility, or if the retro look is a deliberate part of the design. In those three cases a counter is a small, cheap piece of proof that works while you are asleep.

Leave it off if the site is new, if the traffic is seasonal or thin, or if the page is trying to sell something to a hesitant visitor. In those cases the number is doing the opposite of what you hoped, and it is doing it in public.

And whichever you choose, decide it again in a few months. A counter is one of the few elements on a page whose value changes entirely without anybody editing it.

The same set-and-forget logic applies to the other number you might put on a page: a count up timer runs forward from a date that has already happened and never needs touching again, as long as the start moment is right. And if you would rather show proof than a figure, a before and after slider does it with evidence the visitor can check.

Sergei Davidov

Sergei Davidov

Sergei Davidov is a Growth Manager at Common Ninja with nearly a decade of experience spanning content strategy, SEO, conversion optimization, and business development. He's helped launch products, optimize funnels, and build marketing systems across e-commerce and SaaS. When he's not dissecting funnel metrics, he writes fiction and experiments in the kitchen.

LinkedIn

FAQ

A small display on a page showing how many people have visited, either in total, today, or right now. It is a public number, meant for your visitors to see. That is the whole difference between a counter and analytics: analytics is a private tool for you, a counter is a message to everybody who lands on the page.

A hit is a request to the server, and a single page can produce dozens of them because every image and script is its own request, which is why old hit counters showed absurd numbers. A visit, or session, is one person's continuous activity on the site. A unique visitor is one person counted once no matter how often they come back. Any counter worth using should tell you which of the three it is showing.

Directionally, not precisely, and honest tools admit it. Automated traffic inflates the number unless it is filtered, one person on a phone and a laptop can be counted as two, and someone who blocks scripts may not be counted at all. A counter is a rough public signal rather than a measurement, and if the exact figure matters to you, that is a job for analytics.

Only if loaded badly. A counter is a tiny amount of data, so the cost is the request itself rather than its size. Load it after the page has drawn rather than blocking on it, and make sure it reserves its space so the layout does not jump when the number arrives. Those two habits cover almost all of the impact.

No, and it is worth saying plainly because plenty of pages imply otherwise. Search engines do not read your counter and it does not affect ranking. It can affect whether a visitor stays and trusts the page, which matters for entirely different reasons, but treat any claim of a direct search benefit as a reason to distrust the source.

Use an embeddable widget: configure what it counts and how it looks, then paste a single line of code into your page, or into a code block if you are on a site builder. The visitor counter widget works that way and runs on the common builders without a plugin, which matters on platforms like Google Sites or Carrd where you cannot install one.