Page 1 of 1
Use of matomo
Posted: Sun 05 Nov 2023 1:37 pm
by Stigian
Hi,
Is it possible to use a tracking code from matomo in combination with Cumulusutils?
Re: Use of matomo
Posted: Sun 05 Nov 2023 1:55 pm
by HansR
Not at the moment, but if you give me the information of what is needed it should not be too difficult to implement. So for analytics then there would be an identifier (Google or Matomo) and the Id (I imagine). For Google I know the code needed, for Matomo you would have to supply it.
Re: Use of matomo
Posted: Mon 06 Nov 2023 5:49 am
by Stigian
HansR wrote: ↑Sun 05 Nov 2023 1:55 pm
Not at the moment, but if you give me the information of what is needed it should not be too difficult to implement. So for analytics then there would be an identifier (
Google or
Matomo) and the Id (I imagine). For Google I know the code needed, for Matomo you would have to supply it.
Hi Hans,
That's going to be a script;
Code: Select all
<!-- 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.weerstation-vaassen.nl/matomo/";
_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=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
Re: Use of matomo
Posted: Mon 06 Nov 2023 7:27 am
by HansR
OK.
I'll implement parameters
StatisticsType being [Google | Matamo] and then the
GoogleStatsId or the
MatamoTrackerUrl and
MatamoSiteId. For the user to edit in
cumulusutils.ini. Google stats will be the default.
I assume this is the generic code for a page.
You have to remember that there is only one page in CUtils website so the statistics will only show loads and reloads, not clicks on reports. If you want to register report loads (e.g. a click on a gauge or a menu choice) then for Google I generate a
gtag event registration call. Does Matamo have a similar call for registering specific events? If so, howto
I see you are Dutch so I suggest we exchange this generic info in this thread. Once it is ready and your 32 days have past so the site will generate, we can start debug and finetune this. For that phase I propose we do it in Dutch via PM or email.
Re: Use of matomo
Posted: Mon 06 Nov 2023 8:42 am
by Stigian
That would be nice. The code is the same for all pages. Matomo can also handle tags but not so interesting for me. All I would like is insight into visitor numbers. Right now I am still running in simulator mode. The reason is to try out all the features before I hook my weather station to it.