Skip to content

Commit b7a9b4f

Browse files
Merge pull request #616 from plausible/metmarkosaric-patch-34
managed proxy
2 parents b18114e + 51df5dd commit b7a9b4f

File tree

14 files changed

+72
-25
lines changed

14 files changed

+72
-25
lines changed

docs/custom-domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ title: Serve the script from your domain as a first-party connection
55
import useBaseUrl from '@docusaurus/useBaseUrl';
66

77
:::note
8-
Custom domains are deprecated. We now recommend the proxy instead of the custom domain. [Here are the proxy instructions](/proxy/introduction.md)
8+
We now recommend the proxy instead of the custom domain. [Here are the proxy instructions](/proxy/introduction.md)
99
:::

docs/proxy/guides/akamai.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ title: Proxying Plausible through Akamai
44

55
import useBaseUrl from '@docusaurus/useBaseUrl';
66

7-
Proxying Plausible through your own property on Akamai is easy, fast and privacy-friendly.
7+
Here's how to proxy Plausible through your own property on Akamai. The instructions assume you use the default paths ``/js/script.js`` and ``/api/event``. You can change these based on your preferences.
88

9-
The instructions assume you use the default paths ``/js/script.js`` and ``/api/event``. You can change these based on your preferences.
9+
:::tip Don't want to manage your own proxy? We can handle it for you
10+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
11+
:::
1012

1113
## Step 1: Proxy Analytics Script
1214

docs/proxy/guides/apache.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
title: Proxying Plausible through Apache HTTP Server
33
---
44

5-
If you're already running Apache HTTP Server as your main web server or reverse
6-
proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
5+
If you're already running Apache HTTP Server as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
6+
7+
:::tip Don't want to manage your own proxy? We can handle it for you
8+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
9+
:::
710

811
## Step 1: Enable the required modules
912

docs/proxy/guides/caddy.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
title: Proxying Plausible through Caddy
33
---
44

5-
If you're already running Caddy as your main web server or reverse
6-
proxy, you can also configure it to proxy your analytics. Start by adjusting your
7-
configuration as shown in the next step.
5+
If you're already running Caddy as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
6+
7+
:::tip Don't want to manage your own proxy? We can handle it for you
8+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
9+
:::
810

911
## Step 1: Update your Caddyfile
1012

docs/proxy/guides/cloudflare.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ title: Proxying Plausible through Cloudflare
55
import useBaseUrl from '@docusaurus/useBaseUrl';
66

77
You can use Cloudflare Workers to proxy your Plausible Analytics requests. Cloudflare Workers offers free service for up to 100,000 requests per day.
8-
All you need to set it up is a free Cloudflare account.
8+
All you need to set it up is a free Cloudflare account. Here's the step-by-step process for creating a proxy.
99

10-
Here's the step-by-step process for creating a proxy. It takes only a few minutes and requires no tech know-how or prior experience.
10+
:::tip Don't want to manage your own proxy? We can handle it for you
11+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
12+
:::
1113

1214
Step 0: Sign up for a free Cloudflare account if you don't have an account already and add your site.
1315

docs/proxy/guides/cloudfront.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
66

77
You can use CloudFront to proxy your Plausible Analytics requests. Here's the step-by-step process for creating a proxy.
88

9+
:::tip Don't want to manage your own proxy? We can handle it for you
10+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
11+
:::
12+
913
Step 0: Sign up for a free AWS account if you don't have an account already and create a CloudFront distribution.
1014

1115
## Step 1: Create new origin

docs/proxy/guides/deno.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Proxying Plausible through Deno Deploy
33
---
44

5+
:::tip Don't want to manage your own proxy? We can handle it for you
6+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
7+
:::
8+
59
## Step 1: Deploy proxy code
610

711
Start by getting a [Deno Deploy](https://deno.com/deploy) account if you don't have one already.

docs/proxy/guides/fastly.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
66

77
You can use Fastly to proxy your Plausible Analytics requests. Here's the step-by-step process for creating a proxy.
88

9+
:::tip Don't want to manage your own proxy? We can handle it for you
10+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
11+
:::
12+
913
## Step 1: Create the Backend for Plausible
1014

1115
First, set up a Plausible backend:

docs/proxy/guides/fresh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Proxying Plausible through Fresh
33
---
44

5+
:::tip Don't want to manage your own proxy? We can handle it for you
6+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
7+
:::
8+
59
## Step 1: Add the script proxy
610

711
Create a file `routes/js/script.js.ts` in your project.

docs/proxy/guides/netlify.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Proxying Plausible through Netlify
33
---
44

5+
:::tip Don't want to manage your own proxy? We can handle it for you
6+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
7+
:::
8+
59
## Step 1: Add URL rewrite rules
610

711
If you don't already have a `_redirects` file at the publishing directory of your site, create one. You can learn more about Netlify redirects and rewrites [here](https://docs.netlify.com/routing/redirects/). Here's the setup for proxying Plausible Analytics:

docs/proxy/guides/nextjs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ title: Proxying Plausible through Vercel with Next.js
44

55
There are two ways you can proxy Plausible through Next.js / Vercel. One is using the next-plausible npm package and the other is using the raw Next.js config. Here are the instructions:
66

7+
:::tip Don't want to manage your own proxy? We can handle it for you
8+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
9+
:::
10+
711
## Using next-plausible
812

913
[next-plausible](https://github.com/4lejandrito/next-plausible) is an npm package that makes it easier to include Plausible Analytics in your Next.js site.

docs/proxy/guides/nginx.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
title: Proxying Plausible through Nginx
33
---
44

5-
If you're already running Nginx as your main web server or reverse
6-
proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
5+
If you're already running Nginx as your main web server or reverse proxy, you can also configure it to proxy your analytics. Start by adjusting your configuration as shown in the next step.
6+
7+
:::tip Don't want to manage your own proxy? We can handle it for you
8+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
9+
:::
710

811
## Step 1: Update your Nginx config
912

docs/proxy/guides/vercel.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
title: Proxying Plausible through Vercel
33
---
44

5+
:::tip Don't want to manage your own proxy? We can handle it for you
6+
Our managed proxy lets you send analytics through your own domain name as a first-party connection. All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else. [Contact us for details](https://plausible.io/contact).
7+
:::
8+
59
If you are hosting a **Next.js** application, see [Proxying Plausible through Next.js / Vercel](/proxy/guides/nextjs.md).
610

711
## Step 1: Add configuration file

docs/proxy/introduction.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ This is the simplest way to install Plausible Analytics but it will also be bloc
3838

3939
### Are you concerned about missing data?
4040

41-
Proxy our script. This is the option for those who want to get more accurate stats. With our step-by-step instructions, the setup is straightforward even for those who don't have any coding experience.
42-
43-
A proxy basically maps certain URLs from your domain to the Plausible domain:
41+
Proxy our script. This is the option for those who want to get more accurate stats. A proxy basically maps certain URLs from your domain to the Plausible domain:
4442

4543
```
4644
https://<yourdomain.com>/js/script.js -> https://plausible.io/js/script.js
@@ -49,18 +47,33 @@ https://<yourdomain.com>/api/event -> https://plausible.io/api/event
4947

5048
When the browser requests a file at `https://yourdomain.com/js/script.js` it will actually be fetched from `https://plausible.io/js/script.js`. The analytics will work exactly the same but the script will be served without being flagged.
5149

52-
We used to have a CNAME/DNS custom domain approach in the past, but it's no longer effective, so we now recommend a proxy as it's a much more flexible and powerful solution.
50+
## How to proxy requests to Plausible
51+
52+
You can proxy requests to Plausible in several ways depending on your setup. If you'd rather not handle it yourself, we also offer a managed proxy option.
53+
54+
### Managed proxy
55+
56+
Don't want to manage your own proxy? We can handle it for you. Our managed proxy lets you send analytics through your own domain name as a first-party connection. This helps bypass adblockers and count more traffic without any setup or maintenance on your end.
57+
58+
All you need to do is set up a CNAME record using the instructions we'll send you and update the snippet on your site. We'll take care of everything else.
59+
60+
Managed proxy is available on our Enterprise plans. [Contact us for details](https://plausible.io/contact).
61+
62+
### Standalone proxy
5363

54-
There are many ways you can proxy requests to Plausible depending on your hosting situation. We've divided our guides to *standalone* and *integrated* proxies. A standalone proxy can be set up on its own and it does not matter what hosting provider or tech stack you are using. Integrated proxy setups are dependent on how you've deployed your app.
64+
A standalone proxy works with any tech stack or hosting provider. You're responsible for setting it up and keeping it running. You can use one of these options:
5565

56-
Standalone proxy setups:
5766
* [Akamai](/docs/proxy/guides/akamai)
5867
* [Cloudflare Workers](/docs/proxy/guides/cloudflare)
5968
* [Fastly](/docs/proxy/guides/fastly)
6069
* [CloudFront](/docs/proxy/guides/cloudfront)
6170
* [Google Cloud Platform](https://github.com/mtlynch/plausible-proxy)
71+
* [How to send events directly to our API](/docs/events-api)
72+
73+
### Integrated proxy
74+
75+
These setups depend on how your app is deployed. You'll need to handle the proxy setup and maintenance yourself. Here are the available options:
6276

63-
Integrated proxy setups:
6477
* [WordPress](/docs/proxy/guides/wordpress)
6578
* [Netlify](/docs/proxy/guides/netlify)
6679
* [Vercel](/docs/proxy/guides/vercel)
@@ -70,9 +83,3 @@ Integrated proxy setups:
7083
* [Apache](/docs/proxy/guides/apache)
7184
* [Caddy](/docs/proxy/guides/caddy)
7285
* [Django](https://github.com/imankulov/django-plausible-proxy)
73-
74-
Events API as a server side alternative:
75-
* [How to send events directly to our API](/docs/events-api)
76-
77-
NPM package as another alternative:
78-
* [NPM standalone package](https://github.com/plausible/plausible-tracker).

0 commit comments

Comments
 (0)