Visits and Visitors – RUGA pt. 8

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.12.10.1305922281266

  • 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.

Kent Clark

Some have compared him to the Dalai Lama, others to Kublai Kahn. When he isn't teaching third world children how to purify water with nothing more than a plastic bottle and a garden hose, he is creating mad waves for surfers off the west coast with little more than a paddle. Some say there is a boat involved, others that he walks on water. Little is known about his background. he appeared from nowhere 15 years ago and claims heritage from a land with neither want not need. He makes little comment, stating only that it was a pretty cool place. Fire does not burn him, cold does not hurt him. Words could... but they don't. When he passes, pedals fall off branches. When he speaks, hair tugs at skin, pulling just slightly in his direction. He does not sleep but he does dream. He has muscled his way into the lives of the famous and whispered his way into their hearts. And in the wee hours he plays oboe softly, as if to sooth the night to sleep.

Share
Published by
Kent Clark

Recent Posts

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

6 days ago

Understanding Funnel Reports in GA4

Funnel reports have long been one of the most actionable reports in a marketing analyst’s…

1 week ago

GA4 Monetization Reports: An Overview

GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…

2 weeks ago

This website uses cookies.