Skip to content

Commit 2545a48

Browse files
committed
doc: Improve README
1 parent 6e59bc7 commit 2545a48

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CI](https://github.com/appercept/plausible_proxy_rails/actions/workflows/ci.yml/badge.svg)](https://github.com/appercept/plausible_proxy_rails/actions/workflows/ci.yml)
44
[![Gem Version](https://badge.fury.io/rb/plausible_proxy_rails.svg)](https://rubygems.org/gems/plausible_proxy_rails)
55

6-
A Rails Engine that proxies [Plausible Analytics](https://plausible.io) requests through your application server. This keeps analytics working for visitors who block third-party scripts, removes the need for `plausible.io` in your Content Security Policy, and improves visitor privacy by preventing direct connections to external servers.
6+
A Rails Engine that proxies [Plausible Analytics](https://plausible.io) requests through your application server, so visitors never connect to a third-party domain. This means analytics work even when third-party scripts are blocked, and you don't need `plausible.io` in your Content Security Policy.
77

88
## How It Works
99

@@ -60,7 +60,7 @@ Add the script tag to your layout:
6060
</head>
6161
```
6262

63-
This renders a `<script>` tag that loads the analytics script from your proxy path and sends events through it. When the proxy is disabled (e.g., in development), `plausible_tag` returns `nil` and nothing is rendered.
63+
When the proxy is disabled (e.g., in development), `plausible_tag` returns `nil` and nothing is rendered.
6464

6565
## Self-Hosted Plausible
6666

@@ -88,6 +88,12 @@ config.script_url = "https://plausible.io/js/script.file-downloads.outbound-link
8888

8989
See the [Plausible docs](https://plausible.io/docs/plausible-script) for more on script options.
9090

91+
## Why Not Proxy at the Web Server Level?
92+
93+
Plausible's [proxy guides](https://plausible.io/docs/proxy/introduction) cover NGINX, Caddy, and others. But plenty of Rails apps run on Heroku, Render, or Fly.io where you don't control the web server config. This gem handles it at the app layer instead — add the gem, configure it, done. The proxy setup travels with your app and works the same everywhere.
94+
95+
If you're already proxying through NGINX, you don't need this.
96+
9197
## Requirements
9298

9399
- Ruby >= 3.2

0 commit comments

Comments
 (0)