Reneme matomo partial to tracking since we have added Google analytic support.
This commit is contained in:
parent
74ec9771b7
commit
695d22015f
3 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file
|
||||
* A JavaScript file for matomo analytic tracking.
|
||||
* A JavaScript file for analytic tracking.
|
||||
*/
|
||||
|
||||
var idSite = {{ .Site.Params.piwikSiteID }};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
{{- block "head" . }}{{ end }}
|
||||
{{ partial "meta_json_ld.html" . }}
|
||||
{{ partial "scripts.html" . }}
|
||||
{{ partialCached "matomo.html" . }}
|
||||
{{ partialCached "tracking.html" . }}
|
||||
</head>
|
||||
|
||||
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}">
|
||||
|
|
|
|||
11
layouts/partials/tracking.html
Normal file
11
layouts/partials/tracking.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{ if and .Site.Params.piwikTrackerUrl .Site.Params.piwikSiteID -}}
|
||||
{{ $script := resources.Get "js/tracking.js" | resources.ExecuteAsTemplate "js/tracking.js" . | minify | fingerprint -}}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
<script defer src="https://{{ .Site.Params.piwikTrackerUrl }}/matomo.js"></script>
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.GoogleAnalytics -}}
|
||||
{{ $script := resources.Get "js/tracking.js" | resources.ExecuteAsTemplate "js/tracking.js" . | minify | fingerprint -}}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
<script defer src="https://ssl.google-analytics.com/ga.js"></script>
|
||||
{{ end -}}
|
||||
Loading…
Reference in a new issue