Recipe for Spanning Multiple Domains
If your site includes the use of more then 1 domain you'll need to make some modifications to your tracking code. If you do not, you will likely lose all that valuable cookie data when the visitors crosses from one domain to the other. To avoid this 3 modifications are needed.
1) Modify the Standard tracking code by adding these 2 lines of code:
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-54321-0");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
} catch(err) {}
</script>
2) If you have any links that navigate to and from each domain modifications to the link code are required. Simply add the _link function to any links between domains.
Original Example
<a href="https://www.yoursite.com/register.php">Register</a>
Revised Version:
<a href="https://www.yoursite.com/register.php" onclick="pageTracker._link(this.href); return false;">Register</a>
3) If you are sending data across domains using forms the code will require a small modification.
<form action="http://yourdomain.checkout.com/form.cgi" onSubmit="javascript:pageTracker._linkByPost(this)">
Works with "post" "GET" methods.



