September 26, 2006
Tracking Multiple Domains
Justin Cutroni has yet another great series of articles over at his blog, all about common Google Analytics configuration mistakes. His most recent post discusses third party domains, and getting Google Analytics to track across them. As usual, it's well-written and very informative.
One thing that many people don't know, however, is that, by default, Google Analytics will track only the request URI of its tagged pages.
What's the URI, you ask? Take a look at the URL below:

You see that the part of the URL that is surrounded by red is "/index.htm". So, when a visitor hits the page above, Google Analytics registers a unique visit to "/index.htm". Because the majority of Google Analytics profiles are focused on only one domain, the hostname (surrounded by blue) is ignored in the reports.
But what if you have two domains? And what if you have pages on both domains that have the very same URI?
We work with a client who wants to track visits across two of their domains. www.smithmountainhomes.com and www.smithmountainlakenews.com. Both of these domains have a default page called "index.htm". So, once tagged with the special Google Analytics JavaScript snippet required for cross-domain tracking, these two pages would begin to register views for the URI "/index.htm":

(Click the image above to view a larger version.)
These unique views would show up in Google Analytics aggregated into a single entry:
This is misleading data. We don't know which of those 371 unique views are attributed to each individual domain being tracked.
Fortunately, you can use an Advanced Filter to grab the hostname and insert it into your results:
Field A: Hostname -> Extract A: (.*)
Field B: Request URI -> Extract B: (.*)
Output To: Request URI -> Constructor: $A1$B1
Now both the URI and the hostname are being collected in your reports:
And you will be able to differentiate between the two pages very easily from within Google Analytics:
Need help tracking multiple domains in a single Google Analytics profile? Hire us to help you today.







