Frontend snippet and Kirby panel for Plausible analytics.
Plausible is a lightweight and open-source website analytics tool. No cookies and fully compliant with GDPR, CCPA and PECR. Made and hosted in the EU.
Download and copy this repository to /site/plugins/kirby3-plausible.
- Create a shared link without password at https://plausible.io/docs/shared-links
- Set
rowdyrabouw.plausible.domainin config.php fordata-domainin the snippet - Set
rowdyrabouw.plausible.sharedLinkin config.php for the panel
You can also set rowdyrabouw.plausible.theme to overwrite the default (light) theme in the Kirby panel. This can be either light or dark.
Add settings to your config/config.php
<?php
return [
'rowdyrabouw.plausible' => [
'domain' => 'example.com', // used in snippet
'theme' => 'light', // light or dark; used in panel
'sharedLink' => 'https://plausible.io/share/example.com?auth=vugsdGWpgFRI4S9nCWmRY' // used in panel
]
];Place the frontend snippet inside the head tag. Analytics logging is automatically disabled when Kirby is in debug mode.
<?php snippet('rowdyrabouw/plausible'); ?>