Skip to content

Commit 9b55362

Browse files
authored
Merge pull request #598 from gaurav-nelson/analytics
Added Matomo analytics script
2 parents 167c4fe + 7f76453 commit 9b55362

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

layouts/partials/head.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,20 @@
1212
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.3.0/css/fontawesome.css">
1313
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.3.0/css/brands.css">
1414
<title>{{ if eq .IsHome false }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
15+
16+
<!-- Matomo -->
17+
<script>
18+
var _paq = window._paq = window._paq || [];
19+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
20+
_paq.push(['trackPageView']);
21+
_paq.push(['enableLinkTracking']);
22+
(function() {
23+
var u="//analytics.ossupstream.org/";
24+
_paq.push(['setTrackerUrl', u+'matomo.php']);
25+
_paq.push(['setSiteId', '8']);
26+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
27+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
28+
})();
29+
</script>
30+
<!-- End Matomo Code -->
1531
</head>

0 commit comments

Comments
 (0)