Skip to content

Commit 310acb7

Browse files
authored
Update the Matomo script (contao#1073)
* Update the Matomo script * Call "trackPageView" last
1 parent 91a2774 commit 310acb7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

page/layouts/partials/custom-header.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
44
<script>
55
var _paq = window._paq = window._paq || [];
6+
_paq.push(['setRequestMethod', 'POST'])
67
_paq.push(['disableCookies']);
7-
_paq.push(['trackPageView']);
88
_paq.push(['enableLinkTracking']);
9+
_paq.push(['enableHeartBeatTimer', 15]);
10+
_paq.push(['disableBrowserFeatureDetection']);
11+
_paq.push(['trackPageView']);
912
(function() {
10-
var u='https://matomo.contao.org/';
11-
_paq.push(['setTrackerUrl', u+'matomo.php']);
13+
var u='https://mt.contao.org/js/';
14+
_paq.push(['setTrackerUrl', u]);
1215
_paq.push(['setSiteId', 3]);
1316
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
14-
g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
17+
g.async=true; g.defer=true; g.src=u; s.parentNode.insertBefore(g,s);
1518
})();
1619
</script>
1720

0 commit comments

Comments
 (0)