floriankarsten/kirby-plausible
最新稳定版本:0.4.1
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.
Installation
composer require floriankarsten/kirby-plausible
or download from releases
How to use
- Create a shared link https://plausible.io/docs/shared-links
- Set
floriankarsten.plausible.sharedLinkin 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 // ] ];
- 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.
- Set
floriankarsten.plausible.proxy.enabledtotruein your config.php - When self-hosting Plausible, set
floriankarsten.plausible.proxy.plausibleEndpointto 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
sharedLinkin your config.php. - If you have overwritten your panel menu items using the
panel.menuoption, includeplausiblein 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
统计信息
- 总下载量: 4.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 23
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-20
