Integration Guides

Subdomains and multiple domains

Track your domain and its subdomains as one site, or keep them apart.

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 subdomainsAdd 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 subdomainsSame as above: one site for the root domain
A separate dashboard per subdomainAdd each subdomain as its own site, each with its own snippet
Separate tracking for products on different domainsAdd 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

  1. Add your site with your root domain, for example example.com.
  2. 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.com from an ad and signs up on app.example.com is 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 on app.example.com is recognised on www.example.com as well. In cookieless mode, visits continue across subdomains on the same day.
  • Links between subdomains aren't outbound clicks. A click from www.example.com to app.example.com is internal navigation, not an outbound_click.
  • Consent applies everywhere. The visitor's choice is stored on example.com too, 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.