You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/change-domain-name.md
+54-9Lines changed: 54 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,16 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
6
6
7
7
Please follow these steps if you have changed the domain name of your site and would like your new domain name to be displayed in your Plausible dashboard. You won't lose any of your historical stats in this process.
8
8
9
-
Note that once you change the domain in your Plausible site settings, you must update the JavaScript snippet on your site within 72 hours to guarantee continuous tracking. If you're using our APIs, you must also make sure to update your API credentials.
10
-
11
9
:::tip Looking to transfer a site to a different Plausible account?
12
10
Use the [site ownership transfer](transfer-ownership.md) functionality instead
13
11
:::
14
12
13
+
## How to change your site domain in Plausible site settings?
14
+
15
+
:::important
16
+
Once you change the domain in your Plausible site settings, you may have to take additional steps to ensure your Plausible integration continues to work seamlessly. Please see the [list below](#domain-change-checklist).
17
+
:::
18
+
15
19
Here's how to change the domain name of a site in your Plausible account:
16
20
17
21
* Go to the "**General**" section of the [website settings](website-settings.md) in your Plausible account
@@ -22,16 +26,57 @@ Here's how to change the domain name of a site in your Plausible account:
22
26
23
27
* Type in your new domain name. Please, remove `https` and `www` from the domain, just keep the hostname (`yourdomain.com`). For example, if your new domain is `https://www.yourdomain.com` then the part to enter in the "**Domain**" field is `yourdomain.com`
24
28
25
-
* Click on the "**Change domain and add new snippet**" button to confirm the domain name change
29
+
* Click on the "**Change domain**" button to proceed with the domain name change
30
+
31
+
* After a successful domain change, we will attempt to visit your new domain in order to advise you on the next steps (which depend on how you've set up Plausible). You should see a loading spinner while the process is ongoing, and a tailored recommendation once it finishes. Note that the same information is available in step 1 of the checklist below. We recommend you to go over that checklist to make sure your entire Plausible integration will continue working as before.
32
+
33
+
## Domain change checklist
26
34
27
-
<img alt="Change domain name in Plausible" src={useBaseUrl('img/change-domain-and-add-new-snippet.png')} />
35
+
In this section, we'll highlight everything that might need additional action after a successful domain change in Plausible.
28
36
29
-
* Your new snippet will be displayed on the following screen. You need to update the script on your site to use the snippet with the new domain name as opposed to the old domain name within 72 hours to guarantee continuous tracking. If you're using our APIs, you must also make sure to update your API credentials.
37
+
### 1. Ensure your tracking is working
30
38
31
-
:::note How the 72 hour transition period works
32
-
During the transition period, we will allow counting of the stats using both old and new snippets. After 72 hours, the old domain is cleared from our database and any new traffic sent to the old snippet will be rejected
39
+
First and foremost, you'll need to make sure your stats are still tracking. Whether or not you need to take any action here depends on your setup.
40
+
41
+
<table>
42
+
<tr>
43
+
<th>Installation type</th>
44
+
<th>How do I know if I'm using this?</th>
45
+
<th>Required action to ensure continuous tracking</th>
46
+
</tr>
47
+
<tr>
48
+
<td><b>Script tag installation</b></td>
49
+
<td>
50
+
The snippet on your website contains the word `plausible.init`. This is also the case when you're using our official [Google Tag Manager template](https://tagmanager.google.com/gallery/#/owners/plausible/templates/plausible-gtm-template).
51
+
</td>
52
+
<td>No action required</td>
53
+
</tr>
54
+
<tr>
55
+
<td><b>WordPress plugin</b></td>
56
+
<td>If your website is on WordPress, you're most likely using the plugin as that's the recommended installation method.</td>
57
+
<td>Update the site domain in your plugin settings</td>
58
+
</tr>
59
+
<tr>
60
+
<td><b>NPM package</b></td>
61
+
<td>You're using the [@plausible-analytics/tracker](https://www.npmjs.com/package/@plausible-analytics/tracker) library</td>
62
+
<td>Update the init options, e.g. `init({ domain: "your_new_domain.com", ... })`</td>
63
+
</tr>
64
+
<tr>
65
+
<td><b>Legacy tracking snippet</b></td>
66
+
<td>The Plausible snippet on your website includes the `data-domain` attribute.</td>
67
+
<td>Update the snippet's data-domain attribute value, e.g. <code><script src="https://plausible.io/js/plausible.js" data-domain="your_new_domain.com" ...></code></td>
68
+
</tr>
69
+
</table>
70
+
71
+
:::important
72
+
To make the necessary changes to your tracking, you'll have a transition period of 72 hours, during which we will count your stats using both the old and the new domain. After 72 hours, the old domain is cleared from our database and any new traffic sent with the old domain will be rejected.
33
73
:::
34
74
35
-
* Click on the "**I understand, I'll change my snippet**" button to go to your new dashboard
75
+
### 2. Update Stats API integrations
76
+
77
+
Stats API requests depend on the domain as an argument. API requests made after a domain change with the old domain will fail. Update any Stats API based integrations to use the new domain.
78
+
79
+
### 3. Ensure you update bookmarked and shared links
80
+
81
+
As soon as you change the domain in Plausible, any links to your site analytics dashboard or site settings that you might have bookmarked or shared will stop working. These will be available at the new root URL `https://plausible.io/<your_new_domain>`. There is no automatic redirect in place from the old root URL to the new one.
36
82
37
-
<img alt="Change domain name in Plausible" src={useBaseUrl('img/change-snippet.png')} />
0 commit comments