floriankarsten/kirby-plausible 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

floriankarsten/kirby-plausible

Composer 安装命令:

composer require floriankarsten/kirby-plausible

包简介

Simple plugin providing Plausible tracking and iframe panel view to Kirby panel.

README 文档

README

Simple plugin providing Plausible tracking and iframe panel view to Kirby panel.

CleanShot 2021-11-04 at 17 53 43

Installation

composer require floriankarsten/kirby-plausible or download from releases

How to use

  1. Create a shared link https://plausible.io/docs/shared-links
  2. Set floriankarsten.plausible.sharedLink in config.php
    // config/config.php
    'floriankarsten.plausible' => [
        // Required
        'scriptUrl' => 'https://plausible.io/js/XYZ.js', // replace with the URL of the Plausible site you want to use
    
        // Required
        'sharedLink' => 'https://plausible.io/share/yourwebsiteurl.com?auth=Jz0mCWTPu5opXi0sAgRrq',
    
        // Optional: To proxy Plausible through your own server (helps avoid ad blockers)
        // 'proxy' => [
            // 'enabled' => true,
            // 'cache' => 60 * 24, // 24 hours, optional
            // 'plausibleEndpoint' => 'https://plausible.io', // customize the Plausible instance when self-hosting, optional
        // ]
    ];
  3. Add the following snippet inside your site's <head> tag. Note that this will not generate any output for logged in users or when Kirby is in debug mode.
    <?php snippet('plausible'); ?>

Proxy setup

To avoid ad blockers you can proxy the Plausible script and events through your own server.

  1. Set floriankarsten.plausible.proxy.enabled to true in your config.php
  2. When self-hosting Plausible, set floriankarsten.plausible.proxy.plausibleEndpoint to your Plausible instance URL.

More information about the Plausible proxy setup can be found in the Plausible documentation.

Optional measurements / additional Plausible options

There are a number of additional options you can set when initialising Plausible (more here: https://plausible.io/docs/script-extensions). The easiest way to set these is by copying snippets/plausible.php from the plugin into your own snippets folder and modifying it to your needs.

Troubleshooting

The panel menu item doesn't show up or is not working

  • Make sure you have set a valid sharedLink in your config.php.
  • If you have overwritten your panel menu items using the panel.menu option, include plausible in the array of menu items.

Credits

This plugin wouldn't happen without @garethworld who kindly hired me to make it and then wanted to have it released to Kirby community. Yaaaaay

floriankarsten/kirby-plausible 适用场景与选型建议

floriankarsten/kirby-plausible 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.82k 次下载、GitHub Stars 达 25, 最近一次更新时间为 2021 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 floriankarsten/kirby-plausible 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 floriankarsten/kirby-plausible 我们能提供哪些服务?
定制开发 / 二次开发

基于 floriankarsten/kirby-plausible 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 25
  • 点击次数: 25
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 25
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-20