Skip to content
This repository was archived by the owner on Jan 27, 2021. It is now read-only.

Migrate Google Analytics to Matomo #77

@dtoakley

Description

@dtoakley

As a digital climate strike team I want to migrate Google Analytics tracking to Matomo so that we aren't posting event to google anymore.

Acceptance criteria:

  • All events (banner shown, button clicks, etc) in index.js are replaced by calls to our Matomo cloud account.
  • The domain for this Matomo instance is https://digitalclimatestrike.matomo.cloud
  • We must be able to configure a report to show counts of all the different event types, per domain and between any time period we want.
  • Any reports needs to be able import into our tracking spreadsheet as we have with the Google Analytics workflow. Ask @dtoakley for more information about this.

Technical info:
Matomo tracking script:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://digitalclimatestrike.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.type='text/javascript'; g.async=true; g.defer=true; g.src='//cdn.matomo.cloud/digitalclimatestrike.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

Matomo API docs: https://developer.matomo.org/api-reference/tracking-api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions