How do I track multiple Google Analytics profiles on one page and across multiple domains?

jay28lee used Ask the Experts™
I have a Google Analytics account with with multiple profiles each for one domain.

Looking at suggestion tracking multiple accounts on a single website.

If I were to track the combined traffic/report for all the website across different domains, how do I modify the tracking code to work with this situation?  Is it the _setDomainName() I'll have to play with?  How?

Should I create another profile under the same account?  Or simply create another account with a new profile?

Analytics has a 5 million pageviews per month limit, and my primary account is linked with an active AdWords account to overcome the limit.  If I were to create a second account, does it have the 5 million pageviews restriction and need another active AdWords account?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Tony McCreathTechnical SEO Consultant

It's back. Sorry about that


yes, it was quoted from your previous related posting.

let me know if you know how to make implementation of cross domain settings.

OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Tony McCreathTechnical SEO Consultant

I've not played with _setDomainName() but I suspect you don't have to do anything.

You can use the same profile and code over multiple domains then split out the domains via the Content->Hostname dimension.

If you want a profile per domain then you could create alternate profiles on the "existing domain" and add a filter to include only from a specific domain name.


using same profile on multiple domains is it going to double count the the traffic?

profile1 on site A and B
profile2 on site A and B

isn't both profile1 and profile2 going to contain tracking stats for site A and B?

should i use a profile3 on both site A and B to collect combined data?

if that's the case, should I create a sub-profile under a site, or create a new profile, or even new account?
Technical SEO Consultant
I would suggest:

Create profile 1 and add its code to all sites and domains

Create profile 2 using the "Add a Profile for an existing domain" option and select profile 1. Then add a filter to that profile that only allows tracking for a specific domain

Repeat for each single domain you want a profile for.

So in the end you only need one set of tracking code and one account number. You then re-use it in different profiles to get different views of it.

The way they refer to domains, hostnames, sites etc. is quite confusing.


I can now track the combined traffic, but I come cross another issue when displaying the reports.

I followed the instruction on the Google Analytics help for creating a filter as below:

4. By default, the data in your reports will only include the Request URI and not the domain name. If you'd like to see the domain names in your reports, you can create an Advanced filter for your profile with the following settings:

Filter Type : Custom filter > Advanced
Field A : Hostname Extract A : (.*)
Field B : Request URI
Extract B : (.*)
Output To : Request URI
Constructor : $A1$B1

When I click on the "Content Overview" and "Top Content", it's showing "/" for all my tracking domains combined.  I still can't distinguish which domain is it from.

I can manually select the the drop down menu and choose "hostname" to see them, but isn't the "Advanced filter" set/associated with the profile should append hostname and request URI for me in the report?


Never mind my above comment, it did work.  Just that Google Analytics is taking nearly an hour to take effect of my newly configured filters.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial