Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.09 KB

File metadata and controls

30 lines (22 loc) · 1.09 KB

plausible-proxy-cloudflare-workers

A one-click deployment Plausible Analytics proxy for Cloudflare Workers

For background on why you might want to proxy your Plausible Analytics, check out the docs.

If you know you want this, just click this button and follow the instructions:

Deploy to Cloudflare Workers

After deploying, use this script in the sites that you'd like to track:

<script
	defer
	data-domain="your-domain.com"
	data-api="https://your-worker-subdomain.workers.dev/pap/event"
	src="https://your-worker-subdomain.workers.dev/pap/script.js"
></script>

Notice that the paths on the data-api and src fields can (and should) be customised to diminish the chances that your script is blocked, but notice that those two values need to remain in sync with the values in the worker script:

const SCRIPT_NAME = '/pap/script.js';
const ENDPOINT = '/pap/event';