aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-06-19 15:15:35 +0100
committerFrankie B <git@diskfloppy.me>2024-06-19 15:15:35 +0100
commit8f02ed0a76ce021d9877f28793aa0ebff2b88e8c (patch)
tree622fd42be95b42817b38ee9e11eb6c0509c1c955 /app
parent02c68f854589e63ba4ee1d5a8732ba9be25ceb6a (diff)
Remove posthog pageview middleware
Diffstat (limited to 'app')
-rw-r--r--app/Http/Middleware/PageView.php28
-rw-r--r--app/Providers/AppServiceProvider.php9
2 files changed, 1 insertions, 36 deletions
diff --git a/app/Http/Middleware/PageView.php b/app/Http/Middleware/PageView.php
deleted file mode 100644
index dda0662..0000000
--- a/app/Http/Middleware/PageView.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-namespace App\Http\Middleware;
-
-use Closure;
-use Illuminate\Http\Request;
-use PostHog\PostHog;
-use Symfony\Component\HttpFoundation\Response;
-
-class PageView
-{
- /**
- * Handle an incoming request.
- *
- * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
- */
- public function handle(Request $request, Closure $next): Response
- {
- PostHog::capture([
- 'distinctId' => request()->ip(),
- 'event' => '$pageview',
- 'properties' => array(
- '$current_url' => url()->current(),
- ),
- ]);
- return $next($request);
- }
-}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 3aa155c..2209133 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -17,12 +17,5 @@ class AppServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*/
- public function boot(): void {
- PostHog::init(
- Config::get('services.posthog.key'),
- [
- 'host' => 'https://'.Config::get('services.posthog.host')
- ]
- );
- }
+ public function boot(): void {}
}