Browse Source

update piwik to matomo settings

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
master
Toshaan Bharvani 5 years ago
parent
commit
d4f03f190a
  1. 29
      themes/pel/layouts/partials/_analytics/piwik.html

29
themes/pel/layouts/partials/_analytics/piwik.html

@ -1,16 +1,27 @@ @@ -1,16 +1,27 @@
<!-- Begin Piwik Code -->
<script type="text/javascript" >
var _paq = _paq || [];
<!-- Begin Matomo Code -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(['setDoNotTrack', false]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer', 5]);
_paq.push(['setLinkTrackingTimer', 25]);
(function() {
var u="{{ .Site.Params.analytics.piwik.URL }}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', {{ .Site.Params.analytics.piwik.ID }}]);
var u="https://{{ .Site.Params.analytics.piwik.URI }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '{{ .Site.Params.analytics.piwik.ID }}']);
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+'piwik.js'; s.parentNode.insertBefore(g,s);
g.type='text/javascript';
g.async=true;
g.defer=true;
g.src=u+'matomo.js';
s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="{{ .Site.Params.analytics.piwik.URL }}/piwik.php?idsite={{ .Site.Params.analytics.piwik.ID }}" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<noscript>
<p>
<img src="https://{{ .Site.Params.analytics.piwik.URI }}/matomo.php?idsite={{ .Site.Params.analytics.piwik.ID }}&amp;rec=1" style="border:0;" alt="" />
</p>
</noscript>
<!-- End Matomo Code -->

Loading…
Cancel
Save