Issue tracking multiple domains with Google Analytics
        Posted  
        
            by 
                user359650
            
        on Pro Webmasters
        
        See other posts from Pro Webmasters
        
            or by user359650
        
        
        
        Published on 2012-11-16T15:55:26Z
        Indexed on 
            2012/11/16
            17:17 UTC
        
        
        Read the original article
        Hit count: 398
        
I have 2 domains mydomain.com and mydomain.net which I'm trying to track with the same GA code. Here are the options I turned on:
Subdomains of mydomain   ON
Examples: www.mydomain.com -and- apps.mydomain.com -and- store.mydomain.com
Multiple top-level domains of mydomain  ON
Examples: mydomain.uk -and- mydomain.cn -and- mydomain.fr
Which gave me the following code:
  _gaq.push(['_setAccount', 'UA-123456789-1']);
  _gaq.push(['_setDomainName', 'mydomain.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);
In this help page I read that _setDomainName must be changed for each domain
which I did:
-if you go to mydomain.net you get _gaq.push(['_setDomainName', 'mydomain.net']);
-if you go to mydomain.com you get _gaq.push(['_setDomainName', 'mydomain.com']);  
When I generate traffic on both mydomain.dom and mydomain.net and watches GA push requests made with firebug I can see requests generated for both domains and the parameter called utmhn has the proper domain value (which matches that of _setDomainName and the browser address bar).
However when I monitor the realtime statistics under Home->Real-Time->Overview I see pageviews for mydomain.net BUT NOT for mydomain.dom :(
What am I missing to properly track both domains?
PS: in the help page I mentioned they talk about setting up cross links which I didn't do for now as my understanding is that it shouldn't be needed to get what I'm trying to do to work. Also I want to mention that I do not have any tracking code for any of these 2 domains other than the one I mentioned.
© Pro Webmasters or respective owner