waldronlab / BugSigDB

A microbial signatures database
https://bugsigdb.org
7 stars 6 forks source link

site usage statistics #91

Closed lwaldron closed 1 year ago

lwaldron commented 3 years ago

I'd like to keep statistics on traffic to the site over time, and where in the world it comes from. It would also be useful to know about the popularity of pages, and which site features (ie search, drill-down) get used. This will be useful when it comes time to apply for funding for long-term site maintenance. I'm not sure about pros and cons of Google Analytics vs an installed extension, so would appreciate suggestions.

We already plot contributions at http://waldronlab.io/BugSigDBStats/articles/BugSigDBStats.html so it's not necessary to do more on this unless it's straightforward and can offer something extra. Here we plot things like:

tosfos commented 3 years ago

Browsers are beginning to block tracking JavaScript like the one used by Google Analytics. We often install Matomo to read from the server logs, which mitigates this issue and also avoids reliance on an external service. I would recommend Google Analytics either way as there's little downside to installing it, and often there are discrepancies in the way traffic is reported between the 2 tools.

Please let me know how to proceed.

lwaldron commented 3 years ago

Installing both tools sounds good to me. I set up a Google Analytics account and gave you access to it too; here's the gtag.gs code it gave me:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YKH03F3F5K"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-YKH03F3F5K');
</script>
tosfos commented 3 years ago

Matomo is now available here. I'll send the password privately.

tosfos commented 3 years ago

Note that Matomo only reads the logs once per day to update its data.

lwaldron commented 3 years ago

Matomo looks great! I was able to login and poke around a bit.

lwaldron commented 3 years ago

Google Analytics seems to be working too, so the issue looks closed to me. Re-open if there's anything else to do.

lwaldron commented 2 years ago

It looks like the Matomo link no longer works (500 error) - https://bugsigdb.org/matomo/

tosfos commented 2 years ago

Sorry about that! It's back up now. We were able to recover logs from the last few weeks.

lwaldron commented 1 year ago

https://bugsigdb.org/matomo/ is returning an error:

Unable to write in the cache directory (/var/www/html/tmp/templates_c/62).

tosfos commented 1 year ago

Sorry. Checking.

lwaldron commented 1 year ago

On the topic of analytics, I just received a message from Google Analytics linking to https://support.google.com/analytics/answer/12938611#zippy=%2Cin-this-article, saying that

It's critical that you migrate your Universal Analytics property settings to Google Analytics 4, or you will begin to lose data on July 1, 2023 (July 1, 2024 for Analytics 360 properties). Learn how to migrate your settings.

I'm not sure but I guess this means I need to create the new Google Analytics 4 property, then give you a new Javascript snippet?

tosfos commented 1 year ago

We're already using a new snippet, but we'll verify that nothing else needs to be done.

It looks like we don't have access to the Analytics property. Are you able to grant access to my WikiWorks email? It's strange that you received this email because everything seems to be OK.

lwaldron commented 1 year ago

It looks like you already had administrative privileges to the bugsigdb.org "property":

image

but not to the "waldronlab" account:

image

image

I just changed your waldronlab account access to "editor" although I would expect the effect of that would just be to give you access to other properties.

tosfos commented 1 year ago

Thanks. Not sure why I couldn't see the property before then.

It looks like the warning you received is regarding the other properties. The bugsigdb.org property is using Analytics 4 as it shows in the screenshot.

tosfos commented 1 year ago

https://bugsigdb.org/matomo/ is returning an error:

Unable to write in the cache directory (/var/www/html/tmp/templates_c/62).

This is fixed. We're going to research what could have caused this.

This can be closed.