The more you work with Google Analytics, the more obvious it becomes that it’s very easy to mess something up. Even when you think you’ve set everything up correctly, things can still go awry. Mistakes happen, and if something looks too good to be true, it probably is. Sometimes, figuring out what’s going on takes a bit of detective work. Recently, I came across a handy little Google Analytics feature that can help you get to the bottom of odd traffic patterns and clean up some of your reports. It’s called the hostname, and here are a few ways you can use it.
One of the most problematic features of Google Analytics is that it only shows the URI in reports. This is basically everything past the/ in a URL. So, under normal circumstances, you don’t get to see the full domain in your reports. This makes things ultra confusing when you’ve got subdomains on your site. Traffic to your main site’s homepage and your subdomain’s homepage will all show up like this: /. How do you know which is which?
One quick and easy way to solve this problem is to use the hostname report. This report will show all the domains (including subdomains) that use your Google Analytics code. You can access it by going to the Audience reports, clicking Technology, then Network, and choosing Hostname as the primary dimension. When you pull up the report, you should see your domain and all of your subdomains. You might notice a few other things in there, too, like translation services or global versions of your site. These are all perfectly normal. If you see something else, though, you might have a problem. I’ll get into that in just a minute.
I actually like to use hostname in conjunction with the standard traffic reports. I’ll navigate to the organic report, select landing page as the primary dimension, then choose hostname as the secondary dimension. This way, I can see how many visits to a specific landing page were on the primary domain and how many were on a given subdomain. Handy, huh? You can access the hostname in your traffic reports in the secondary dimension drop down under Behavior.
Pinpointing Traffic Issues
Back to what I was saying before about seeing something out of the ordinary in your hostname report… If you notice anomalies in your traffic reports, the hostname report is a good place to start investigating. Head over here to see if your Google Analytics code is being triggered on a site that it doesn’t belong to. This recently happened to me when I was doing some work for a client. I noticed that traffic was extremely high while doing some year-over-year analysis. So, I headed over to the hostname report and saw other sites listed there. I checked the source code on those other sites and, sure enough, my site’s Google Analytics code was listed on them as well!
I was able to get my numbers back to normal by creating an advanced segment that displayed only my site and its subdomains in my reports. For some tips on how to create these advanced segments and a few other ways you can use hostname, check out this Search Engine Watch article by Anna Lewis. It was written a couple of years ago, but it still has some really useful information.
Hostname is Your Friend
Hostname is one of the fastest and easiest ways to identify subdomains and pinpoint traffic problems on your site, so don’t forget about it when you’re exploring your analytics reports. Like I said, it’s easy for things to get a little wonky and, chances are, you’ll need it someday.
Have you used hostname to clean up your reporting before? How did it help you? Share your thoughts in the comments!