{"id":18177308,"url":"https://github.com/Alpine418/ReverseProxy-PlausibleAnalytics","last_synced_at":"2025-04-01T18:31:23.953Z","repository":{"id":42699791,"uuid":"373092737","full_name":"Alpine418/ReverseProxy-PlausibleAnalytics","owner":"Alpine418","description":"Reverse proxy for Plausible Analytics, written in PHP for Shared Hostings on Apache.","archived":false,"fork":false,"pushed_at":"2023-06-12T06:17:20.000Z","size":31,"stargazers_count":32,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-15T18:05:35.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alpine418.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-02T08:17:02.000Z","updated_at":"2025-03-12T09:53:56.000Z","dependencies_parsed_at":"2024-11-02T17:12:53.957Z","dependency_job_id":null,"html_url":"https://github.com/Alpine418/ReverseProxy-PlausibleAnalytics","commit_stats":null,"previous_names":["jnessier/reverseproxy-plausibleanalytics","alpine418/reverseproxy-plausibleanalytics"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alpine418%2FReverseProxy-PlausibleAnalytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alpine418%2FReverseProxy-PlausibleAnalytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alpine418%2FReverseProxy-PlausibleAnalytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alpine418%2FReverseProxy-PlausibleAnalytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alpine418","download_url":"https://codeload.github.com/Alpine418/ReverseProxy-PlausibleAnalytics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246639885,"owners_count":20810090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-02T17:12:50.193Z","updated_at":"2025-04-01T18:31:23.707Z","avatar_url":"https://github.com/Alpine418.png","language":"PHP","funding_links":["https://www.paypal.me/JonathanNessier"],"categories":[],"sub_categories":[],"readme":"# Reverse proxy for Plausible Analytics\n\nWritten in PHP for shared hosting on Apache.\n\n## Installation\n\n1. Manually download the latest release from [here](https://github.com/Neoflow/ReverseProxy-PlausibleAnalytics/releases/).\n\n### Running in the root of a domain or subdomain\n\n2. Move `.htaccess`, `index.php` and `options.php` into the root of your domain or subdomain (e.g. `stats.example.com`).\n3. **Optional** Customize the `options.php`.\n4. Add the script like in the following example and customize the attributes.\n\n```html\n\u003cscript defer data-domain=\"example.com\" src=\"//stats.example.com/js/script.js\"\u003e\u003c/script\u003e\n```\n\n### Running in a sub folder of a website\n\n2. Move `.htaccess`, `index.php` and `options.php` into the sub folder of your website (e.g. `example.com/stats`).\n3. **Optional** Customize the `options.php`.\n4. Add the script like in the following example and customize the attributes.\n\n```html\n\u003cscript defer data-domain=\"example.com\" data-api=\"/stats/api/event\" src=\"/stats/js/script.js\"\u003e\u003c/script\u003e\n```\n\n## Options\n\n```php\n// Set the relative URI when the reverse proxy is running in a folder.\n// If your proxy runs under https://example.com/stats, then set /stats as relative URI and otherwise just leave the string blank.\n$relativeUri = '/stats';\n\n// Set all allowed URI which should be accessible through the proxy\n$whitelist = [\n    '/js/script.js',\n    '/js/plausible.outbound-links.js',\n    '/api/event'\n];\n\n// Optional, map allowed URI to another for sanitizing any proofs of Plausible Analytics in the URI.\n// If not needed then leave the array empty.\n$mapping = [\n    '/foo/bar.js' =\u003e '/js/plausible.outbound-links.js'\n];\n\n// Set visitor IP addresses as exclusion (e.g. for yourself or developers)\n// If not needed then leave the array empty.\n$excluded = [\n    '127.0.0.1',\n    '::1',\n];\n\n// Set URL of Plausible Analytics\n$backendUrl = \"https://plausible.io\";\n```\n\n## Contributors\n\n* Jonathan Nessier\n* David Mondok\n* Julien Tessier, [Utile](https://www.utile.co)\n\nIf you would like to see this reverse proxy for Plausible Analytics develop further, or if you want to support me or\nshow me your appreciation, please\ndonate any amount through PayPal. Thank you! :beers:\n\n[![Donate](https://img.shields.io/badge/Donate-paypal-blue)](https://www.paypal.me/JonathanNessier)\n\n## License\n\nLicensed under [MIT](LICENSE).\n\n*Made in Switzerland with :cheese: and :heart:*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlpine418%2FReverseProxy-PlausibleAnalytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlpine418%2FReverseProxy-PlausibleAnalytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlpine418%2FReverseProxy-PlausibleAnalytics/lists"}