Skip to content

Commit 43ebc98

Browse files
committed
ORC-1840: Add Matomo script to support https://analytics.apache.org`
### What changes were proposed in this pull request? This PR aims to add `Matomo` script to support ASF web traffic analytics. - https://analytics.apache.org ### Why are the changes needed? To collect statistics. ### How was this patch tested? Manually build the website and check headers. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #2115 from dongjoon-hyun/ORC-1840. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 5651f0e commit 43ebc98

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

site/_includes/top.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,21 @@
1212
<script src="{{ site.baseurl }}/js/html5shiv.min.js"></script>
1313
<script src="{{ site.baseurl }}/js/respond.min.js"></script>
1414
<![endif]-->
15+
<!-- Matomo -->
16+
<script>
17+
var _paq = window._paq = window._paq || [];
18+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
19+
_paq.push(["setDoNotTrack", true]);
20+
_paq.push(["disableCookies"]);
21+
_paq.push(['trackPageView']);
22+
_paq.push(['enableLinkTracking']);
23+
(function() {
24+
var u="https://analytics.apache.org/";
25+
_paq.push(['setTrackerUrl', u+'matomo.php']);
26+
_paq.push(['setSiteId', '68']);
27+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
28+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
29+
})();
30+
</script>
31+
<!-- End Matomo Code -->
1532
</head>

0 commit comments

Comments
 (0)