kx550/fathom

将 Fathom 跟踪代码添加到您的网站

安装: 4

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放性问题: 0

类型:kirby-plugin

dev-master 2019-03-08 21:48 UTC

This package is auto-updated.

Last update: 2024-09-09 13:48:17 UTC


README

为 Kirby 3 添加 Fathom 跟踪代码的插件。

如果用户在浏览器中设置了“不要跟踪”,则代码不会嵌入。

安装

下载

下载并复制此存储库到 /site/plugins/fathom

Git 子模块

git submodule add https://github.com/kx550/kirby3-fathom.git site/plugins/fathom

Composer

composer require kx550/fathom

设置

在您的 config.php 中设置以下内容

return array [
  'kx550.fathom.url' => 'analytics.yoursite.com', # required
]

analytics.yoursite.com 替换为您的 Fathom 安装 URL,省略协议。

然后添加以下代码到您的 /snippets/footer.php<?php echo snippet('fathom') ?>

许可协议

MIT