From 0a98a4141ed869fd7821a6a22ebf4167ea580e1b Mon Sep 17 00:00:00 2001 From: horus Date: Wed, 23 Nov 2022 09:39:05 +0100 Subject: Linkshorter: Small fix in Matomo Tracking Code. --- app/Http/Controllers/LinkController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/LinkController.php b/app/Http/Controllers/LinkController.php index a9d343f..6453188 100644 --- a/app/Http/Controllers/LinkController.php +++ b/app/Http/Controllers/LinkController.php @@ -18,13 +18,13 @@ class LinkController extends Controller { $matomo->setTokenAuth( env('MATOMO_LINK_SHORTER_AUTH_TOKEN') ); #$matomo->setVisitorId( $matomo->getVisitorId() ); $matomo->setIp( $request->header('X_REAL_IP') ); - $matomo->setUrl( $shortlink ); + $matomo->setUrl( env('LINK_SHORTER_BASE_DOMAIN') . $shortlink ); $matomo->setUrlReferrer( $request->server('HTTP_REFERER') ); $matomo->setBrowserLanguage( $request->server('HTTP_ACCEPT_LANGUAGE') ); $matomo->setUserAgent( $request->server('HTTP_USER_AGENT') ); - #$data = DB::table('all_view')->select('name', 'shop', 'spirit_type', 'long_url')->where('url', $shortlink)->limit(1)->get()->first(); - $data = DB::table('angebot')->select('name', 'shop', 'spirit_type', 'url as long_url')->where('short_url', $shortlink)->limit(1)->get()->first(); + $data = DB::table('all_view')->select('name', 'shop', 'spirit_type', 'long_url')->where('url', $shortlink)->limit(1)->get()->first(); + #$data = DB::table('angebot')->select('name', 'shop', 'spirit_type', 'url as long_url')->where('short_url', $shortlink)->limit(1)->get()->first(); $matomo->doTrackPageView( $data->name . " - " . $data->shop ); $matomo->doTrackEvent("Redirect", "Shop", $data->shop); -- cgit v1.2.3