If you want to track the data of sub domain for your site, you needto be made to the initial Google Analytics tracking code. A sample for subdomain tracking code is given below.
Minor Change in below code from:
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-xxxx-x";
urchinTracker();
</script>
to
<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-xxxx-x";
_udn="example.com";
urchinTracker();
</script>
The primary domain should replace example.com.
2 comments:
What would happen if you only placed the modified on code on pages on the subdomain, but left the un-modified code on all pages on the main domain?
pages contained un-modified code will not tracked by analytics.
Post a Comment