I have a site which consists of mydomain.com (and URLs derived from it such as mydomain.com/the/rest/) and some subdomains like first.mydomain.com and second.mydomain.com. Right now, I'm using the same Analytics' snippet of code in all of the site's pages.
The problem is Google Analytics shows me mydomain.com and .mydomain.com as referrals, but it seems the visits are counted for all.
So I guess I have two options, none of them I know how to achieve:
Make Analytics understand that mydomain.com and all the .mydomain.com are all part of the same site, so it doesn't count links between them as referrals.
Isolate mydomain.com and all the .mydomain.com so I can have stats for each of them separately.
How can I achieve each of those options and which one you think is more appropriate?
Thank you.