Skip to content

Commit 2c562f4

Browse files
authored
Add Matomo (#395)
1 parent fa6d73a commit 2c562f4

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

_includes/matomo.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Matomo -->
2+
<script>
3+
var _paq = window._paq = window._paq || [];
4+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
5+
_paq.push(["setCookieDomain", "*.esmvaltool.org"]);
6+
_paq.push(["setDoNotTrack", true]);
7+
_paq.push(["disableCookies"]);
8+
_paq.push(['trackPageView']);
9+
_paq.push(['enableLinkTracking']);
10+
(function() {
11+
var u="//matomo.research.software/";
12+
_paq.push(['setTrackerUrl', u+'matomo.php']);
13+
_paq.push(['setSiteId', '10']);
14+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
15+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
16+
})();
17+
</script>
18+
<noscript><p><img referrerpolicy="no-referrer-when-downgrade" src="//matomo.research.software/matomo.php?idsite=10&amp;rec=1" style="border:0;" alt="" /></p></noscript>
19+
<!-- End Matomo Code -->

_layouts/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" type="text/css" href="{{ relative_root_path }}/assets/css/syntax.css" />
1919

2020
{% include favicons.html %}
21+
{% include matomo.html %}
2122

2223
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
2324
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

0 commit comments

Comments
 (0)