Google Analytics Code track two site

Google Analytics multiple site acculated report

If you want to track all of your sub-domain site for the overall Google Aanlytics report. see below.

Sample: The following example first uses the default tracker, and then creates and uses another tracker (arbitrarily called t2).

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-65432-1']);
_gaq.push(['_trackPageview']);

_gaq.push(['t2._setAccount', 'UA-65432-2']);
_gaq.push(['t2._setDomainName', 'foo.com']);
_gaq.push(['t2._trackPageview']);
Reference from:http://code.google.com/intl/zh-TW/apis/analytics/docs/gaJS/gaJSApi_gaq.html