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, 2016 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. Nov 11, 2017 at 2:32

1 Answer 1


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 and acknowledge you have read our privacy policy.

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