This article was updated February 3rd, 2014.

Our pricing is partially based on the number of monthly visits to your site, so we’d better have an accurate definition of “visits.” This is an interesting question anyway, because it’s one of the primary web analytics metrics. But, this is harder to define than it seems.

There are two fundamental questions:

  1. How should a “visit” be defined?
  2. How do you measure “visits” in practice?

Defining a “visit”

Let’s just write down some some events that we think should and shouldn’t be a visit:

  1. When a human being first arrives on the site and loads the page, staying there for 31 seconds, that’s a visit.
  2. If that same human then clicks a link and sees another page, that’s not a new visit; that’s part of the same visit.
  3. If that same human doesn’t have cookies or javascript enabled, still all that should count as one visit.
  4. If that same human loads the site with a different browsers, that’s still not a new visit; that’s part of the same visit.
  5. If that same human bookmarks the site, then 11 days later comes back to the site, that is a new visit.
  6. When a robot loads the site (like a Google or Bing search bot), that’s a visit, but if one robot scans 100 pages quickly, that’s one visit.  (You might disagree that a robot is a “visit,” but consider that from a hosting perspective, we still had to process and serve all those pages just like it was a human being, so from a cost or scaling perspective, bots count the same as humans.)
  7. If a robot scans 20,000 pages over the course of a month, that’s not just one visit.  It shouldn’t be 20,000 visits, but neither should it be 1. Something in the range of 100-1,000 visits is acceptable.
  8. There are additional cases too where the “right thing to do” is less clear. For example, take the case of a “quick bounce.” Suppose a human clicks a link to the site, then before the site has a chance to load the human clicks “back.” Does that count as a visit? Our servers still had to render and attempt to return the page, so in that sense “yes.”  But a human didn’t see the site and Google Analytics isn’t going to see that hit, so in that sense “no.” Because we need the notion of a “visit” to correspond to “the amount of computing resources required to serve traffic,” we round off in favor of saying “yes.”

So rather than attempting to write down an exact definition of a “visit,” we’ll just say that whatever it is, it has to be consistent with all the notions written above.

Exception: We do NOT count “image visits” towards traffic charges.

There’s a special kind of “visit” as defined above which we do NOT count towards your account.  This is a visit which hits only static content (usually an image), but doesn’t hit a normal page on your site.

This is common with things like not using a CDN, getting hot-linked, Twitter campaigns, and embedding images into email campaigns.  While this does represent real traffic to your site, and real cost on our side to serve it, we also appreciate that sometimes this is out of your control, and that it’s less expensive for us to serve static content than it is to serve dynamic content.

If you get a lot of this sort of traffic, we’ll reach out to you to understand what’s happening, and see if we can work together to create a solution that doesn’t involve so much traffic, such as enabling our CDN, getting you signed up for a service like CloudFlare, moving content to a content service like S3, and so forth.  But we won’t charge you extra.

Measuring a “visit”

This is where things get tricky.

It’s tempting to say “Whatever Google Analytics says is the ‘number of visitors’ in a month, that’s the number of visits in a month.” But it’s clear that this metric does not satisfy the definition above. GA doesn’t measure bot traffic or “quick bounces.” And GA would double-count the case of a human using two browsers or (sometimes) who has cookies disabled.

We also need something clear and simple so it’s trivial to compute and easy to analyze if it’s not behavior like we expect.

So we’ve settled on this metric:

We take the number of unique IP addresses seen in a 24-hour period as the number of “visits” to the site during that period. The number of “visits” in a given month is the sum of those daily visits during that month.

Does this satisfy the conditions above?

  1. Yes, because that’s an IP address.
  2. Yes, because that’s the same IP address, so it won’t be counted again.
  3. Yes, because we’re not using cookies or Javascript or any other feature of the browser.
  4. Yes, because it’s tied to the network, not the browser.
  5. Yes, because we reset our notion of “unique IP address” every day.
  6. Yes, because robots and humans are treated the same — both have an IP address.
  7. Yes, because robots have the same few IP addresses, so they will be consolidated within one day, but will count again the next day.
  8. Yes, because we’ll see the hit in our logs.

This does mean there’s some cases where you could theoretically argue we’re counting visitors too often. For example, a person visits a site from work, then drives home and visits the site again later that day.  That will count as two visits because the IP addresses will be different. But, we’d argue; (a) that doesn’t happen much, (b) it’s not terribly unreasonable for that to count as two visits, (c) those events are counter-balanced by times where we count only one visit where really it’s two.

As an example of that last point, what if two people in the same office visit a site from two computers? That should be two visits; even Google Analytics would count it as two. But we count it only as one because their IP addresses (from our perspective) are the same. So the cases where we count too few are counterbalanced — to the first approximation anyway — by those where we count too many, and therefore we think this is still a fair metric.