I have a number of sub-sites operating under the same domain. I would like to track the stats and analytics with Google Analytics, but have each sub-site appear on its own. My site structure looks similar to this:

Parent Site:

Sub Sites

I can install a separate tracking code for each of the sub sites, or use the same one as the parent site. At the moment, I have one tracking code being used across all of the sites, and it becomes tedious to start filtering the stats of each particular sub-site.

Would it be best to get a new tracking code for each sub-site or is there any clever way to keep them under one profile but have their stats displayed individually?

6 Answers 6


It's probably best to keep them under one profile to enable you to track bounce rates and internal traffic between the sub domains easier.

Take a look at Advanced Segments and filters for separating your data.

There is also some more useful info here and here.

Hope this helps.


After playing around with a lot of the options the simplest solution that worked for me was actually quite easy using advanced segments. I will just list it here in case anyone else is looking for it.

  1. Click on Advanced Segments
  2. Create a custom segment
  3. From the dimensions, select "Page"
  4. Under condition, select "contains"
  5. Under the value field, add the subdirectory name.

This seemed to work fine for me, though YMMV...

Thanks to Whitingx for pointing me in the right direction!

  • Glad I could help.
    – Whitingx
    Nov 16, 2010 at 11:25

Some things to keep in mind:

  1. Tracking subdomains, as referencing in links provided by Whitingx, is a different matter than tracking subdirectories within your website, and requires changes to your GA tracking code. Filtering for directories does not.
  2. Using the Advanced Segments method mentioned by Mozami will not necessarily isolate the subdirectory you are segmenting on, as it will filter for visits that included—but were not limited to—the designated subdirectory. If visitors visit the designated subdirectory, but also visit other areas of the site, you will see the other pages in the Content reports.
  3. Using Content Drilldown, as suggested by Thomas Murphy will enable you to isolate traffic to the specific subdirectory and drill into it, but it won't enable you to get information at the visit level, such as visitor characteristics, etc.

Typically, the best approach for solving the original question and separating stats by subdirectory is to:

  1. Create new profile for each subdirectory that you want to isolate
  2. Apply pre-defined filter to that profile that includes only traffic for the subdirectory.
  • this is the best answer to this question. Profiles are limited to 50 per web property is also something to be cognizant of.
    – mmundiff
    Jan 24, 2013 at 23:25

I did this using ContentSite contentContent drilldown → then click on a path.

Also, you can export to Excel using the export tab just underneath the orange bar at the top of the page.


You can set-up content groupings using a rule that filters out all different subdirectories. You can create content groups under "Views" in the admin menu. So create you can create content group "product A" with the rule that if the page contains "/productA" it belongs to this content group. You can then select that subdirectory as a primary dimension in all "Site content" reports.

The big advantage over "segments" is that this actually only takes in account data from those pages, sessions that where a visit to those pages we're made.

The advantage over using the content drilldown is that it is easily accessible in all "content"-reports.


Just in case you don't want to configure filters, you can still use advance segments in 2 steps:

  1. Include traffic for folder you want to track
  2. Exclude traffic for all the other pages except the folder

This should show up correct data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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