mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:44:32 -04:00
Fixes for Matomo
This commit is contained in:
parent
51b5357aed
commit
36771eedce
@ -9,7 +9,7 @@
|
|||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
_paq.push(['enableLinkTracking']);
|
_paq.push(['enableLinkTracking']);
|
||||||
_paq.push(['setUserId', '{{ auth()->guard('contact')->user()->company->present()->name }}']);
|
_paq.push(['setUserId', '{{ auth()->guard('contact')->user()->present()->name() }}']);
|
||||||
(function() {
|
(function() {
|
||||||
var u="{{ $company->matomo_url }}";
|
var u="{{ $company->matomo_url }}";
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="@yield('meta_description')"/>
|
<meta name="description" content="@yield('meta_description')"/>
|
||||||
|
|
||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
@ -169,7 +169,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
_paq.push(['enableLinkTracking']);
|
_paq.push(['enableLinkTracking']);
|
||||||
_paq.push(['setUserId', '{{ auth()->guard('contact')->user()->company->present()->name }}']);
|
_paq.push(['setUserId', '{{ auth()->guard('contact')->user()->present()->name() }}']);
|
||||||
(function() {
|
(function() {
|
||||||
var u="{{ $company->matomo_url }}";
|
var u="{{ $company->matomo_url }}";
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
_paq.push(['trackPageView']);
|
_paq.push(['trackPageView']);
|
||||||
_paq.push(['enableLinkTracking']);
|
_paq.push(['enableLinkTracking']);
|
||||||
_paq.push(['setUserId', '{{ auth()->guard('contact')->user()->company->present()->name }}']);
|
|
||||||
(function() {
|
(function() {
|
||||||
var u="{{ $company->matomo_url }}";
|
var u="{{ $company->matomo_url }}";
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
@ -3,8 +3,23 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<!-- Error: {{ session('error') }} -->
|
<!-- Error: {{ session('error') }} -->
|
||||||
|
@if (isset($company) && $company->matomo_url && $company->matomo_id)
|
||||||
@if (config('services.analytics.tracking_id'))
|
<script>
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
_paq.push(['setUserId', '{{ auth()->guard('vendor')->user()->present()->name() }}']);
|
||||||
|
(function() {
|
||||||
|
var u="{{ $company->matomo_url }}";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '{{ $company->matomo_id }}']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript><p><img src="{{ $company->matomo_url }}/matomo.php?idsite={{ $company->matomo_id }}&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||||
|
@elseif (config('services.analytics.tracking_id'))
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-122229484-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-122229484-1"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
@ -42,7 +57,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="@yield('meta_description')"/>
|
<meta name="description" content="@yield('meta_description')"/>
|
||||||
|
|
||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
@ -157,7 +172,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user