johannschopplich / kirby-plausible
Kirby CMS 的 Plausible 集成
0.5.0
2024-02-05 12:29 UTC
Requires
Requires (Dev)
- friendsofphp/php-cs-fixer: @stable
- getkirby/cms: ^4
README
Kirby Plausible
注意
这是对 floriankarsten/kirby-plausible 的重构版本。
此插件将 Plausible 分析仪表板直接集成到您的 Kirby 控制面板中。
要求
- Kirby 4 或更高版本
注意
对于 Kirby 3 支持,请使用 Kirby Plausible 版本 0.3。
安装
Composer
composer require johannschopplich/kirby-plausible
下载
下载并将此存储库复制到 /site/plugins/kirby-plausible
。
使用方法
- 创建一个 Plausible 共享链接
- 在您的
config.php
中设置johannschopplich.plausible.sharedLink
// config.php return [ 'johannschopplich.plausible' => [ 'sharedLink' => '<your-plausible-shared-link>', // Only needed if the frontend URL differs from the index URL of the Kirby instance 'domain' => '<your-frontend-domain>' ] ];
前端代码片段
您可以使用包含的代码片段。最好将其添加到 <head>
标签中。在调试模式下不会注入脚本。
<?php snippet('plausible') ?>
许可证
MIT 许可证 © 2022-PRESENT Johann Schopplich
MIT 许可证 © 2021 Florian Karsten