Subdomains and multiple domains
Many sites are spread over several subdomains, such as www.example.com, shop.example.com and app.example.com, or run on several domains, such as example.de and example.nl. How you set up Otus depends on whether you want to see them together or apart.
Which setup should I use?
| You want… | Do this |
|---|---|
| One dashboard for your domain and all its subdomains | Add your root domain (example.com) as one site and use the same snippet on every subdomain |
| Visitors, sessions and the original traffic source kept when visitors move between subdomains | Same as above: one site for the root domain |
| A separate dashboard per subdomain | Add each subdomain as its own site, each with its own snippet |
| Separate tracking for products on different domains | Add each domain as its own site |
One dashboard for several domains (example.de and example.nl) | Use the same snippet on each domain and filter by hostname (see below) |
One site for your domain and its subdomains
- Add your site with your root domain, for example
example.com. - Add the same snippet, with the same
siteId, to the root domain and every subdomain.
Otus then treats your subdomains as one site:
- Visits continue across subdomains. A visitor who lands on
www.example.comfrom an ad and signs up onapp.example.comis one visit, and the sign-up is attributed to the ad. Coming from one of your own subdomains doesn't count as a referral. - Visitors and users are shared. In full tracking, the visitor ID, session and user ID are stored in a cookie on
example.com, which every subdomain can read. A visitor who logs in onapp.example.comis recognised onwww.example.comas well. In cookieless mode, visits continue across subdomains on the same day. - Links between subdomains aren't outbound clicks. A click from
www.example.comtoapp.example.comis internal navigation, not anoutbound_click. - Consent applies everywhere. The visitor's choice is stored on
example.comtoo, so it holds on every subdomain.
Seeing subdomains separately
Your reports show all subdomains together. To look at one subdomain:
- Filter by Hostname, for example Hostname is shop.example.com.
- In funnels, use a Full URL step (
shop.example.com/checkout) when several subdomains share the same paths.
Only recording your own hostnames
Translation services, web caches and preview deployments can show your pages on hostnames that aren't yours. To only record visits to your own hostnames, add them to the Hostname allowlist in the Exclusions tab of your site settings. Each hostname is matched exactly, so list every subdomain you use, including www..
A separate site per subdomain
Add the subdomain itself as the site, for example blog.example.com, and use that site's snippet on it. Each site has its own cookies (they include the site ID, such as otus_123), so sites on the same root domain never share visitors, users or sessions.
Several domains
Browsers don't let one domain read another domain's cookies, so example.de and example.nl can't share visitors. You can either:
- Add each domain as its own site. Each gets its own dashboard.
- Use one site on all domains. Add the same snippet to each domain and use the hostname filter to view them separately. A visitor who visits both domains is counted as a visitor on each. Logged-in users are counted once if you identify them on both domains.
Linking anonymous visitors across separate domains (cross-domain tracking) isn't supported yet.