Server statistics count every file and every robot request; Analytics counts browsers that run its code on a page. Judge the website by Analytics visits and pages, and use the server's figures for bandwidth, robots and missing files.

Two counts for the same month

The manager of a kayak tour company in Tofino opens the statistics page in the hosting control panel. It reports 41,000 hits for August, the peak of the season.

Google Analytics reports 640 visits for the same month. She assumes one of them is broken, and wonders which to quote at the end-of-season meeting.

Neither is broken. They count different things in different ways, and a gap that size is normal for a small site.

What a hit is

A hit is one request the web server answers. Opening a page means asking for the page itself, then for every image, stylesheet, script and icon it uses, each a separate request.

A home page with a slideshow of eight photos, a logo, three scripts and two stylesheets produces fifteen hits or more for one person looking at one page.

The server records each request in its log, and the control panel's statistics program adds the log up, usually once a day.

Who else asks the server for files

People reading pages are only part of what the log records:

None of these is a person reading a page. Known robots can be set aside, but new and badly behaved ones slip through, and every request is still a hit.

What Analytics counts

Analytics starts from the other end. A short script on each page runs in the visitor's browser and reports the page view to Google, along with where the visitor came from.

Most robots never run the script, so they never appear, and images and stylesheets are not counted at all. Analytics records pages, grouped into a visit that ends after half an hour without activity.

Its numbers are smaller because they come closer to counting people.

Visitors counted by address

Server statistics also report visits and unique visitors, which look comparable to Analytics. They are worked out from the internet address making the requests, a rough stand-in for a person.

Everyone in an office or a hotel may share one address and count once. A phone moving between cell towers and Wi-Fi can change address several times in an afternoon and count several times.

Unrecognised robots add visitors of their own, so the server's visitor figure usually runs well above the one in Analytics, and it is not a count of people either.

A worked example

A photo restoration service works from a small studio in Duncan, repairing torn and faded prints and scanning family albums. Its website shows before and after pairs, about sixty images to a gallery page.

Over the summer the control panel's hit count climbed steeply while Analytics barely moved, and the restorer wondered whether the Analytics code had stopped working.

The log showed where the hits came from. Most were requests for gallery images from a busy hobby forum, where a member had posted several pairs loaded straight from the studio's server.

Another large share came from one robot copying the whole gallery every few days. Neither the forum's readers nor the robot opened a page of the site, so Analytics was right to ignore them.

The host blocked the copying robot, and the server was set to refuse gallery images requested from other sites. The forum member, asked politely, replaced the images with a link to the gallery.

Readers who follow that link arrive on a page where Analytics can count them. The images they used to load from the forum were never visits, only files.

What each figure is good for

Server figures answer questions about the server: how much data the site sends each month, which files are largest, which robots call and how often, and which missing files keep being requested.

They are the right numbers for choosing a hosting plan, spotting a robot that is overloading the site and counting brochure downloads, which Analytics misses unless set up for them.

Analytics answers questions about visitors: how many came, from where, which page they arrived on, what they read and where they left. Those are the questions to ask when judging the website.

Where Analytics falls short

Analytics misses some real people. A browser with scripts turned off or blocked is never counted, and neither is a visitor who leaves before the tracking code has run.

On older sites that code sits at the very bottom of each page, so a slow page loses its quickest exits from the reports. Moving it near the top narrows the gap.

Even so, it comes far closer to the number of people than any count of hits, and its gaps stay much the same from month to month.

Why hits mislead

Hits rise and fall for reasons unrelated to customers. A bigger slideshow multiplies them, a new robot can add thousands in a week, and combining scripts can cut them sharply without losing a single visitor.

A figure that moves whenever the design changes cannot show whether people are finding the business. Hits belong in conversations about the server, not in reports about customers.

The counter-case

For a site without Analytics, or one whose code was lost in a redesign, the server log is the only record there is, and it is much better than nothing.

Read its page views and visits rather than its hits, leave out the robots it recognises, and read the figures as a trend, set against the same month a year earlier.

Some questions the log answers better, such as whether search engines read the site at all. A proper report uses both, each for its own questions.

Figures for the end of the season

  1. Stop quoting hits in any report about visitors.
  2. Check that Analytics is on every page, booking pages included.
  3. Report visits and pages from Analytics, month by month.
  4. Open the server statistics for robots and missing files.
  5. Ask the host about any robot requesting thousands of pages.
  6. Look for your images loaded on other sites.
  7. Set each month beside the same one a year earlier.

Step two decides whether the Analytics figures can be trusted. A booking page left without the code after a redesign drops the most valuable visits from every report, without a word of warning.

Which version of the tracking code a site runs, and why it belongs near the top of each page, is set out in tracking code at the bottom of a slow page.


Frequently asked questions

What is a hit?

One request answered by the web server, for a page, an image, a stylesheet or a script. One person viewing one page can produce dozens of them.

Why does Analytics show far fewer visits than the server?

Analytics counts browsers that run its code on a page. Robots, images and requests for missing files never reach it, and the server counts them all.

Which figure should I use to judge the website?

Analytics visits and page views, compared month by month. They come closest to counting people, and they show where visitors came from and what they read.

Are the server's unique visitors real people?

Not reliably. They are counted by internet address, so an office sharing one address counts once, and a phone that changes networks can count several times.

What are server statistics good for?

Bandwidth, robots, missing files, your images loaded on other sites, and downloads such as brochures. They describe the server's work rather than the visitors' interest.

Does Analytics miss anyone?

Yes. Visitors who block scripts, or leave before the code runs, are not counted. The gap is fairly steady, so month-to-month comparisons still hold.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Visitor figures that never agree?

Let us look at both sets of numbers, and we will explain which belong in your reports and what the rest are telling you.

Start a Conversation