Sign in

Analytics Help

Note: This article is for the traditional (ga.js) version of the tracking code. We recommend you update your tracking code to use the latest (asynchronous) version. For instructions on using the latest version, see this article.

In a Nutshell

You can track subdomains within the same profile as the domain. These are the basic steps:

  1. Set up a new profile that will track all domains together. Make sure to preserve a master profile that tracks only the top-level domain. In order to do so, you'll need to add additional lines to your tracking code for the top domain and the subdomains. Learn more about creating duplicate profiles.
  2. Use a filter on the profile to distinguish between sub-domains.
  3. Modify the tracking code for the domain and any sub-domains you want to track together.
  4. Set up your links and form posts between all domains.

These instructions are intended for situations where you have URLs like the example below that you want to track as a single entity:

  • www.example-petstore.com
  • dogs.example-petstore.com
  • cats.example-petstore.com

Please see Cross Domain Tracking on Google Code for instructions on all kinds of cross-domain tracking. Remember, if you are using the traditional snippet, use the ga.js code example.

Was this information helpful?

Learn from other users

Find answers, ask questions, and share your expertise with others in the Analytics help forum.

Tell us how we're doing: Please answer a few questions about your experience to help us improve our Help Center.