Direct Visitors – RUGA pt. 7 | Cardinal Path Blog
Blog

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 VKI Studios 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 direct visitor? The standard response is that its 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

This entry was posted in Technology, Web Analytics and tagged , , . Bookmark the permalink.

Copyright © 2016, All Rights Reserved. Privacy and Copyright Policies.