No stats information for subdomain

Hello

i create 2 websites e.g :

www.mydomain.com
www.subdomain.mydomain.com

in subdomain index.php file i insert the same tracking code but i only take stats for domain and not for subdomain.
What am i doing wrong?