Subdomain Tracking with Universal Analytics
Posted in — Oct 03, 2014
Since my original post about Subdomain Tracking with Google Classic Analytics, I've gotten many follow up questions about how to handle this for Universal Analytics. So without further ado:
Part A: Customizing The Code
Guess what? You don't have to customize the code anymore! Just use your standard Universal Analytics code. You can grab this from the Admin section:
It will probably look something like this. You may have this customized with other things, but unlike regular Classic Analytics, you won't need to add anything special for subdomain tracking.
Part B & C: Set Up Your Views & Filters
Go to my other blog post (Part B: THE PROFILES, Part C: THE FILTERS) that describes how to segment and filter subdomain traffic inside Google Analytics. The instructions are the same for both Classic and Universal Analytics.
*Part D: Extra Step: Tweak Your Referrer Data *
You can read more about referral exclusions here, but the last step is to exclude your domain as a referrer. This step is only relevant for Universal Analytics.
To do this, go to Admin => Property => Tracking Info => Referral Exclusion List
Click on "Referral Exclusion List", and add a new exclusion for yourdomain.com:
And that's it! If you're interested in configuring this for Universal Analytics using Google Tag Manager, see my follow-up post about this.