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

Migrate Google Analytics to Matomo #77

Open
dtoakley opened this issue Sep 12, 2019 · 0 comments
Open

Migrate Google Analytics to Matomo #77

dtoakley opened this issue Sep 12, 2019 · 0 comments

Comments

@dtoakley
Copy link
Member

dtoakley commented Sep 12, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant