How subdomain tracking works
A subdomain is a name in front of your main domain: a shop, a blog, a booking system or a help centre living at its own address while still belonging to the same registered domain. Analytics treats these as one site as long as two conditions hold. The same measurement ID must be installed on every subdomain, and the cookie that identifies the visitor must be written at the level of the main domain rather than at the level of each subdomain.
Google Analytics handles the second part by default. The tag writes its cookie on the highest level of the domain it can, so a visitor who moves from the blog to the shop carries the same identifier and stays in the same session. Nothing extra needs configuring for the common case, which is exactly why the situations where it fails catch people out.
Why subdomain tracking matters
When it works, one journey reads as one journey: the visitor arrived from a search result on the blog, moved to the shop and bought, and the sale is credited to search. When it breaks, the same journey is recorded as two visits, the second one arriving from your own website, and the sale is credited to the blog instead of to the channel that actually earned it. Every channel report downstream inherits that error.
It also decides whether you can answer basic questions about how sections of the site work together — whether the help centre reduces cancellations, whether the blog feeds the shop — and those questions are usually the reason a subdomain existed in the first place.
Where subdomain tracking goes wrong
The most common fault is a subdomain built by a different supplier at a different time, carrying either no tag at all or a tag with its own measurement ID. Traffic then splits between properties and the join is impossible to reconstruct later.
The next is a platform that will not let you control cookie settings, which is typical of hosted booking engines, help desks and shop platforms on their own subdomain. If such a system writes the cookie only at its own level, the visitor is treated as new on arrival and you get a self-referral from your own domain.
A third is reporting confusion rather than collection failure. Without the hostname in your reports, identical page paths on two subdomains stack on top of each other and you cannot tell which one the traffic went to.
What to do about it
Start by listing every subdomain that exists, including staging sites and systems a department bought without telling anyone. Confirm each carries the same measurement ID, then walk the journey yourself between subdomains and check that the session continues rather than restarting.
Add hostname as a dimension in your key reports, or build a custom report grouped by it, so path collisions become visible. Where a hosted platform refuses to cooperate, list it as an unwanted referral so it does not overwrite the original source. If the subdomain is on a genuinely different registered domain, this is a different problem and needs cross-domain tracking instead. The choice between putting a section on a subdomain or in a folder also has search consequences, covered under subdomain vs subfolder.