johannschopplich/kirby-plausible

Kirby CMS 的 Plausible 集成

安装: 842

依赖者: 0

建议者: 0

安全: 0

星星: 3

关注者: 0

分支: 6

类型:kirby-plugin

0.5.0 2024-02-05 12:29 UTC

This package is auto-updated.

Last update: 2024-09-05 13:42:16 UTC


README

Kirby Plausible

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

使用方法

  1. 创建一个 Plausible 共享链接
  2. 在您的 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