Skip to content
whovisited.

Website setup · Analytics operations

One analytics site or two? Configure website origins without splitting reports

Learn when www, an app subdomain, or a second domain belongs in one WhoVisited website, and when separate sites keep reports clearer.

A website record and a browser origin are different things

If your company serves a site at example.com and www.example.com, it is tempting to create two analytics websites. That can split the reports you expected to read together and use another website slot. In WhoVisited, a website record has its own site ID, settings, and reports; its Allowed origins list controls which browser origins can send events for that record. The current workspace limit is two website records, while one record can have up to 20 allowed origins.

Think of the website record as the reporting bucket and an origin as a browser address boundary. An origin is the scheme, hostname, and port. A path such as /pricing is not part of it. Two hostnames or ports can therefore be different origins even when they belong to one product.

For a normal marketing site, start with one website record for the property whose sessions and goals you want to analyze together. Add the production address there, then add only the genuinely separate hosts that should share that site's reports.

What WhoVisited accepts in Allowed origins

  1. Enter an origin such as https://example.com, not a full page URL such as https://example.com/pricing?plan=pro.
  2. The main HTTPS domain also accepts its www version. Configuring https://example.com accepts https://www.example.com without requiring a second website record.
  3. Other subdomains, such as app.example.com or shop.example.com, need their own explicit origin entry. A wildcard is not supported.
  4. Use HTTPS for public domains. HTTP is accepted only for localhost, 127.0.0.1, or [::1] during local development.
  5. A port is part of the origin. localhost:3000 and localhost:3001 are separate entries; default HTTPS port 443 is normalized away.

Saving a full URL with a path, query, fragment, credentials, or a wildcard is rejected. Enter one origin per line or separate them with commas. The application normalizes origins and removes duplicates, but keeping the list short makes it easier to audit where a site ID is installed.

text
https://example.com
https://app.example.com
https://shop.example.com

This list lets those origins use the same website configuration and contributes their events to the same website reports. It does not merge browser storage across domains. If a visitor moves from example.com to app.example.com, configuring both origins does not guarantee WhoVisited can recognize that browser as the same visitor or continue the same session across hosts.

Decide whether another host should share the same reports

Use one website record when the hosts are alternate or connected surfaces for the same property and you want their accepted events under one site configuration. A root domain and its www alias are the common case. A product app subdomain may also belong in that record when a unified report is more useful than a separate product view.

Use a separate website record when the domains represent different businesses, customers, brands, or reporting owners and their sessions, goals, and settings should stay separate. If you put unrelated domains in one Allowed origins list, they share that website's reporting bucket; the tracker does not infer separate brands from the hostname.

A separate record creates a separate site ID and report scope. This can help keep data distinct, but it is not a cross-domain identity solution. Do not create a second record merely to make www work, and do not add another company's domain just because a redirect or embedded widget appears on your page.

Install and verify without guesswork

  1. In website settings, edit the intended website and enter its production HTTPS origins, with no paths or query strings. Save the list before testing.
  2. Copy that website's own tracker installation code and use it on the hosts that should share this report. Avoid copying a second website's site ID by mistake.
  3. Open each public host in its final form after redirects. Check DevTools Network for the bootstrap and event requests, then check that the request is accepted rather than rejected as origin_denied.
  4. Test a development origin separately. Add the exact localhost port you use, and do not add an insecure HTTP version of a public domain.
  5. Use the product's installation check only after opening the site and generating a real event. It detects recent activity; it does not prove every listed hostname, consent state, or browser configuration works.

If an origin is denied, compare the browser's final address with the saved origin: scheme, hostname, and port must match, apart from the supported root-to-www HTTPS pairing. A redirect may move users to a different host than the one you tested. Updating the allowed list takes effect at collection checks, so verify all intended hosts again after changing it.

Limits: shared reports are not shared identity or access control

The allowed-origin check is a collection gate, not user authentication or a guarantee that every non-browser caller is blocked. A site ID is used by browser code and should not be treated as a secret. Keep application authorization on your own server, and use the origin list to avoid accidental collection from unrelated browser pages.

WhoVisited also filters configured origins from referrer attribution, so an explicitly listed internal subdomain will not appear as an external referral into the same site. Choose the list based on your reporting boundary, not as a general inventory of every domain your company owns. Consent requirements, browser blockers, and cross-domain storage behavior remain separate concerns.

For the browser definition of origin, see MDN's Origin and URL.origin references. For installation details, see the WhoVisited installation guide; for the separate identity behavior across hosts, see the guide to analytics across subdomains.

References and further reading

  1. MDN: Origin
  2. MDN: URL.origin
  3. WhoVisited: Install website analytics
  4. WhoVisited: Why analytics splits visits across subdomains