floriankarsten/kirby-plausible

Installs: 1 100

Dependents: 0

Suggesters: 0

Security: 0

Stars: 20

Watchers: 4

Forks: 5

Open Issues: 4

Type:kirby-plugin

0.2.2.1 2024-04-25 10:13 UTC

This package is auto-updated.

Last update: 2024-04-25 10:18:34 UTC


README

Simple plugin providing plausible iframe panel view to kirby panel and simple frontend snippet.

CleanShot 2021-11-04 at 17 53 43

Instalation

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

There is also floriankarsten.plausible.domain which allows you to overwrite data-domain in the frontend snippet.

config.php example

'floriankarsten.plausible' => [
	'sharedLink' => 'https://plausible.io/share/yourwebsiteurl.com?auth=Jz0mCWTPu5opXi0sAgRrq',
	'domain' => 'test.com', // not required if not set it will be taken from $site->url
	// To use a self-hosted Plausible instance
	//'scriptHost' => 'https://plausible.example.com',
	// To use Plausible script extensions
	//'scriptName' => 'plausible.outbound-links.exclusions'
];

Frontend snippet place iside head tag. Automatically disabled when kirby is in debug mode.

<?php snippet('plausible'); ?>

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