Google Analytics Performance Tuning: “True” Direct

/


Howdy y’all; me here again to talk to you about “Direct” traffic. A few quick bullet points:

  • Direct or (direct) / (none) traffic isn’t “bookmark” traffic, it’s traffic whose source we cannot identify.
  • Many sessions that are actually Direct are re-labeled to the user’s previous session referring information instead.
  • … except in the Multichannel Funnel (MCF) reports, where they’ll be labeled as “Direct” instead, but sometimes these are not Direct.
  • And additionally, sometimes UTM parameters can rain on your parade, too.

This blog is a part of our Attribution series, so we’ll be sprinkling links to other posts throughout.

A Very Important Warning

This post covers tweaks and code necessary to overhaul attribution in the reports to something a bit more straightforward. Whether or not you should implement these changes will be a decision for you and your company. Even Analytics experts are divided are this topic; it is really a personal decision that depends largely on how you use the data or plan on using it.

Be warned: the changes I’m going to suggest are not for everyone; they’ll irreversibly change your Google Analytics reporting and data collection in very fundamental ways. Do not make these changes with properly considering the implications and discussing with your team. You’ve been warned.

1) Identifying Direct Traffic That Isn’t

Use campaign parameters, duh. If you don’t know what these are, this post isn’t for you. Seriously, get out of here. Here’s a blog post I wrote. Get it together.

2) Stop Campaign Inheritance

Campaign inheritance is what I call the session re-labeling “feature”. This is how Google Analytics handles figuring out traffic sources, something called “last non-direct click attribution,” Not familiar? Say a user clicks your AdWords ad and has a nice visit on your site. Later on, they’re feeling nostalgic (“Oh, honey, remember that parallax scrolling background! Yeah, with the scroll hijacking.”), so they come back, typing in the URL by hand.

You might expect their second session to be labeled as “(direct) / (none)” – nope, it’s “google / cpc”. Google Analytics figures that it’s more helpful to you as a marketer to attribute that session to the last non-direct attribution session they’ve got; that might have had something to do with this second session, after all, whereas “(direct) / (none)” is just a black hole.

For more information, head over to Becky’s post which goes into full detail about last non-direct click attribution.

If you’d prefer the session be labeled “(direct) / (none)” instead of “google / cpc”, you need to change the Campaign Timeout setting in the Property Settings to 0. This will tell Google Analytics to attribute each session independently of the last.

You can expect to see a greater percentage of your traffic attributed to the Direct channel after this change is made.

3) Fix Non-Direct Direct in the MCF Reports

As previously mentioned, MCF reports will attribute “Direct” traffic a little different. At first brush, it appears that sessions that were really direct (no referral/UTM parameters) are marked and treated as such in these reports, even as they’re attributed to their most recent non-direct attribution in the standard reports. This turns out to not be the case.

The reality is that sessions are marked as “Direct” when the session would have been attributed to the same campaign information as the most recent session for the user (remember: direct sessions are set to the most recent values, per above). isTrueDirect and the “Direct Session” dimension behave the same way. If someone comes via Google Search to your site twice in a row, the second session will be marked as Direct in the MCF reports, even though they used a search engine each time.

Good news! This is taken care of by changing the Campaign Timeout. Once set to zero, these reports will also show the real campaign information or Direct. Dust off your hands, you badass, you.

4) Fixing Errant UTM Parameters

UTM parameters are great, but sometimes they do undesirable things. For example, if I came to your site via a tagged link and bookmarked that page, every time I’d come back I’d register a new session attributed to that campaign. I might share that URL with a bunch of friends, who now all end up being attributed to that campaign, too (this might be desirable, from your perspective).

Add a hitCallback that will scrub campaign parameters from the URL after the user’s first page view.

Once the first page view has been recorded in Google Analytics, the callback here will clean those parameters out of the URL. This will keep the user from gunking up your data with them later on.


With all of these changes in place, you’ll get reports that are more literal in their interpretation of Direct traffic, with hopefully fewer visits marked as Direct, too.

Have questions? Sound off below.


This blog is a part of our Attribution series, check out all the posts in the series below:

Dan Wilkerson is a Software Engineer at LunaMetrics. Though really a Palmyra, PA expat, Dan insists he’s a “non-native” ‘Burgher. Approaching social early, then marketing, exigencies of native targeting soon entangled him in numbers. Dan is happy to have ended up living in Pittsburgh and (accidentally) as a self-taught and avid programmer.

  • Jared Peacock

    I like the errant UTM parameters fix, Dan. Where would this be applied? In a cleanup tag after the initial PV? Or is this a script that needs to be loaded only in certain circumstances?

    • Dan Wilkerson

      In the hitCallback field of your primary Pageview tag.

  • Buy Contact Lenses

    Very informative keep posting such smart articles, it extraordinarily helps to understand relating to things.

  • Danielle

    For removing utm parameters, I like to use a Tag Manager custom HTML tag to do a URL replacestate to remove query string parameters as soon as they’re set in Analytics. This way, even if the user only views the one page, they don’t have a chance to share a link with the parameters since they were removed almost instantaneously when they arrived at the site.

    • Dan Wilkerson

      Hi Danielle,

      Yes, this would also work – I prefer to use the hitCallback field, but a custom HTML tag would have the same effect.

      Dan

  • Reza

    I read another article from you about cross tracking and analytics, which all are great. But, I have a question unrelated to these topics, after new Safari update, I can see a lot of traffic is coming from r.ar1d.net under referral. Do you have any idea what can we do about this?

Contact Us.

LunaMetrics

24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us

1.877.220.LUNA

1.412.381.5500

getinfo@lunametrics.com

Questions?
We'll get back to you
in ONE business day.