lmu-osc / Simulations-for-Advanced-Power-Analyses

https://lmu-osc.github.io/Simulations-for-Advanced-Power-Analyses/
Creative Commons Attribution Share Alike 4.0 International
5 stars 3 forks source link

Implement Matomo analytics #30

Closed NeuroShepherd closed 3 weeks ago

NeuroShepherd commented 1 month ago
<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://www.analytics.osc.lmu.de/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '7']);
    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 -->
Riyaaa1 commented 1 month ago

This repo already contains matomo.html file within includes/ folder.

NeuroShepherd commented 1 month ago

Thanks for catching this Riya!

@nicebread where is this repo currently being tracked? Is it on the Psych Matomo instance? And if so, do we want to transfer over to the OSC instance?

nicebread commented 1 month ago

Yes, please transfer this to the OSC Matomo.

NeuroShepherd commented 4 weeks ago

It looks like there is a migration plug-in we can use to transfer the old data to the OSC instance: https://matomo.org/faq/how-to/faq_19238/

NeuroShepherd commented 4 weeks ago

@nicebread I don't have access to the Psych Matomo instance so I think you'll need to migrate the data to the OSC instance (if you think it's worthwhile.)

NeuroShepherd commented 4 weeks ago

@Riyaaa1 in the meantime, can you make a pull request for the new code?

Riyaaa1 commented 4 weeks ago

@Riyaaa1 in the meantime, can you make a pull request for the new code?

Yes sure!

nicebread commented 3 weeks ago

@NeuroShepherd : I already created a user account "pat" on the psych Matomo a few weeks/months ago, with full admin access. (I can reset the password if you don't have it any more)

NeuroShepherd commented 3 weeks ago

Ope, I definitely forgot I had access--will DM you about details.

NeuroShepherd commented 3 weeks ago

Side-note: the Matomo tracking code was only set to track this project when it was still hosted on Malika's GitHub. So we have no tracking data since the repo was migrated to the LMU OSC organization.

NeuroShepherd commented 3 weeks ago

Decision: we won't migrate the Matomo data for this tutorial to the OSC Matomo instance because it's too little to justify the time investment, and there is also now a 6+ month gap.

As an addition to Riya's PR, I will delete the old tracking code.