Cardinal Path’s response to COVID-19 Cardinal Path is sharing all we know to help marketers during COVID-19.  Learn more.

Last week we talked about direct visits, and explained that they were defined by the absence of a recorded external source. In hindsight (the perfect science indeed) I realize that I should also have specified something: when we talk about direct traffic we’re talking about direct visits. A lot of the basics of what was said are hard to understand without knowing just what a visitor is, and how they are defined.

This is such an important concept in analytics that I actually feel ashamed that I had not, until now, included this subject (at all) in my outline for this series.

As such I am going to take a break from our regularly schedule to do some explaining of what those silly metrics like visits are. Today, visits and their co-concept sessions.

How does GA Define a visit?

So what is a visit? Some one coming to see your website, right? A Session? The period of time where they are visiting. And what is a visitor? It is the some one who is coming to see your website. Simple, but again not.

Again we hit that ever present definition problem, but this time it’s because we really don’t have a well conceptualized definition for just what a visit is. A visit seems easy for us to conceptualize: Michael Stralker comes over for a game of Scrabble; he came for a visit. But what if he left to get beer, then came back. Is that another visit?

We might argue that a visit is based on the intent: if he left with the intent of ending his visit then came back later for another then it’s two visits. If he came, then went out to grab something to enhance his visit, it’s the same visit. This makes some sense.

Sadly we have to guess intent online.

To do this Google Analytics makes some pretty drastic assumptions about a visit, but for most sites they should be fairly accurate.

1) If a user closes their browser, a visit is over.
2) If a user hasn’t done anything in 30 minutes, the visit is over (though this can be changed, see _setSessionCookieTimeout())

So if a user goes away, then comes back (like Michael going to get beer) it’s the same visit. If the user goes away for half an hour (say, Michael goes to do some errands) then comes back, that’s a second visit. If the user closes their browser (say, Michael… uhh… goes into a coma?) then opens it again, new visit.

These two functions are governed by two cookies. 1) is handled by the utmc cookie, 2) by utmb.

utmb looks like this:


  • 24489125 = Domain Hash
  • 12 = Number of Pageviews in current session
  • 10 = countdown of outbound links clicked (to be honest I have no idea why)
  • 1305922281266 = timestamp of session start

utmc consists only of the domain hash.

That’s it right? Nope. utma actually played a roll here too as a “storage” cookie, recording the session time stamps and session numbers (aka. visits).

So some one visits your site, exits, comes back. What’s happening? At this point (if you’ve been following this series) you should be able to figure it out.

  1. Visitor visits site and executes javascript.
  2. utmb&c are written, a time stamp is noted, starting a session.
  3. Data is noted in utma, which is recorded in the utmcc call of the utm.gif request, and recorded by google.
  4. Visitor idles for 30 minutes, then clicks a link.
  5. By the end of the 30 minute span the utmb cookie has expired and a new one must be written, creating a new session.
  6. Visitor closes browser, utmc is erased.
  7. Visitor comes back, a new utmc cookie is created, a new session is started.

As with all cookie based tracking, the Achilles heel of this system is that when people clear their cookies it restarts the system, but that isn’t as big an issue as one might think given that they would likely be a microscopic percentage of users and we’re dealing with numbers in aggregate.

Thus a visit can be defined most accurately by the expiration of one of two cookies – utma or utmb – approximating the intention of a user who has left your site.