Track multiple domains

Panelbear automatically groups all events sent by one tracking snippet into a logical "Site" - no additional configuration necessary. That way, you can continue measuring a session that started in one domain, and ended in another.

This is a fairly common pattern: many online businesses often organize their website via subdomains (eg. panelbear.com, app.panelbear.com, blog.panelbear.com). In Panelbear you could register each subdomain as a separate Site, each with its own dashboard and metrics, or you could register one single Site and re-use the tracking code across all three domains - it's completely up to you!

How to track multiple domains

Simply place the tracking snippet on one or more domains. The analytics data is automatically merged for you.

Depending on how you wish to organize your dashboards and whether to track sessions across multiple domains you own, there's two possibilities:

  • Multiple domains, multiple dashboards: Simply create one Site in Panelbear for each domain you want to track, and place the tracking code of each Site into the corresponding domain. Sessions will be isolated per domain (a session that starts in one domain and ends in another will be counted as two separate sessions).

  • Multiple domains, one dashboard: Create one Site in Panelbear for all domains you want to track, and place the same tracking code into each domain. Sessions will be tracked across domains (a session that starts in one domain and ends in another will be counted as a single session).

For example, say a visitor landed in panelbear.com and after browsing the site for a few minutes decides to sign up. The sign up page is hosted at app.panelbear.com instead of the original domain. Since both domains use the same tracking snippet, Panelbear will automatically group all interactions made across both sites and correctly update your stats in the dashboard to account for this.

How to restrict which domains can send events

You can optionally restrict the hostnames that can send events to your site (both pageviews and custom events are considered events).

Simply go to your Site Settings and add one or more hostnames under "Allowed origins". You can add multiple entries separated by a comma (eg. panelbear.com, blog.panelbear.com).

Panelbear will only record pageviews and custom events reported by the hostnames in this list, the rest will be discarded. If you leave this field empty, any hostname that contains your Site's tracking code can record data.