Merge pull request #8157 from LarsK1/patch-3

Fixes for matomo
This commit is contained in:
David Bomba 2023-01-16 22:42:49 +11:00 committed by GitHub
commit 9283b84447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -9,7 +9,9 @@
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@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']);

View File

@ -9,7 +9,9 @@
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@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']);

View File

@ -9,7 +9,9 @@
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@if (auth()->guard('vendor')->check())
_paq.push(['setUserId', '{{ auth()->guard('vendor')->user()->present()->name() }}']);
@endif
(function() {
var u="{{ $company->matomo_url }}";
_paq.push(['setTrackerUrl', u+'matomo.php']);