Web Analytics

Direct Visitors – RUGA pt. 7

Now we’re done with the specifics of how utm.gif requests are classified, we get to move on to the fun stuff. And today is the fun stuff let me tell you. Today we’re going to start looking at traffic sources by looking at what it means to be direct traffic.

I want to credit a lot of this post to a coworker of mine, Brian Katz, and his wonderful post on the Cardinal Path blog , Tips Tricks, Traps and Tools: #4.1 of many: Understanding Direct Visits in GA & Web Analytics : UDVs

Direct Traffic

What does it mean for a visitor to be a direct visitor? The standard response is that they typed the URL in, or entered via a bookmark. However, this definition is woefully inaccurate.

Google Analytics (and some other analytics tools) start with the presumption that direct traffic is traffic that does not have an HTTP referrer, but then they modify it (“muddy it” is how Katz puts it) with the UTMZ cookie so that visits that would normally be considered direct are considered “external” if they have a campaign tag attached or a referrer recorded from a previous visit. This is a good thing since you should distinguish between direct and external visits at times. However, it also gives new meaning to direct traffic: direct is when no external source is already recorded.

This means that from Brians post:

  • a visitor, whose last visit(s) were from external sources, returns directly. GA does not overwrite the traffic source cookie and the traffic source is still credited with the visit.
  • a visitor, whose previous visit was recorded as direct, returns via an external visit source will have their External Traffic Source cookie overwritten to record the (new) external traffic source.

utmz

The utmz cookie is often considered the “campaign” cookie.

Here’s a cookie from the Cardinal Path Blog:

113869458.1305319923.101.101.utmcsr=cardinalpath.com|utmccn=(referral)|utmcmd=referral|utmcct=/blog/disposable-printers-is-there-a-better-option

How do you read this? The first number is the domain hash, the second the time stamp, the third is the session number (101? Wow) and the fourth is the campaign number. Then, on the end, are some familiar looking queries, eh?

  • utmccn is the campaign value of the visit. In this case, referral.
  • utmcmd is the medium, again referral.
  • utmctr is the keywords (if there is one, there isnt here)
  • utmcct is campaign content
  • and sometimes you’ll get a utmgclid which defines your ad click ID.

Making traffic direct

Because of this definition, a lot of things that could be considered referrals can be considered direct instead. For instance, maybe a user types in your domain name into Google. Are these people ‘effectively’ searching for your domain, or should they be considered direct?

Well, you can use the_addIgnoredOrganic() to define people searching for a specific keyword as direct traffic.

From Google:

_addOrganic()
_addOrganic(newOrganicEngine, newOrganicKeyword, opt_prepend)

Adds a search engine to be included as a potential search engine traffic source. By default, Google Analytics recognizes a number of common search engines, but you can add additional search engine sources to the list.

parameters

String   newOrganicEngine Engine for new organic source.
String   newOrganicKeyword Keyword name for new organic source.
boolean  opt_prepend If true prepends the new engine to the beginning of the organic source list. If false adds the new engine to the end of the list. This parameter’s default value is set to false.

Katz provides the following option as well:

Identifying Direct Visitors
// before var pageTracker = _gat._getTracker…
var isDV = (!document.referrer) &&
(document.cookie.search(/(__utm[cb]=)/g) == -1 ||
document.cookie.match(/(__utm[cb]=)/g).length <= 1
);

// after  var pageTracker = _gat._getTracker and
// after  any pageTracker._set*() function calls …
if (isDV) pageTracker._setVar(‘Direct Visitors’);
That’s it.

The snippet checks that there is no referrer. If there is a referrer, this page is either not the landing page or the visit came from an external traffic source. So, the last 2 lines check that there are no visit cookies and confirms we are on a landing page. On subsequent pages there are referrers from the current site but the visit cookies would already have been set.

No UTM.gif report this time, as it doesn’t really matter

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…

4 days ago

Understanding Funnel Reports in GA4

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

6 days 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.