Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We currently have Analytics tracking codes running throughout our site including our Sub Domains.

What I would like to do is create different Profiles under the same account segmenting the sub domains by means of filters.

Currently I am just excluding the hostname of the main website by using the following custom filter:

Exclude: Hostname Filter pattern: ^*)

I know this isn't the proper method of doing this though and have some of the main domains links coming through in the data.

Ideally I would just like to include anything from:

Any help would be greatly appreciated.

share|improve this question

migrated from Jan 24 '11 at 12:59

This question came from our site for computer enthusiasts and power users.

Could you clarify? Do you want to be able to do a report of all data and one report per sub domain? – RandomBen Jan 24 '11 at 13:31

2 Answers 2

Try this:

Where you would modify

_gaq.push(['_setDomainName', '']);


_gaq.push(['_setDomainName', '']);

The profile for each subsite could us a custom filter on hostname to show only traffic to the subsite.

share|improve this answer

Using _setDomainName overwrites the hostname - which means that you can no longer distinguish which subdomain the visit came to.

More specifically and would both be tracked as a visit to

Perhaps I mis-understand the question, but it sound like what you are wanting is straight-forward - a separate profile filtering traffic for each sub-domain.

Try this:

Custom Filter Include: Hostname Filter pattern: sub\.domain\.co\.za

share|improve this answer
"_setDomainName overwrites the hostname" where is this documented? I've seen solutions to this problem similar to the other answer, which also use a hostname filter, but that would not work if this statement is correct. – roryf Oct 19 '12 at 10:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.