Website: Add Matomo Analytics Tracking Script
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 658
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 9
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Task description
Apache supports analytics tracking through Matomo, and many other projects have added this to their websites to track page views, demographics, etc. This can provide us with some valuable feedback as to how much traffic and what sort of traffic is visiting our website.
This task involves installing this tracking script on our website (both "site" and "apidocs" templates).
### Set-up Documentation
https://lucenenet.apache.org/contributing/documentation.html
https://privacy.apache.org/matomo/creating-a-new-site.html
### Dashboard
https://analytics.apache.org/index.php?module=CoreHome&action=index&date=yesterday&period=day&idSite=84
### Tracking Script
> NOTE: There are more options than this on the above link.
```html
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '84']);
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);
})();
```
It is recommended that the Matomo Code is included immediately before the closing `` tag on all web pages.
Contributor guide
Assessment
This issue has not been assessed yet.