Tracking Google Analytics Goals Across Multiple Domains
Can you use Google Analytics to track goals across multiple domain names?
This is a problem that exists with Google Analytics. The solution is fairly easy – it involves customizing the tracking code a bit:
For domain2 and subdomains (for example, www.Yovia.com, Yugster.Yovia.com add the following tracking code:
Tracking code for domain2 and subdomains:
<script type=”text/javascript”>
try{
var pageTracker = _gat._getTracker(“UA-xxxxxx-x“);
pageTracker._setDomainName(“.domain2.com”);
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
} catch(err) {}
</script>
NOTE: If you are using 2 different domain names (ie: Yovia.com and Twitter.com) Call _link() or _linkByPost() in all links and forms between domain1 and domain2.
If this is not set correctly, your goals and funnel visualization in Google Analytics will not report properly.
