Update the Matomo script.
This commit is contained in:
parent
7d16ef6c66
commit
fcb9d4d65d
2 changed files with 4 additions and 4 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
{{- partial "meta.html" . -}}
|
{{- partial "meta.html" . -}}
|
||||||
{{- partialCached "meta_cache.html" . -}}
|
{{- partialCached "meta_cache.html" . -}}
|
||||||
{{ block "header" . }}{{ end }}
|
{{ block "header" . }}{{ end }}
|
||||||
{{ if and .Site.Params.piwikTrackerUrl .Site.Params.piwikSiteID }}{{ partialCached "piwik.html" . }}{{ end -}}
|
{{ if and .Site.Params.piwikTrackerUrl .Site.Params.piwikSiteID }}{{ partialCached "matomo.html" . }}{{ end -}}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
14
layouts/partials/matomo.html
Normal file
14
layouts/partials/matomo.html
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<!-- Matomo -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _paq = window._paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//{{ .Site.Params.piwikTrackerUrl }}/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '{{ .Site.Params.piwikSiteID }}']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<!-- End Matomo Code -->
|
||||||
Loading…
Reference in a new issue