Browse Source

Präziseres Tracking bei one-page-Visits

master
Christian Aust 3 months ago
parent
commit
f481bfcd81
  1. 9
      _includes/tracking.html

9
_includes/tracking.html

@ -1,14 +1,17 @@
{% if site.tracking.id %}
<!-- Matomo -->
<script>
// Matomo
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
// tracker methods like "setCustomDimension" should be called before "trackPageView"
_paq.push(['setDocumentTitle', "{{ page.title }}"]);
// accurately measure the time spent in the visit
_paq.push(['enableHeartBeatTimer']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ site.tracking.url }}";
_paq.push(['setTrackerUrl', u+'/matomo.php']);
_paq.push(['setSiteId', '{{ site.tracking.id }}']);
_paq.push(['setSiteId', {{ site.tracking.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);
})();

Loading…
Cancel
Save