How to generate google analytic code for sub domain

Hello,

I want to generate Google analytic code for Sub Domain, can anyone guide me how to generate.

Thanks
Pritesh Bagwe

hi, you must log in account google. After, access http://www.google.com/analytics/. click manage -> create acc

I think Google Analytics generate same tracking code for a single domain or subdomain.but you need to configure and customize analytic properly.

No just make a new account for that domain. Or just add the domain to your existing account. Subs are considered separate sites

Put one new line code in your google analytics code.
_gaq.push([‘_setDomainName’, ‘yoursite.com’]);
You can also get this code if, in Google Analytics, you go to Settings -> Tracking Code -> One domain with multiple subdomains.
Add this code to all of your subdomains. There is no need to alter it for every subdomain.