Stickybeak Docs Dashboard Get early access

Get started

Subdomains and multiple sites

Analytics for multiple websites starts with one Stickybeak site and ID per domain, all sharing one live wall. Subdomains stay part of their parent site.

One site per domain

Add each domain separately in Settings with Add a site, and use that site's own snippet on it. Each site gets its own card on the wall and its own site page, and the wall's top bar adds them all up.

A domain can only be added once across all of Stickybeak. If you see "already tracked in Stickybeak", someone has added it already; email hello@usestickybeak.com if it's yours.

Subdomain tracking

A site accepts visits from its domain and every subdomain of it. If you add example.com, the same snippet works on www.example.com, app.example.com and docs.example.com. Use the same data-domain="example.com" on all of them.

What you get:

  • One visitor across subdomains. The cookies are set on .example.com, so someone moving from your marketing site to your app is one visitor in one visit.
  • No self-referrals. Arriving from another of your subdomains doesn't count as a referrer, and links between them are internal links, not outbound ones.
  • One set of reports. Pages from every subdomain are listed together by path. /pricing on www and /pricing on docs show as one row.

www. is always ignored: www.example.com and example.com are the same site.

Tracking a subdomain separately

If a subdomain is really its own thing, say a separate product at shop.example.com, add it as its own site with that full domain. Then use its snippet there, with its own site ID and data-domain="shop.example.com". It gets its own card and its own reports.

Several different domains

Different domains are always separate sites. Visitors aren't followed from one domain to another: someone who visits example.com and then example.org is counted once on each. A click from one to the other is an outbound link on the first site and a referral on the second.

Staging and preview environments

Where staging runsWhat happens
A subdomain of your real domain (staging.example.com)Counted with your live site. Leave the tag out of staging builds, or add the staging subdomain as its own site and use its snippet there.
Another domain (a hosting provider's preview URL, a .test domain)The script runs, but its events are refused because the page isn't on your site's domain. Nothing reaches your dashboard.
localhostThe script doesn't run. See Localhost.

The cleanest setup is to include the tag only in production builds, for example behind an environment variable.

What data-domain does

data-domain tells the script which domain your site lives on. It must be there or the script won't run, and it should match the domain you added in Settings (the verify step warns you if it doesn't). A leading www. is ignored. The script uses it for two things:

  • Cookie scope. When the page is on that domain or a subdomain of it, cookies are set on the whole domain so they're shared by its subdomains. On any other address they're kept to that exact host.
  • Internal versus outbound links. Links to that domain or its subdomains are internal. Links anywhere else are counted as outbound_link.

It doesn't decide which visits are accepted. That's the domain registered for the site ID, so changing data-domain can't send a site's visits somewhere else.