Search code examples
google-analyticsanalyticstrackinguniversal-analytics

Universal Analytics subdomain tracking


So far in the classic Google Analytics we just had to add parameter to tracking code like: _setDomainName('yourDomainName')

What method should I use with Universal Analytics to track traffic on my subdomains (landing pages) ? Do I have to use Linker plugin to achieve it?


Solution

  • You do not have to use any special setting (except that you have to add your domain name to the referral exclusion list in the property settings), Universal Analytics will track your subdomains regardless.

    Keep in mind however that the pageview reports track the path only - so if you have the same path on both the main- and subdomains (domain.com/page.html and sub.domain.com/page.html) the number for both will be added up in the reports. A common workaround is to add a view filter that add the hostname to the path (or you simply set hostname as secondary dimension, but that needs to be re-applied every time you look at the report).