|
1 | 1 | --- |
2 | | -title: Hostname or subdomain tracking |
| 2 | +title: Hostname, subdomain and multi-domain tracking |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | import useBaseUrl from '@docusaurus/useBaseUrl'; |
6 | 6 |
|
7 | | -Does your site operate on a single domain name with multiple subdomains such as `docs.yourdomain.com`, `app.yourdomain.com` and `www.yourdomain.com`? |
| 7 | +This page covers two common multi-domain setups: |
8 | 8 |
|
9 | | -Plausible helps you simplify cross-subdomain tracking. You can view the visitor journey end-to-end from the landing on your primary domain name to a conversion on the subdomain. The original referral source will stay attributed to that visitor even when the visitor moves from one of your subdomains to another. |
| 9 | +- **Subdomains** such as `docs.yourdomain.com`, `app.yourdomain.com` and `www.yourdomain.com` under a single domain |
| 10 | +- **Separate domains** such as country or language variants like `example.de` and `example.nl` |
| 11 | + |
| 12 | +Plausible helps you simplify tracking across both. You can view the visitor journey end-to-end from the landing on your primary domain name to a conversion on the subdomain. The original referral source will stay attributed to that visitor even when the visitor moves from one of your subdomains to another. |
10 | 13 |
|
11 | 14 | Here's how to track the user journey across your domain name and its subdomains. |
12 | 15 |
|
@@ -79,6 +82,34 @@ Once added to the allow list, we will start blocking traffic from all the **othe |
79 | 82 |
|
80 | 83 | You can see the list of all the hostnames that you're allowing the traffic from at any time. Click on the "Remove" button next to a hostname to remove it from the allow list. |
81 | 84 |
|
| 85 | +## Tracking multiple country or language domains |
| 86 | + |
| 87 | +If you're running the same site across multiple country or language domains (for example, `example.de` for Germany and `example.nl` for the Netherlands), there are two ways to handle tracking depending on whether you want individual dashboards per domain. |
| 88 | + |
| 89 | +:::note |
| 90 | +Because Plausible is cookieless and doesn't track users across domains, a visitor who visits both `example.de` and `example.nl` will count as a unique visitor on each domain separately. This applies to any combined view as well. |
| 91 | +::: |
| 92 | + |
| 93 | +### Individual dashboards per domain, plus a global combined view |
| 94 | + |
| 95 | +This is the recommended approach for most localization setups: |
| 96 | + |
| 97 | +1. [Add each domain](add-website.md) as its own site in your Plausible account (`example.de`, `example.nl`, etc.) |
| 98 | +2. Install the tracking snippet for each site on the corresponding domain |
| 99 | +3. Each site gets its own dedicated dashboard with individual stats |
| 100 | +4. Your [Consolidated View](consolidated-views.md) automatically combines all your sites into one global dashboard with no extra configuration needed |
| 101 | + |
| 102 | +When you add more country domains in the future, just add them as new sites and they'll appear in the consolidated view automatically. |
| 103 | + |
| 104 | +### One dashboard for all domains |
| 105 | + |
| 106 | +If you'd rather have a single dashboard covering all domains and don't need separate per-domain dashboards: |
| 107 | + |
| 108 | +1. Add one site to Plausible and use it as a shared identifier (for example, `example.com`) |
| 109 | +2. Install the same tracking snippet on all your country domains, each pointing to this same site |
| 110 | +3. Your dashboard shows combined traffic from all domains by default |
| 111 | +4. Use the hostname filter described above to view stats for each country domain individually |
| 112 | + |
82 | 113 | ## When to add a subdomain as a dedicated site |
83 | 114 |
|
84 | 115 | If you don't want to track visitors of a specific subdomain together with those of your other sites in the same dashboard, you should add that subdomain as a separate site to your Plausible account. |
|
0 commit comments