aboutsummaryrefslogtreecommitdiff
path: root/app/Providers/AppServiceProvider.php
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-06-11 21:36:58 +0100
committerFrankie B <git@diskfloppy.me>2024-06-11 21:36:58 +0100
commit0f4da7e3dfd0d063d9aede10c12d7769e56cc88d (patch)
tree20808feb8932992013d25143bc9f4d12fa737b23 /app/Providers/AppServiceProvider.php
parent3824f01f9b4f141c76d830d046e02b99ad762d70 (diff)
Add pageview logging via PostHog
Diffstat (limited to 'app/Providers/AppServiceProvider.php')
-rw-r--r--app/Providers/AppServiceProvider.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 452e6b6..3aa155c 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -2,23 +2,27 @@
namespace App\Providers;
+use Illuminate\Support\Facades\Config;
use Illuminate\Support\ServiceProvider;
+use PostHog\PostHog;
-class AppServiceProvider extends ServiceProvider
-{
+class AppServiceProvider extends ServiceProvider {
/**
* Register any application services.
*/
- public function register(): void
- {
+ public function register(): void {
//
}
/**
* Bootstrap any application services.
*/
- public function boot(): void
- {
- //
+ public function boot(): void {
+ PostHog::init(
+ Config::get('services.posthog.key'),
+ [
+ 'host' => 'https://'.Config::get('services.posthog.host')
+ ]
+ );
}
}