I have a WordPress multisite with two sites. One at the main domain, and one at a sub-domain. I have Google Analytics running on both sites, and it is turned on to track sub-domains. See screenshot:
I have this piece of javascript on each site in header.php:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'my-UA-code']);
_gaq.push(['_setDomainName', 'andy-warren.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
I'm getting data in Analytics, but I don't know how to differentiate between the domain and the sub-domain. Am I missing something in the settings or piece of tracking code? Or can I just somehow choose to see the domain or sub-domain in Analytics?