floriankarsten / kirby-plausible

0.2.3 2024-07-29 12:55 UTC

This package is auto-updated.

Last update: 2024-09-29 14:37:16 UTC


README

这是一个简单的插件,它为 Kirby 控制面板和前端片段提供 Plausible iframe 面板视图。

CleanShot 2021-11-04 at 17 53 43

安装

composer require floriankarsten/kirby-plausible 或从发布版下载

如何使用

  1. 创建共享链接 https://#/docs/shared-links
  2. 在 config.php 中设置 floriankarsten.plausible.sharedLink
    // config/config.php
    'floriankarsten.plausible' => [
        // Required
        'sharedLink' => 'https://#/share/yourwebsiteurl.com?auth=Jz0mCWTPu5opXi0sAgRrq',
        // Optional: The value that will be set in data-domain attribute of <script> tag.
        'domain' => 'test.com', // Defaults to $site->url()
        // Optional: To use a self-hosted Plausible instance
        // 'scriptHost' => 'https://plausible.example.com',
        // Optional: To use Plausible script extensions
        // 'scriptName' => 'plausible.outbound-links.exclusions'
    ];
  3. 将以下片段添加到您网站的 <head> 标签内。请注意,这不会为已登录用户或当 Kirby 处于调试模式时生成任何输出。
    <?php snippet('plausible'); ?>

如果没有 @garethworld 的慷慨聘请,这个插件就不会出现。他友好地雇佣了我来制作它,并希望将其发布到 Kirby 社区。Yaaaaay