Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cloudflare.md to clarify example folder names #557

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/proxy/guides/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ Once you have the URL for your script, you can replace your Plausible Analytics
<script defer data-domain="yourdomain.com" data-api="https://your-worker-name.your-cloudflare-zone.workers.dev/your-folder-name/event" src="https://your-worker-name.your-cloudflare-zone.workers.dev/your-folder-name/script.js"></script>
```

The example folder name for `data-api` is `/event/`. The example folder name for the script is `/js/`.

Are you using our extensions such as hash-based routing, revenue or outbound link click tracking? Change the file name from `script.js` to the script you want to use: `script.hash.js`, `script.revenue.js` or `script.outbound-links.js`. Want to use more than one extension? You can chain them like this: `script.hash.revenue.outbound-links.js`. You just need to change the script name in the snippet that you insert into your site, no need to change the code for the worker.

That's it! You're now counting your website stats using a proxy.
Expand Down