2

I would like to track a main domain in Google Analytics and also its multiple subdomains. But I would like each domain to have its profile, to be able to view every subdomain separately.

I made an account GA and its property. Then I made a profile for the main domain and created a rule to add domain name to the results:

  1. In the Profile Settings page, click the Add Filter link.
  2. Choose Add New Filter and provide the filter a name.
  3. Choose Custom Filter and select Advanced on the Filter type settings.
  4. Under Advanced settings: FieldA should be set to Hostname FieldB should be set to Request URI
  5. Set the values for both Field A and Field B to (.*), which is an expression that captures all characters.
  6. Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice.

Your reports will now show:

  • www.example.com/index.php
  • sub.example.com/more.php

It's tracking code is:

_gaq.push(['_setAccount', 'UA-12345-1']);
_gaq.push(['_setDomainName', 'domain.com']);
_gaq.push(['_trackPageview']);

Then I created another profile for the subdomain, where I set the same tracking code and also the same website's URL (http://www.domain.com) for every subdomain. Is this the right way to do so?

I also added a rule for all subdomains to include hostname:

givensubdomain\.domain\.com

Is it ok? I'm asking because I can see some online visitors in real time reports for both domains and subdomains, but I'm unable to see those when I look into the standart reports and set the date for today.

2

0

Browse other questions tagged or ask your own question.