adamkiss/kirby-goat-counter 问题修复 & 功能扩展

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

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

adamkiss/kirby-goat-counter

最新稳定版本:1.0.1

Composer 安装命令:

composer require adamkiss/kirby-goat-counter

包简介

Simple Goat Counter plugin for the Kirby CMS

README 文档

README

Warning

ARCHIVED in Q1 2024
Since Goat counter still uses a token → cookie → redirect strategy, it's nearly impossible to reliably embed even a public stats page via <iframe>. This plugin is thus archived.

Kirby Goat Counter

Simple plugin providing goat counter iframe panel view to kirby panel and a simple frontend snippet.

Instalation

composer require adamkiss/kirby-goat-counter or download from releases

How to use

  1. Set the "dashboard viewawble by" to "Logged in users or with secret token"
  2. Set adamkiss.goat-counter.site-name to your goat counter site name ([site-name].goatcounter.com)
  3. Set adamkiss.goat-counter.token to the token for the dashboard availability

config.php example

'adamkiss.goat-counter' => [
	'site-name' => 'my-site', // my-site.goatcounter.com
	'token' => '3b43e4q4g465z2y4j6n313i6v5l6r703o3n144d' // token you can get at https://[site-name].goatcounter.com/settings/main
];

Frontend snippet to be placed in your HTML. Automatically disabled in the debug mode.

<?php snippet('goat-counter'); ?>

FAQ: It doesn't work, the panel shows "You need to log in" screen

This is the result of how Goat Counter uses the access token. It creates a cookie and then refreshes the UI. The result is, that if you have cross-site tracking prevention enabled, the [site].goatcounter.com will not see the "access-token" cookie and won't show the analytics. Create an exception for your domain to see the analytics.

License

MIT

Thanks

This plugin wouldn't happen without:

  • Betten Deisler - for sponsoring the development of the Goat Counter plugin
  • Florian Karsten - for the original code for the embeddable analytics in Kirby
  • @garethworld - for the sponsorship of the original code for the embeddable analytics in Kirby

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固