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

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.