Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bnomei/kirby3-posthog
Connect Kirby to Posthog
https://github.com/bnomei/kirby3-posthog
analytics kirby kirby-cms kirby-plugin posthog self-hosted
Last synced: 23 days ago
JSON representation
Connect Kirby to Posthog
- Host: GitHub
- URL: https://github.com/bnomei/kirby3-posthog
- Owner: bnomei
- License: mit
- Created: 2022-03-21T14:17:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T14:05:36.000Z (4 months ago)
- Last Synced: 2024-10-11T03:03:12.159Z (about 1 month ago)
- Topics: analytics, kirby, kirby-cms, kirby-plugin, posthog, self-hosted
- Language: PHP
- Homepage:
- Size: 106 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kirby 3/4 Posthog
![Release](https://flat.badgen.net/packagist/v/bnomei/kirby3-posthog?color=ae81ff)
![Downloads](https://flat.badgen.net/packagist/dt/bnomei/kirby3-posthog?color=272822)
[![Twitter](https://flat.badgen.net/badge/twitter/bnomei?color=66d9ef)](https://twitter.com/bnomei)Kirby 3/4 Plugin for connecting Kirby to [Posthog](https://posthog.com/)
## Install
Using composer:
```bash
composer require bnomei/kirby3-posthog
```Using git submodules:
```bash
git submodule add https://github.com/bnomei/kirby3-posthog.git site/plugins/kirby3-posthog
```Using download & copy: download [the latest release](https://github.com/bnomei/kirby3-posthog/releases) and copy to `site/plugins`
## Commerical Usage
>
> Support open source!
> This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
> If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?
> Be kind. Share a little. Thanks.
> ‐ Bruno
>| M | O | N | E | Y |
|---|----|---|---|---|
| [Github sponsor](https://github.com/sponsors/bnomei) | [Patreon](https://patreon.com/bnomei) | [Buy Me a Coffee](https://buymeacoff.ee/bnomei) | [Paypal dontation](https://www.paypal.me/bnomei/15) | [Hire me](mailto:[email protected]?subject=Kirby) |## Setup
You can set the apikey and host in the config.
**site/config/config.php**
```php
return [
// other config settings ...
'bnomei.posthog.apikey' => 'YOUR-KEY-HERE',
'bnomei.posthog.host' => 'YOUR-HOST-HERE',
];
```You can also set a callback if you use the [dotenv Plugin](https://github.com/bnomei/kirby3-dotenv).
**site/config/config.php**
```php
return [
// other config settings ...
'bnomei.posthog.apikey' => function() { return env('POSTHOG_APIKEY'); },
'bnomei.posthog.host' => function() { return env('POSTHOG_HOST'); },
];
```### Javascript
Output the tracking Javascript via the snippet included in the plugin.
```php