laws-africa / peachjam

Project Peach Jam
https://agp.africanlii.org
GNU General Public License v3.0
2 stars 0 forks source link

Run a trial period for Plausible and Matomo analytics #1667

Closed longhotsummer closed 10 months ago

longhotsummer commented 10 months ago

Some alternatives to Google Analytics:

Key requirements

Not particularly important:

longhotsummer commented 10 months ago

My gut says we go with Plausible. It's simpler than matomo but seems to be a bit cheaper. Matomo is widely used but is quite complex.

I suggest that we run a 30 day trial period with both, for one LII, and see what they're like.

longhotsummer commented 10 months ago

Comparison: https://docs.google.com/spreadsheets/d/1lxpzwFLPTs2WgE4DhsHh2NcQdhtK_TncBnf9yYydKg0/edit#gid=0

longhotsummer commented 10 months ago

Let's go with lawlibrary for now.

Plausible script:

<script defer data-domain="lawlibrary.org.za" src="https://plausible.io/js/script.js"></script>
longhotsummer commented 10 months ago

Matomo:

<!-- 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://lawlibraryorgza.matomo.cloud/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src='//cdn.matomo.cloud/lawlibraryorgza.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->