How to install Google Analytics on a sub-domain and root domain
If you’re like me and you have your blog on a sub-domain (i.e. blog.yourdomain.com) then you’re probably wondering how you can track both your root domain (i.e. yourdomain.com) and your blog sub-domain in a single view or report inside Google Analytics.
I already wrote about whether or not you should combine or keep the domains on separate Google Analytics properties here in this blog post. I had originally setup my blog and root domain as separate properties in Google Analytics which gave me inaccurate data.
When researching how to set-up cross-domain tracking in Google Analytics I came across Google’s official documentation, which is always rather technical and not very easily understood.
I also came across a few blog posts that did a great job in confusing me even more. It didn’t help that each blog post I found had advice that contradicted the other.
I was ready to pull my hair out when I came across this video. He explains it in such a straight forward, simple manner that I was able to setup Google Analytics cross-domain tracking in a matter of minutes.
Go ahead and check out the video here and give it a shot! Just make sure to put the same Google Analytics tracking code (or Google Tag Manager container) on both your root domain and sub-domain first.Tweet