Skip to content

Website: Add Matomo Analytics Tracking Script #1208

@NightOwl888

Description

@NightOwl888

Is there an existing issue for this?

  • 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.

<!-- Matomo -->
<script>
  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);
  })();
</script>
<!-- End Matomo Code -->

It is recommended that the Matomo Code is included immediately before the closing </head> tag on all web pages.

Metadata

Metadata

Assignees

Labels

docsApplies to the API docs or websitegood-first-issueGood for newcomershacktoberfestThis is a good issue for Hacktoberfestis:enhancementNew feature or requestis:taskA chore to be donepri:normalup-for-grabsThis issue is open to be worked on by anyone

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions