3

My main web site is using www.site.com URL and I have a bunch of subdomains (blog.site.com, docs.site.com) that I want to track as the same Google Analytics property.

I use analytics.js which according to Google docs doesn't require any additional configuration to track subdomains:

ga('create', 'UA-XXXXX-Y', 'site.com');

My default URL in Google Analytics Property Settings is set to www.site.com as shown below, however I don't get any data from subdomains.

Do I have to change the default URL to site.com (it gets redirected to www.site.com)?

enter image description here

  • Must integrate google analytic script into any web pages to follow, even if the docs blog pages. – user61796 Mar 11 '16 at 17:28
  • In case you are using different content management system for your root domain (site.com) and sub-domain (blog.site.com), you will need to install the GA script on both sites / systems. – JeeShen Lee Nov 11 '17 at 2:32
2

The Default URL setting is used only in reporting and does not impact the data being collected. To see your subdomains, you need to add a Hostname secondary dimension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.