if (document.location.protocol != 'file:') { if (document.location.protocol != 'file:') { var _paq = window._paq = window._paq || []; var currentUrl = location.href; var currentHash = window.location.hash.substr(1); /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u = "https://stats.swtue.de/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '6']); 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); })(); window.addEventListener('click', function () { //console.log(`The current URL hash is ` + currentHash); if (currentHash != window.location.hash.substr(1)){ currentHash = window.location.hash.substr(1); //console.log(`The tracked URL hash is ` + currentHash); _paq.push(['setReferrerUrl', currentUrl]); currentUrl = '/' + window.location.hash.substr(1); _paq.push(['setCustomUrl', currentUrl]); // remove all previously assigned custom variables, requires Matomo (formerly Piwik) 3.0.2 _paq.push(['deleteCustomVariables', 'page']); _paq.push(['trackPageView']); // make Matomo aware of newly added content var content = document.getElementById('flipbook-I8dS1'); _paq.push(['trackContentImpressionsWithinNode', content]); _paq.push(['enableLinkTracking']); } }, false); } }
Dokument wird geladen