forked from Alpine418/ReverseProxy-PlausibleAnalytics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.php
26 lines (19 loc) · 854 Bytes
/
options.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
// Set the relative URI when the reverse proxy is running in a folder.
// If your proxy runs under https://example.com/stats, then set /stats as relative URI and otherwise just leave it blank.
$relativeUri = '/stats';
// Set all allowed URI which should be accessible trough the proxy
$whitelist = [
'/js/script.js',
'/api/event'
];
// Optional, map allowed URI to another for sanitizing any proofs of Plausible Analytics in the URI
$mapping = [
'/js/script.js' => '/js/plausible.outbound-links.js'
];
// Set URL of Plausible Analytics
$backendUrl = "https://plausible.io";
// Script when running under a folder:
// <script defer data-domain="example.com" data-api="/stats/api/event" src="/stats/js/script.js"></script>
// Script when running in the root:
// <script defer data-domain="example.com" src="/js/script.js"></script>