diff --git a/resources/views/portal/ninja2020/layout/clean.blade.php b/resources/views/portal/ninja2020/layout/clean.blade.php index 2ba6b17d68..083045a798 100644 --- a/resources/views/portal/ninja2020/layout/clean.blade.php +++ b/resources/views/portal/ninja2020/layout/clean.blade.php @@ -9,7 +9,9 @@ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); - _paq.push(['setUserId', '{{ auth()->guard('contact')->check()->user()->present()->name() }}']); + @if (auth()->guard('contact')->check()) + _paq.push(['setUserId', '{{ auth()->guard('contact')->user()->present()->name() }}']); + @endif (function() { var u="{{ $company->matomo_url }}"; _paq.push(['setTrackerUrl', u+'matomo.php']);